@mtcute/core 0.18.0-rc.5 → 0.19.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,27 @@
|
|
|
1
|
+
import { tl } from '@mtcute/tl';
|
|
2
|
+
import { default as Long } from 'long';
|
|
3
|
+
/**
|
|
4
|
+
* Information about a Fragment collectible
|
|
5
|
+
*/
|
|
6
|
+
export declare class CollectibleInfo {
|
|
7
|
+
readonly raw: tl.fragment.RawCollectibleInfo;
|
|
8
|
+
constructor(raw: tl.fragment.RawCollectibleInfo);
|
|
9
|
+
/** Date when the item was purchased */
|
|
10
|
+
get purchaseDate(): Date;
|
|
11
|
+
/** Crypto currency used to purchase the item */
|
|
12
|
+
get cryptoCurrency(): string;
|
|
13
|
+
/**
|
|
14
|
+
* Amount of crypto currency used to purchase the item,
|
|
15
|
+
* in the smallest units
|
|
16
|
+
*/
|
|
17
|
+
get cryptoAmount(): Long;
|
|
18
|
+
/** Fiat currency to which the crypto currency was converted */
|
|
19
|
+
get currency(): string;
|
|
20
|
+
/**
|
|
21
|
+
* Converted amount in fiat currency,
|
|
22
|
+
* in the smallest units (e.g. cents)
|
|
23
|
+
*/
|
|
24
|
+
get amount(): Long;
|
|
25
|
+
/** URL to the collectible on Fragment */
|
|
26
|
+
get url(): string;
|
|
27
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { tl } from '@mtcute/tl';
|
|
2
|
+
/**
|
|
3
|
+
* Formatted text with entities
|
|
4
|
+
*/
|
|
5
|
+
export interface TextWithEntities {
|
|
6
|
+
readonly text: string;
|
|
7
|
+
readonly entities?: tl.TypeMessageEntity[];
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Type to be used as a parameter for methods that accept
|
|
11
|
+
* a formatted text with entities.
|
|
12
|
+
*
|
|
13
|
+
* Can be either a plain string or an object with `text` and `entities` fields.
|
|
14
|
+
*/
|
|
15
|
+
export type InputText = string | TextWithEntities;
|
|
16
|
+
/**
|
|
17
|
+
* Convert {@link InputText} to a {@link tl.RawTextWithEntities} object
|
|
18
|
+
*
|
|
19
|
+
* @param text Input text
|
|
20
|
+
* @returns TL object
|
|
21
|
+
*/
|
|
22
|
+
export declare function inputTextToTl(text: InputText): tl.RawTextWithEntities;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { tl } from '@mtcute/tl';
|
|
2
|
+
import { MaybeArray } from '../../../../types/utils.js';
|
|
3
|
+
import { InputPeerLike } from '../../peers/peer.js';
|
|
4
|
+
import { InputPrivacyRuleChatParticipants, InputPrivacyRuleUsers } from './types.js';
|
|
5
|
+
/** Allow all users */
|
|
6
|
+
export declare const all: tl.RawInputPrivacyValueAllowAll;
|
|
7
|
+
/** Allow only contacts */
|
|
8
|
+
export declare const contacts: tl.RawInputPrivacyValueAllowContacts;
|
|
9
|
+
/** Allow only "close friends" list */
|
|
10
|
+
export declare const closeFriends: tl.RawInputPrivacyValueAllowCloseFriends;
|
|
11
|
+
/**
|
|
12
|
+
* Allow only users specified in `users`
|
|
13
|
+
*
|
|
14
|
+
* @param users Users to allow
|
|
15
|
+
*/
|
|
16
|
+
export declare function users(users: MaybeArray<InputPeerLike>): InputPrivacyRuleUsers;
|
|
17
|
+
/**
|
|
18
|
+
* Allow only participants of chats specified in `chats`
|
|
19
|
+
*
|
|
20
|
+
* @param chats Chats to allow
|
|
21
|
+
*/
|
|
22
|
+
export declare function chatParticipants(chats: MaybeArray<InputPeerLike>): InputPrivacyRuleChatParticipants;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { tl } from '@mtcute/tl';
|
|
2
|
+
import { MaybeArray } from '../../../../types/utils.js';
|
|
3
|
+
import { InputPeerLike } from '../../peers/peer.js';
|
|
4
|
+
import { InputPrivacyRuleChatParticipants, InputPrivacyRuleUsers } from './types.js';
|
|
5
|
+
/** Disallow all users */
|
|
6
|
+
export declare const all: tl.RawInputPrivacyValueDisallowAll;
|
|
7
|
+
/** Disallow contacts */
|
|
8
|
+
export declare const contacts: tl.RawInputPrivacyValueDisallowContacts;
|
|
9
|
+
/**
|
|
10
|
+
* Disallow users specified in `users`
|
|
11
|
+
*
|
|
12
|
+
* @param users Users to disallow
|
|
13
|
+
*/
|
|
14
|
+
export declare function users(users: MaybeArray<InputPeerLike>): InputPrivacyRuleUsers;
|
|
15
|
+
/**
|
|
16
|
+
* Disallow participants of chats specified in `chats`
|
|
17
|
+
*
|
|
18
|
+
* @param chats Chats to disallow
|
|
19
|
+
*/
|
|
20
|
+
export declare function chatParticipants(chats: MaybeArray<InputPeerLike>): InputPrivacyRuleChatParticipants;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { tl } from '@mtcute/tl';
|
|
2
|
+
import { InputPeerLike } from '../../peers/peer.js';
|
|
3
|
+
export interface InputPrivacyRuleUsers {
|
|
4
|
+
allow: boolean;
|
|
5
|
+
users: InputPeerLike[];
|
|
6
|
+
}
|
|
7
|
+
export interface InputPrivacyRuleChatParticipants {
|
|
8
|
+
allow: boolean;
|
|
9
|
+
chats: InputPeerLike[];
|
|
10
|
+
}
|
|
11
|
+
export type InputPrivacyRule = InputPrivacyRuleChatParticipants | InputPrivacyRuleUsers | tl.TypeInputPrivacyRule;
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
import { InputFileLike } from '../files/index.js';
|
|
2
|
+
import { MaskPosition, Sticker, StickerType, Thumbnail } from '../media/index.js';
|
|
3
|
+
import { tl } from '@mtcute/tl';
|
|
4
|
+
/**
|
|
5
|
+
* Input sticker set.
|
|
6
|
+
* Can be one of:
|
|
7
|
+
* - Raw TL object
|
|
8
|
+
* - Sticker set short name
|
|
9
|
+
* - {@link StickerSet} object
|
|
10
|
+
* - `{ dice: "<emoji>" }` (e.g. `{ dice: "🎲" }`) - Used for fetching animated dice stickers
|
|
11
|
+
* - `{ system: string }` - for system stickersets:
|
|
12
|
+
* - `"animated"` - Animated emojis stickerset
|
|
13
|
+
* - `"animated_animations"` - Animated emoji reaction stickerset
|
|
14
|
+
* (contains animations to play when a user clicks on a given animated emoji)
|
|
15
|
+
* - `"premium_gifts"` - Stickers to show when receiving a gifted Telegram Premium subscription,
|
|
16
|
+
* - `"generic_animations"` - Generic animation stickerset containing animations to play
|
|
17
|
+
* when reacting to messages using a normal emoji without a custom animation
|
|
18
|
+
* - `"default_statuses"` - Default custom emoji status stickerset
|
|
19
|
+
* - `"default_topic_icons"` - Default custom emoji stickerset for forum topic icons
|
|
20
|
+
* - `"default_channel_statuses"` - Default custom emoji status stickerset for channels
|
|
21
|
+
*/
|
|
22
|
+
export type InputStickerSet = tl.TypeInputStickerSet | {
|
|
23
|
+
dice: string;
|
|
24
|
+
} | {
|
|
25
|
+
system: 'animated' | 'animated_animations' | 'premium_gifts' | 'generic_animations' | 'default_statuses' | 'default_topic_icons' | 'default_channel_statuses';
|
|
26
|
+
} | StickerSet | string;
|
|
27
|
+
export declare function normalizeInputStickerSet(input: InputStickerSet): tl.TypeInputStickerSet;
|
|
28
|
+
/**
|
|
29
|
+
* Information about one sticker inside the set
|
|
30
|
+
*/
|
|
31
|
+
export interface StickerInfo {
|
|
32
|
+
/**
|
|
33
|
+
* Primary alt emoji that is displayed in dialogs list
|
|
34
|
+
*/
|
|
35
|
+
readonly alt: string;
|
|
36
|
+
/**
|
|
37
|
+
* One or more emojis representing this sticker
|
|
38
|
+
*/
|
|
39
|
+
readonly emoji: string;
|
|
40
|
+
/**
|
|
41
|
+
* Document with the actual sticker
|
|
42
|
+
*/
|
|
43
|
+
readonly sticker: Sticker;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* A sticker set (aka sticker pack)
|
|
47
|
+
*/
|
|
48
|
+
export declare class StickerSet {
|
|
49
|
+
readonly brief: tl.RawStickerSet;
|
|
50
|
+
readonly full?: tl.messages.RawStickerSet;
|
|
51
|
+
readonly cover?: tl.TypeStickerSetCovered;
|
|
52
|
+
/**
|
|
53
|
+
* Whether this object contains information about stickers inside the set
|
|
54
|
+
*/
|
|
55
|
+
readonly isFull: boolean;
|
|
56
|
+
constructor(raw: tl.TypeStickerSet | tl.messages.TypeStickerSet | tl.TypeStickerSetCovered);
|
|
57
|
+
/**
|
|
58
|
+
* Whether this sticker set was archived
|
|
59
|
+
* (due to too many saved stickers in the current account)
|
|
60
|
+
*/
|
|
61
|
+
get isArchived(): boolean;
|
|
62
|
+
/**
|
|
63
|
+
* Whether this stickerset is official
|
|
64
|
+
*/
|
|
65
|
+
get isOfficial(): boolean;
|
|
66
|
+
/**
|
|
67
|
+
* Whether this sticker set was created by the current user
|
|
68
|
+
*/
|
|
69
|
+
get isCreator(): boolean;
|
|
70
|
+
/**
|
|
71
|
+
* Type of the stickers in this set
|
|
72
|
+
*/
|
|
73
|
+
get type(): StickerType;
|
|
74
|
+
/**
|
|
75
|
+
* Date when this sticker set was installed
|
|
76
|
+
*/
|
|
77
|
+
get installedDate(): Date | null;
|
|
78
|
+
/**
|
|
79
|
+
* Number of stickers in this sticker set
|
|
80
|
+
*/
|
|
81
|
+
get count(): number;
|
|
82
|
+
/**
|
|
83
|
+
* Input sticker set to be used in other API methods
|
|
84
|
+
*/
|
|
85
|
+
get inputStickerSet(): tl.TypeInputStickerSet;
|
|
86
|
+
/**
|
|
87
|
+
* Title of the sticker set
|
|
88
|
+
*/
|
|
89
|
+
get title(): string;
|
|
90
|
+
/**
|
|
91
|
+
* Short name of sticker set to use in `tg://addstickers?set=short_name`
|
|
92
|
+
* or `https://t.me/addstickers/short_name`
|
|
93
|
+
*/
|
|
94
|
+
get shortName(): string;
|
|
95
|
+
/**
|
|
96
|
+
* List of stickers inside this sticker set
|
|
97
|
+
*
|
|
98
|
+
* @throws MtEmptyError
|
|
99
|
+
* In case this object does not contain info about stickers (i.e. {@link isFull} = false)
|
|
100
|
+
*/
|
|
101
|
+
get stickers(): ReadonlyArray<StickerInfo>;
|
|
102
|
+
/** Cover stickers of the sticker set. Not the same as {@link thumbnails} */
|
|
103
|
+
get covers(): ReadonlyArray<Sticker>;
|
|
104
|
+
/**
|
|
105
|
+
* Available sticker set thumbnails.
|
|
106
|
+
*
|
|
107
|
+
* Returns empty array if not available
|
|
108
|
+
* (i.e. first sticker should be used as thumbnail)
|
|
109
|
+
*/
|
|
110
|
+
get thumbnails(): ReadonlyArray<Thumbnail>;
|
|
111
|
+
/**
|
|
112
|
+
* Get a sticker set thumbnail by its type.
|
|
113
|
+
*
|
|
114
|
+
* Thumbnail types are described in the
|
|
115
|
+
* [Telegram docs](https://core.telegram.org/api/files#image-thumbnail-types),
|
|
116
|
+
* and are also available as static members of {@link Thumbnail} for convenience.
|
|
117
|
+
*
|
|
118
|
+
* @param type Thumbnail type
|
|
119
|
+
*/
|
|
120
|
+
getThumbnail(type: string): Thumbnail | null;
|
|
121
|
+
/**
|
|
122
|
+
* Find stickers given their emoji.
|
|
123
|
+
*
|
|
124
|
+
* @param emoji Emoji to search for
|
|
125
|
+
* @throws MtEmptyError
|
|
126
|
+
* In case this object does not contain info about stickers (i.e. {@link isFull} = false)
|
|
127
|
+
*/
|
|
128
|
+
getStickersByEmoji(emoji: string): StickerInfo[];
|
|
129
|
+
private _getInputDocument;
|
|
130
|
+
}
|
|
131
|
+
export interface InputStickerSetItem {
|
|
132
|
+
/**
|
|
133
|
+
* File containing the sticker.
|
|
134
|
+
*
|
|
135
|
+
* For normal stickers: must be a `.png` or `.webp` file
|
|
136
|
+
* up to 512kb, having both dimensions `<=512px`, and having
|
|
137
|
+
* one of the dimensions `==512px`
|
|
138
|
+
*
|
|
139
|
+
* For animated stickers: must be a `.tgs` file
|
|
140
|
+
* up to 64kb, having canvas dimensions exactly
|
|
141
|
+
* `512x512`px, duration no more than 3 seconds
|
|
142
|
+
* and animated at 60fps ([source](https://core.telegram.org/animated_stickers#technical-requirements))
|
|
143
|
+
*/
|
|
144
|
+
file: InputFileLike;
|
|
145
|
+
/**
|
|
146
|
+
* One or more emojis that represent this sticker
|
|
147
|
+
*/
|
|
148
|
+
emojis: string;
|
|
149
|
+
/**
|
|
150
|
+
* In case this is a mask sticker,
|
|
151
|
+
* position of the mask
|
|
152
|
+
*/
|
|
153
|
+
maskPosition?: MaskPosition;
|
|
154
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { tl } from '@mtcute/tl';
|
|
2
|
+
import { RpcCallOptions } from '../../../network/network-manager.js';
|
|
3
|
+
import { MustEqual } from '../../../types/utils.js';
|
|
4
|
+
import { ITelegramClient } from '../../client.types.js';
|
|
5
|
+
/**
|
|
6
|
+
* Account takeout session
|
|
7
|
+
*/
|
|
8
|
+
export declare class TakeoutSession {
|
|
9
|
+
readonly client: ITelegramClient;
|
|
10
|
+
/**
|
|
11
|
+
* Takeout session id
|
|
12
|
+
*/
|
|
13
|
+
readonly id: tl.Long;
|
|
14
|
+
constructor(client: ITelegramClient, session: tl.account.RawTakeout);
|
|
15
|
+
/**
|
|
16
|
+
* Make an API call using this takeout session
|
|
17
|
+
*
|
|
18
|
+
* This method just wraps the query into `invokeWithTakeout`
|
|
19
|
+
* and passes the control down to {@link TelegramClient.call}.
|
|
20
|
+
*
|
|
21
|
+
* @param message RPC method to call
|
|
22
|
+
* @param params Additional call parameters
|
|
23
|
+
*/
|
|
24
|
+
call<T extends tl.RpcMethod>(message: MustEqual<T, tl.RpcMethod>, params?: RpcCallOptions): Promise<tl.RpcCallReturn[T['_']]>;
|
|
25
|
+
/**
|
|
26
|
+
* Create a proxy over {@link TelegramClient}
|
|
27
|
+
* that will use this takeout session to call methods.
|
|
28
|
+
*
|
|
29
|
+
* You can optionally provide a function to check if some
|
|
30
|
+
* RPC method should be called via a takeout session or directly,
|
|
31
|
+
* otherwise all methods are called through the takeout session.
|
|
32
|
+
*
|
|
33
|
+
* > **Note**: This will return a `Proxy` object that
|
|
34
|
+
* > overrides `call` method. Using this method requires
|
|
35
|
+
* > that your target environment supports `Proxy` and `Reflect` APIs
|
|
36
|
+
*
|
|
37
|
+
* @param predicate
|
|
38
|
+
* Function that given the RPC call should determine whether
|
|
39
|
+
* that call should be called via takeout session or not.
|
|
40
|
+
* Returning `true` will use takeout session, `false` will not.
|
|
41
|
+
*/
|
|
42
|
+
createProxy(predicate?: (obj: tl.TlObject) => boolean): ITelegramClient;
|
|
43
|
+
/**
|
|
44
|
+
* Finish account takeout session
|
|
45
|
+
*
|
|
46
|
+
* @param success Whether the data was successfully exported
|
|
47
|
+
*/
|
|
48
|
+
finish(success?: boolean): Promise<void>;
|
|
49
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { tl } from '@mtcute/tl';
|
|
2
|
+
import { Video } from '../media/video.js';
|
|
3
|
+
import { Photo } from '../media/photo.js';
|
|
4
|
+
/** Information about a bot */
|
|
5
|
+
export declare class BotInfo {
|
|
6
|
+
readonly raw: tl.RawBotInfo;
|
|
7
|
+
constructor(raw: tl.RawBotInfo);
|
|
8
|
+
/** Whether the bot has preview medias available */
|
|
9
|
+
get hasPreviewMedia(): boolean;
|
|
10
|
+
/** ID of the bot */
|
|
11
|
+
get id(): number;
|
|
12
|
+
get description(): string;
|
|
13
|
+
get descriptionPhoto(): Photo | null;
|
|
14
|
+
get descriptionVideo(): Video | null;
|
|
15
|
+
/** List of the bot's registered commands */
|
|
16
|
+
get commands(): tl.TypeBotCommand[];
|
|
17
|
+
/** Action to be performed when the bot's menu button is pressed */
|
|
18
|
+
get menuButton(): tl.TypeBotMenuButton | null;
|
|
19
|
+
/** URL of the bot's privacy policy */
|
|
20
|
+
get privacyPolicyUrl(): string | null;
|
|
21
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { tl } from '@mtcute/tl';
|
|
2
|
+
/**
|
|
3
|
+
* Information about colors of a chat
|
|
4
|
+
*/
|
|
5
|
+
export declare class ChatColors {
|
|
6
|
+
private readonly _peerId;
|
|
7
|
+
readonly raw?: tl.RawPeerColor | undefined;
|
|
8
|
+
constructor(_peerId: number, raw?: tl.RawPeerColor | undefined);
|
|
9
|
+
/**
|
|
10
|
+
* Color ID
|
|
11
|
+
*
|
|
12
|
+
* Note that this value is **not** an RGB color representation. Instead, it is
|
|
13
|
+
* a number which should be used to pick a color from a predefined
|
|
14
|
+
* list of colors:
|
|
15
|
+
* - `0-6` are the default colors used by Telegram clients:
|
|
16
|
+
* `red, orange, purple, green, sea, blue, pink`
|
|
17
|
+
* - `>= 7` are returned by `help.getAppConfig`.
|
|
18
|
+
*/
|
|
19
|
+
get color(): number;
|
|
20
|
+
/**
|
|
21
|
+
* ID of the emoji that should be used as a background pattern
|
|
22
|
+
* when rendering the color
|
|
23
|
+
*/
|
|
24
|
+
get backgroundEmojiId(): tl.Long | null;
|
|
25
|
+
}
|
|
@@ -0,0 +1,279 @@
|
|
|
1
|
+
import { tl } from '@mtcute/tl';
|
|
2
|
+
import { PeersIndex } from '../peers-index.js';
|
|
3
|
+
import { Photo } from '../../media/photo.js';
|
|
4
|
+
import { Message } from '../../messages/message.js';
|
|
5
|
+
import { ChatInviteLink } from '../chat-invite-link.js';
|
|
6
|
+
import { ChatLocation } from '../chat-location.js';
|
|
7
|
+
import { ChatMember } from '../chat-member.js';
|
|
8
|
+
import { ChatPermissions } from '../chat-permissions.js';
|
|
9
|
+
import { ForumTopic } from '../forum-topic.js';
|
|
10
|
+
import { User } from '../user.js';
|
|
11
|
+
/** A user has joined the channel (in the case of big groups, info of the user that has joined isn't shown) */
|
|
12
|
+
export interface ChatActionUserJoined {
|
|
13
|
+
type: 'user_joined';
|
|
14
|
+
}
|
|
15
|
+
/** A user has joined the channel using an invite link */
|
|
16
|
+
export interface ChatActionUserJoinedInvite {
|
|
17
|
+
type: 'user_joined_invite';
|
|
18
|
+
/** Invite link user to join */
|
|
19
|
+
link: ChatInviteLink;
|
|
20
|
+
}
|
|
21
|
+
/** A user has joined the channel using an invite link and was approved by an admin */
|
|
22
|
+
export interface ChatActionUserJoinedApproved {
|
|
23
|
+
type: 'user_joined_approved';
|
|
24
|
+
/** Invite link user to join */
|
|
25
|
+
link: ChatInviteLink;
|
|
26
|
+
/** User who approved the join */
|
|
27
|
+
approvedBy: User;
|
|
28
|
+
}
|
|
29
|
+
/** A user has left the channel (in the case of big groups, info of the user that has joined isn't shown) */
|
|
30
|
+
export interface ChatActionUserLeft {
|
|
31
|
+
type: 'user_left';
|
|
32
|
+
}
|
|
33
|
+
/** A user was invited to the channel */
|
|
34
|
+
export interface ChatActionUserInvited {
|
|
35
|
+
type: 'user_invited';
|
|
36
|
+
/** Member who has been invited */
|
|
37
|
+
member: ChatMember;
|
|
38
|
+
}
|
|
39
|
+
/** Channel title has been changed */
|
|
40
|
+
export interface ChatActionTitleChanged {
|
|
41
|
+
type: 'title_changed';
|
|
42
|
+
/** Old chat title */
|
|
43
|
+
old: string;
|
|
44
|
+
/** New chat title */
|
|
45
|
+
new: string;
|
|
46
|
+
}
|
|
47
|
+
/** Channel description has been changed */
|
|
48
|
+
export interface ChatActionDescriptionChanged {
|
|
49
|
+
type: 'description_changed';
|
|
50
|
+
/** Old description */
|
|
51
|
+
old: string;
|
|
52
|
+
/** New description */
|
|
53
|
+
new: string;
|
|
54
|
+
}
|
|
55
|
+
/** Channel username has been changed */
|
|
56
|
+
export interface ChatActionUsernameChanged {
|
|
57
|
+
type: 'username_changed';
|
|
58
|
+
/** Old username */
|
|
59
|
+
old: string;
|
|
60
|
+
/** New username */
|
|
61
|
+
new: string;
|
|
62
|
+
}
|
|
63
|
+
/** Channel username list has been changed */
|
|
64
|
+
export interface ChatActionUsernamesChanged {
|
|
65
|
+
type: 'usernames_changed';
|
|
66
|
+
/** Old username */
|
|
67
|
+
old: string[];
|
|
68
|
+
/** New username */
|
|
69
|
+
new: string[];
|
|
70
|
+
}
|
|
71
|
+
/** Channel photo has been changed */
|
|
72
|
+
export interface ChatActionPhotoChanged {
|
|
73
|
+
type: 'photo_changed';
|
|
74
|
+
/** Old photo */
|
|
75
|
+
old: Photo;
|
|
76
|
+
/** New photo */
|
|
77
|
+
new: Photo;
|
|
78
|
+
}
|
|
79
|
+
/** Invites were enabled/disabled */
|
|
80
|
+
export interface ChatActionInvitesToggled {
|
|
81
|
+
type: 'invites_toggled';
|
|
82
|
+
/** Old value */
|
|
83
|
+
old: boolean;
|
|
84
|
+
/** New value */
|
|
85
|
+
new: boolean;
|
|
86
|
+
}
|
|
87
|
+
/** Signatures were enabled/disabled */
|
|
88
|
+
export interface ChatActionSignaturesToggled {
|
|
89
|
+
type: 'signatures_toggled';
|
|
90
|
+
/** Old value */
|
|
91
|
+
old: boolean;
|
|
92
|
+
/** New value */
|
|
93
|
+
new: boolean;
|
|
94
|
+
}
|
|
95
|
+
/** A message has been pinned */
|
|
96
|
+
export interface ChatActionMessagePinned {
|
|
97
|
+
type: 'msg_pinned';
|
|
98
|
+
/** Message which was pinned */
|
|
99
|
+
message: Message;
|
|
100
|
+
}
|
|
101
|
+
/** A message has been edited */
|
|
102
|
+
export interface ChatActionMessageEdited {
|
|
103
|
+
type: 'msg_edited';
|
|
104
|
+
/** Old message */
|
|
105
|
+
old: Message;
|
|
106
|
+
/** New message */
|
|
107
|
+
new: Message;
|
|
108
|
+
}
|
|
109
|
+
/** A message has been deleted */
|
|
110
|
+
export interface ChatActionMessageDeleted {
|
|
111
|
+
type: 'msg_deleted';
|
|
112
|
+
/** Message which was deleted */
|
|
113
|
+
message: Message;
|
|
114
|
+
}
|
|
115
|
+
/** User's permissions were changed */
|
|
116
|
+
export interface ChatActionUserPermissionsChanged {
|
|
117
|
+
type: 'user_perms_changed';
|
|
118
|
+
/** Information about member before change */
|
|
119
|
+
old: ChatMember;
|
|
120
|
+
/** Information about member after change */
|
|
121
|
+
new: ChatMember;
|
|
122
|
+
}
|
|
123
|
+
/** User's admin permissions were changed */
|
|
124
|
+
export interface ChatActionUserAdminPermissionsChanged {
|
|
125
|
+
type: 'user_admin_perms_changed';
|
|
126
|
+
/** Information about member before change */
|
|
127
|
+
old: ChatMember;
|
|
128
|
+
/** Information about member after change */
|
|
129
|
+
new: ChatMember;
|
|
130
|
+
}
|
|
131
|
+
/** Group stickerset has been changed */
|
|
132
|
+
export interface ChatActionStickersetChanged {
|
|
133
|
+
type: 'stickerset_changed';
|
|
134
|
+
/** Old stickerset */
|
|
135
|
+
old: tl.TypeInputStickerSet;
|
|
136
|
+
/** New stickerset */
|
|
137
|
+
new: tl.TypeInputStickerSet;
|
|
138
|
+
}
|
|
139
|
+
/** History visibility for new users has been toggled */
|
|
140
|
+
export interface ChatActionHistoryToggled {
|
|
141
|
+
type: 'history_toggled';
|
|
142
|
+
/** Old value (`false` if new users can see history) */
|
|
143
|
+
old: boolean;
|
|
144
|
+
/** New value (`false` if new users can see history) */
|
|
145
|
+
new: boolean;
|
|
146
|
+
}
|
|
147
|
+
/** Group default permissions have been changed */
|
|
148
|
+
export interface ChatActionDefaultPermissionsChanged {
|
|
149
|
+
type: 'def_perms_changed';
|
|
150
|
+
/** Old default permissions */
|
|
151
|
+
old: ChatPermissions;
|
|
152
|
+
/** New default permissions */
|
|
153
|
+
new: ChatPermissions;
|
|
154
|
+
}
|
|
155
|
+
/** Poll has been stopped */
|
|
156
|
+
export interface ChatActionPollStopped {
|
|
157
|
+
type: 'poll_stopped';
|
|
158
|
+
/** Message containing the poll */
|
|
159
|
+
message: Message;
|
|
160
|
+
}
|
|
161
|
+
/** Linked chat has been changed */
|
|
162
|
+
export interface ChatActionLinkedChatChanged {
|
|
163
|
+
type: 'linked_chat_changed';
|
|
164
|
+
/** ID of the old linked chat */
|
|
165
|
+
old: number;
|
|
166
|
+
/** ID of the new linked chat */
|
|
167
|
+
new: number;
|
|
168
|
+
}
|
|
169
|
+
/** Group location has been changed */
|
|
170
|
+
export interface ChatActionLocationChanged {
|
|
171
|
+
type: 'location_changed';
|
|
172
|
+
/** Old location */
|
|
173
|
+
old: ChatLocation | null;
|
|
174
|
+
/** New location */
|
|
175
|
+
new: ChatLocation | null;
|
|
176
|
+
}
|
|
177
|
+
/** Group slow mode delay has been changed */
|
|
178
|
+
export interface ChatActionSlowModeChanged {
|
|
179
|
+
type: 'slow_mode_changed';
|
|
180
|
+
/** Old delay (can be 0) */
|
|
181
|
+
old: number;
|
|
182
|
+
/** New delay (can be 0) */
|
|
183
|
+
new: number;
|
|
184
|
+
}
|
|
185
|
+
/** Group call has been started */
|
|
186
|
+
export interface ChatActionCallStarted {
|
|
187
|
+
type: 'call_started';
|
|
188
|
+
/** TL object representing the call */
|
|
189
|
+
call: tl.TypeInputGroupCall;
|
|
190
|
+
}
|
|
191
|
+
/** Group call has ended */
|
|
192
|
+
export interface ChatActionCallEnded {
|
|
193
|
+
type: 'call_ended';
|
|
194
|
+
/** TL object representing the call */
|
|
195
|
+
call: tl.TypeInputGroupCall;
|
|
196
|
+
}
|
|
197
|
+
/** Group call "join muted" setting has been changed */
|
|
198
|
+
export interface ChatActionCallSettingChanged {
|
|
199
|
+
type: 'call_setting_changed';
|
|
200
|
+
/** Whether new call participants should join muted */
|
|
201
|
+
joinMuted: boolean;
|
|
202
|
+
}
|
|
203
|
+
/** Invite link has been deleted */
|
|
204
|
+
export interface ChatActionInviteLinkDeleted {
|
|
205
|
+
type: 'invite_deleted';
|
|
206
|
+
/** Invite link which was deleted */
|
|
207
|
+
link: ChatInviteLink;
|
|
208
|
+
}
|
|
209
|
+
/** Invite link has been edited */
|
|
210
|
+
export interface ChatActionInviteLinkEdited {
|
|
211
|
+
type: 'invite_edited';
|
|
212
|
+
/** Old invite link */
|
|
213
|
+
old: ChatInviteLink;
|
|
214
|
+
/** New invite link */
|
|
215
|
+
new: ChatInviteLink;
|
|
216
|
+
}
|
|
217
|
+
/** Invite link has been revoked */
|
|
218
|
+
export interface ChatActionInviteLinkRevoked {
|
|
219
|
+
type: 'invite_revoked';
|
|
220
|
+
/** Invite link which was revoked */
|
|
221
|
+
link: ChatInviteLink;
|
|
222
|
+
}
|
|
223
|
+
/** History TTL has been changed */
|
|
224
|
+
export interface ChatActionTtlChanged {
|
|
225
|
+
type: 'ttl_changed';
|
|
226
|
+
/** Old TTL value (can be 0) */
|
|
227
|
+
old: number;
|
|
228
|
+
/** New TTL value (can be 0) */
|
|
229
|
+
new: number;
|
|
230
|
+
}
|
|
231
|
+
/** Content protection has been toggled */
|
|
232
|
+
export interface ChatActionNoForwardsToggled {
|
|
233
|
+
type: 'no_forwards_toggled';
|
|
234
|
+
/** New status */
|
|
235
|
+
enabled: boolean;
|
|
236
|
+
}
|
|
237
|
+
/** Forum has been toggled */
|
|
238
|
+
export interface ChatActionForumToggled {
|
|
239
|
+
type: 'forum_toggled';
|
|
240
|
+
/** New status */
|
|
241
|
+
enabled: boolean;
|
|
242
|
+
}
|
|
243
|
+
/** Forum topic has been created */
|
|
244
|
+
export interface ChatActionTopicCreated {
|
|
245
|
+
type: 'topic_created';
|
|
246
|
+
/** Topic that has been created */
|
|
247
|
+
topic: ForumTopic;
|
|
248
|
+
}
|
|
249
|
+
/** Forum topic has been edited */
|
|
250
|
+
export interface ChatActionTopicEdited {
|
|
251
|
+
type: 'topic_edited';
|
|
252
|
+
/** Old topic info */
|
|
253
|
+
old: ForumTopic;
|
|
254
|
+
/** New topic info */
|
|
255
|
+
new: ForumTopic;
|
|
256
|
+
}
|
|
257
|
+
/** Forum topic has been edited */
|
|
258
|
+
export interface ChatActionTopicDeleted {
|
|
259
|
+
type: 'topic_deleted';
|
|
260
|
+
/** Old topic info */
|
|
261
|
+
topic: ForumTopic;
|
|
262
|
+
}
|
|
263
|
+
/** Profile signatures were toggled in a channel ("Super Channel" mode) */
|
|
264
|
+
export interface ChatActionSignatureProfilesToggled {
|
|
265
|
+
type: 'signature_profiles_toggled';
|
|
266
|
+
/** Whether signatures are enabled as of this action */
|
|
267
|
+
new: boolean;
|
|
268
|
+
}
|
|
269
|
+
export interface ChatActionSubscriptionExtended {
|
|
270
|
+
type: 'sub_extend';
|
|
271
|
+
/** Previous participant information */
|
|
272
|
+
prev: ChatMember;
|
|
273
|
+
/** New participant information */
|
|
274
|
+
new: ChatMember;
|
|
275
|
+
}
|
|
276
|
+
/** Chat event action (`null` if unsupported) */
|
|
277
|
+
export type ChatAction = ChatActionUserJoined | ChatActionUserLeft | ChatActionUserInvited | ChatActionTitleChanged | ChatActionDescriptionChanged | ChatActionUsernameChanged | ChatActionUsernamesChanged | ChatActionPhotoChanged | ChatActionInvitesToggled | ChatActionSignaturesToggled | ChatActionMessagePinned | ChatActionMessageEdited | ChatActionMessageDeleted | ChatActionUserPermissionsChanged | ChatActionUserAdminPermissionsChanged | ChatActionStickersetChanged | ChatActionHistoryToggled | ChatActionDefaultPermissionsChanged | ChatActionPollStopped | ChatActionLinkedChatChanged | ChatActionLocationChanged | ChatActionSlowModeChanged | ChatActionCallStarted | ChatActionCallEnded | ChatActionCallSettingChanged | ChatActionUserJoinedInvite | ChatActionInviteLinkDeleted | ChatActionInviteLinkEdited | ChatActionInviteLinkRevoked | ChatActionUserJoinedApproved | ChatActionTtlChanged | ChatActionNoForwardsToggled | ChatActionForumToggled | ChatActionTopicCreated | ChatActionTopicEdited | ChatActionTopicDeleted | ChatActionSignatureProfilesToggled | ChatActionSubscriptionExtended | null;
|
|
278
|
+
/** @internal */
|
|
279
|
+
export declare function _actionFromTl(e: tl.TypeChannelAdminLogEventAction, peers: PeersIndex): ChatAction;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { tl } from '@mtcute/tl';
|
|
2
|
+
import { MaybeArray } from '../../../../types/utils.js';
|
|
3
|
+
import { ChatAction } from './actions.js';
|
|
4
|
+
export interface ChatEventFilters {
|
|
5
|
+
serverFilter?: tl.TypeChannelAdminLogEventsFilter;
|
|
6
|
+
localFilter?: Record<string, true>;
|
|
7
|
+
}
|
|
8
|
+
export type InputChatEventFilters = ChatEventFilters | tl.TypeChannelAdminLogEventsFilter | MaybeArray<Exclude<ChatAction, null>['type']> | undefined;
|
|
9
|
+
/** @internal */
|
|
10
|
+
export declare function normalizeChatEventFilters(input: InputChatEventFilters): ChatEventFilters;
|