@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,33 @@
|
|
|
1
|
+
import { tl } from '@mtcute/tl';
|
|
2
|
+
import { MessageMedia } from '../messages/message-media.js';
|
|
3
|
+
import { ExtendedMediaPreview } from './extended-media.js';
|
|
4
|
+
export declare class PaidMedia {
|
|
5
|
+
readonly raw: tl.RawMessageMediaPaidMedia;
|
|
6
|
+
private readonly _extendedMedia;
|
|
7
|
+
readonly type: "paid";
|
|
8
|
+
constructor(raw: tl.RawMessageMediaPaidMedia, _extendedMedia: MessageMedia[]);
|
|
9
|
+
/** Whether this media was paid for */
|
|
10
|
+
get isPaid(): boolean;
|
|
11
|
+
/** Price of the media (in Telegram Stars) */
|
|
12
|
+
get price(): tl.Long;
|
|
13
|
+
/**
|
|
14
|
+
* Get the available media previews.
|
|
15
|
+
*
|
|
16
|
+
* If the media is already paid for, this will return an empty array.
|
|
17
|
+
*/
|
|
18
|
+
get previews(): ExtendedMediaPreview[];
|
|
19
|
+
/**
|
|
20
|
+
* Get the available full media.
|
|
21
|
+
*
|
|
22
|
+
* If the media is not paid for, this will return an empty array.
|
|
23
|
+
*/
|
|
24
|
+
get medias(): MessageMedia[];
|
|
25
|
+
/**
|
|
26
|
+
* Input media TL object generated from this object,
|
|
27
|
+
* to be used inside {@link InputMediaLike} and
|
|
28
|
+
* {@link TelegramClient.sendMedia}.
|
|
29
|
+
*
|
|
30
|
+
* Will throw if the media is not paid for.
|
|
31
|
+
*/
|
|
32
|
+
get inputMedia(): tl.TypeInputMedia;
|
|
33
|
+
}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { tl } from '@mtcute/tl';
|
|
2
|
+
import { FileLocation } from '../files/index.js';
|
|
3
|
+
import { Thumbnail } from './thumbnail.js';
|
|
4
|
+
/**
|
|
5
|
+
* A photo
|
|
6
|
+
*/
|
|
7
|
+
export declare class Photo extends FileLocation {
|
|
8
|
+
readonly raw: tl.RawPhoto;
|
|
9
|
+
readonly media?: tl.RawMessageMediaPhoto | undefined;
|
|
10
|
+
readonly type: "photo";
|
|
11
|
+
/** Biggest available photo width */
|
|
12
|
+
readonly width: number;
|
|
13
|
+
/** Biggest available photo height */
|
|
14
|
+
readonly height: number;
|
|
15
|
+
private _bestSize?;
|
|
16
|
+
constructor(raw: tl.RawPhoto, media?: tl.RawMessageMediaPhoto | undefined);
|
|
17
|
+
/**
|
|
18
|
+
* Photo ID
|
|
19
|
+
*/
|
|
20
|
+
get id(): tl.Long;
|
|
21
|
+
/** Date this photo was sent */
|
|
22
|
+
get date(): Date;
|
|
23
|
+
/**
|
|
24
|
+
* Whether this photo is an animated profile picture
|
|
25
|
+
*/
|
|
26
|
+
get isAnimatedAvatar(): boolean;
|
|
27
|
+
/**
|
|
28
|
+
* Whether this photo is an animated profile picture, built from an emoji/sticker markup
|
|
29
|
+
*/
|
|
30
|
+
get isMarkupAvatar(): boolean;
|
|
31
|
+
/** Whether this photo is hidden with a spoiler */
|
|
32
|
+
get hasSpoiler(): boolean;
|
|
33
|
+
/** For self-destructing photos, TTL in seconds */
|
|
34
|
+
get ttlSeconds(): number | null;
|
|
35
|
+
/**
|
|
36
|
+
* Available thumbnails.
|
|
37
|
+
*
|
|
38
|
+
* **Note**: This list will also contain the largest thumbnail that is
|
|
39
|
+
* represented by the current object.
|
|
40
|
+
*/
|
|
41
|
+
get thumbnails(): ReadonlyArray<Thumbnail>;
|
|
42
|
+
/**
|
|
43
|
+
* Get a photo thumbnail by its type.
|
|
44
|
+
*
|
|
45
|
+
* Thumbnail types are described in the
|
|
46
|
+
* [Telegram docs](https://core.telegram.org/api/files#image-thumbnail-types),
|
|
47
|
+
* and are also available as static members of {@link Thumbnail} for convenience.
|
|
48
|
+
*
|
|
49
|
+
* @param type Thumbnail type
|
|
50
|
+
*/
|
|
51
|
+
getThumbnail(type: string): Thumbnail | null;
|
|
52
|
+
/**
|
|
53
|
+
* Get TDLib and Bot API compatible File ID
|
|
54
|
+
* representing this photo's best thumbnail.
|
|
55
|
+
*/
|
|
56
|
+
get fileId(): string;
|
|
57
|
+
/**
|
|
58
|
+
* Get TDLib and Bot API compatible Unique File ID
|
|
59
|
+
* representing this photo's best thumbnail.
|
|
60
|
+
*/
|
|
61
|
+
get uniqueFileId(): string;
|
|
62
|
+
/**
|
|
63
|
+
* Input photo generated from this object.
|
|
64
|
+
*/
|
|
65
|
+
get inputPhoto(): tl.TypeInputPhoto;
|
|
66
|
+
/**
|
|
67
|
+
* Input media generated from this object,
|
|
68
|
+
* to be used in {@link InputMediaLike} and
|
|
69
|
+
* {@link TelegramClient.sendMedia}
|
|
70
|
+
*/
|
|
71
|
+
get inputMedia(): tl.TypeInputMedia;
|
|
72
|
+
}
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import { tl } from '@mtcute/tl';
|
|
2
|
+
import { PeersIndex } from '../peers/peers-index.js';
|
|
3
|
+
import { MessageEntity } from '../messages/message-entity.js';
|
|
4
|
+
export declare class PollAnswer {
|
|
5
|
+
readonly raw: tl.TypePollAnswer;
|
|
6
|
+
readonly result?: tl.RawPollAnswerVoters | undefined;
|
|
7
|
+
constructor(raw: tl.TypePollAnswer, result?: tl.RawPollAnswerVoters | undefined);
|
|
8
|
+
/**
|
|
9
|
+
* Answer text
|
|
10
|
+
*/
|
|
11
|
+
get text(): string;
|
|
12
|
+
/**
|
|
13
|
+
* Format entities for {@link text}, currently may only contain custom emojis
|
|
14
|
+
*/
|
|
15
|
+
get textEntities(): ReadonlyArray<MessageEntity>;
|
|
16
|
+
/**
|
|
17
|
+
* Answer data, to be passed to
|
|
18
|
+
* {@link TelegramClient.sendVote}
|
|
19
|
+
*/
|
|
20
|
+
get data(): Uint8Array;
|
|
21
|
+
/**
|
|
22
|
+
* Number of people who has chosen this result.
|
|
23
|
+
* If not available (i.e. not voted yet)
|
|
24
|
+
*
|
|
25
|
+
* @default
|
|
26
|
+
*/
|
|
27
|
+
get voters(): number;
|
|
28
|
+
/**
|
|
29
|
+
* Whether this answer was chosen by the current user
|
|
30
|
+
*/
|
|
31
|
+
get chosen(): boolean;
|
|
32
|
+
/**
|
|
33
|
+
* Whether this answer is correct (for quizzes).
|
|
34
|
+
* Not available before choosing an answer
|
|
35
|
+
*
|
|
36
|
+
* @default
|
|
37
|
+
*/
|
|
38
|
+
get correct(): boolean;
|
|
39
|
+
}
|
|
40
|
+
export declare class Poll {
|
|
41
|
+
readonly raw: tl.TypePoll;
|
|
42
|
+
readonly _peers: PeersIndex;
|
|
43
|
+
readonly results?: tl.RawPollResults | undefined;
|
|
44
|
+
readonly type: "poll";
|
|
45
|
+
constructor(raw: tl.TypePoll, _peers: PeersIndex, results?: tl.RawPollResults | undefined);
|
|
46
|
+
/**
|
|
47
|
+
* Unique identifier of the poll
|
|
48
|
+
*/
|
|
49
|
+
get id(): tl.Long;
|
|
50
|
+
/**
|
|
51
|
+
* Poll question
|
|
52
|
+
*/
|
|
53
|
+
get question(): string;
|
|
54
|
+
/**
|
|
55
|
+
* Format entities for {@link question} (currently may only contain custom emojis)
|
|
56
|
+
*/
|
|
57
|
+
get questionEntities(): ReadonlyArray<MessageEntity>;
|
|
58
|
+
/**
|
|
59
|
+
* List of answers in this poll
|
|
60
|
+
*/
|
|
61
|
+
get answers(): ReadonlyArray<PollAnswer>;
|
|
62
|
+
/**
|
|
63
|
+
* Total number of voters in this poll, if available
|
|
64
|
+
*/
|
|
65
|
+
get voters(): number;
|
|
66
|
+
/**
|
|
67
|
+
* Whether this poll is closed, i.e. does not
|
|
68
|
+
* accept votes anymore
|
|
69
|
+
*/
|
|
70
|
+
get isClosed(): boolean;
|
|
71
|
+
/**
|
|
72
|
+
* Whether this poll is public, i.e. you
|
|
73
|
+
* list of voters is publicly available
|
|
74
|
+
*/
|
|
75
|
+
get isPublic(): boolean;
|
|
76
|
+
/**
|
|
77
|
+
* Whether this is a quiz
|
|
78
|
+
*/
|
|
79
|
+
get isQuiz(): boolean;
|
|
80
|
+
/**
|
|
81
|
+
* Whether this poll accepts multiple answers
|
|
82
|
+
*/
|
|
83
|
+
get isMultiple(): boolean;
|
|
84
|
+
/**
|
|
85
|
+
* Solution for the quiz, only available
|
|
86
|
+
* in case you have already answered
|
|
87
|
+
*/
|
|
88
|
+
get solution(): string | null;
|
|
89
|
+
/**
|
|
90
|
+
* Format entities for {@link solution}, only available
|
|
91
|
+
* in case you have already answered
|
|
92
|
+
*/
|
|
93
|
+
get solutionEntities(): ReadonlyArray<MessageEntity> | null;
|
|
94
|
+
/**
|
|
95
|
+
* Input media TL object generated from this object,
|
|
96
|
+
* to be used inside {@link InputMediaLike} and
|
|
97
|
+
* {@link TelegramClient.sendMedia}
|
|
98
|
+
*
|
|
99
|
+
* A few notes:
|
|
100
|
+
* - Using this will result in an
|
|
101
|
+
* independent poll, which will not
|
|
102
|
+
* be auto-updated with the current.
|
|
103
|
+
* - If this is a quiz, a normal poll
|
|
104
|
+
* will be returned since the client does not
|
|
105
|
+
* know the correct answer.
|
|
106
|
+
* - This always returns a non-closed poll,
|
|
107
|
+
* even if the current poll was closed
|
|
108
|
+
*/
|
|
109
|
+
get inputMedia(): tl.TypeInputMedia;
|
|
110
|
+
}
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
import { tl } from '@mtcute/tl';
|
|
2
|
+
import { tdFileId } from '@mtcute/file-id';
|
|
3
|
+
import { RawDocument } from './document.js';
|
|
4
|
+
export declare const MASK_POSITION_POINT_TO_TL: {
|
|
5
|
+
readonly forehead: 0;
|
|
6
|
+
readonly eyes: 1;
|
|
7
|
+
readonly mouth: 2;
|
|
8
|
+
readonly chin: 3;
|
|
9
|
+
};
|
|
10
|
+
export interface MaskPosition {
|
|
11
|
+
/**
|
|
12
|
+
* The part of the face relative where the mask should be placed
|
|
13
|
+
*/
|
|
14
|
+
point: 'forehead' | 'eyes' | 'mouth' | 'chin';
|
|
15
|
+
/**
|
|
16
|
+
* Shift by X-axis measured in widths of the mask scaled to
|
|
17
|
+
* the face size, from left to right. For example, choosing
|
|
18
|
+
* -1.0 will place mask just to the left of the default
|
|
19
|
+
* mask position.
|
|
20
|
+
*/
|
|
21
|
+
x: number;
|
|
22
|
+
/**
|
|
23
|
+
* Shift by Y-axis measured in heights of the mask scaled to
|
|
24
|
+
* the face size, from top to bottom. For example, 1.0
|
|
25
|
+
* will place the mask just below the default mask position.
|
|
26
|
+
*/
|
|
27
|
+
y: number;
|
|
28
|
+
/**
|
|
29
|
+
* Mask scaling coefficient. For example, 2.0 means double size.
|
|
30
|
+
*/
|
|
31
|
+
scale: number;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Type of the sticker
|
|
35
|
+
* - `sticker`: regular sticker
|
|
36
|
+
* - `mask`: mask sticker
|
|
37
|
+
* - `emoji`: custom emoji
|
|
38
|
+
*/
|
|
39
|
+
export type StickerType = 'sticker' | 'mask' | 'emoji';
|
|
40
|
+
/**
|
|
41
|
+
* Sticker source file type
|
|
42
|
+
* - `static`: static sticker (webp)
|
|
43
|
+
* - `animated`: animated sticker (gzipped lottie json)
|
|
44
|
+
* - `video`: video sticker (webm)
|
|
45
|
+
*/
|
|
46
|
+
export type StickerSourceType = 'static' | 'animated' | 'video';
|
|
47
|
+
/**
|
|
48
|
+
* A sticker
|
|
49
|
+
*/
|
|
50
|
+
export declare class Sticker extends RawDocument {
|
|
51
|
+
readonly attr: tl.RawDocumentAttributeSticker | tl.RawDocumentAttributeCustomEmoji;
|
|
52
|
+
readonly attr2?: tl.RawDocumentAttributeImageSize | tl.RawDocumentAttributeVideo | undefined;
|
|
53
|
+
readonly type: "sticker";
|
|
54
|
+
protected _fileIdType(): tdFileId.FileType;
|
|
55
|
+
constructor(doc: tl.RawDocument, attr: tl.RawDocumentAttributeSticker | tl.RawDocumentAttributeCustomEmoji, attr2?: tl.RawDocumentAttributeImageSize | tl.RawDocumentAttributeVideo | undefined);
|
|
56
|
+
/**
|
|
57
|
+
* Sticker width in pixels
|
|
58
|
+
*/
|
|
59
|
+
get width(): number;
|
|
60
|
+
/**
|
|
61
|
+
* Sticker height in pixels
|
|
62
|
+
*/
|
|
63
|
+
get height(): number;
|
|
64
|
+
/**
|
|
65
|
+
* Whether this sticker is a premium sticker
|
|
66
|
+
* (has premium fullscreen animation)
|
|
67
|
+
*/
|
|
68
|
+
get isPremiumSticker(): boolean;
|
|
69
|
+
/**
|
|
70
|
+
* Whether this sticker is a valid sticker.
|
|
71
|
+
*
|
|
72
|
+
* If it is not, then this is probably a WEBP photo
|
|
73
|
+
* that Telegram treats as a sticker.
|
|
74
|
+
*/
|
|
75
|
+
get isValidSticker(): boolean;
|
|
76
|
+
/**
|
|
77
|
+
* Primary emoji associated with this sticker,
|
|
78
|
+
* that is displayed in dialogs list.
|
|
79
|
+
*
|
|
80
|
+
* If there is none, empty string is returned.
|
|
81
|
+
*
|
|
82
|
+
* **Note:** This only contains at most one emoji.
|
|
83
|
+
* Some stickers have multiple associated emojis,
|
|
84
|
+
* but only one is returned here. This is Telegram's
|
|
85
|
+
* limitation! Use {@link getAllEmojis} instead.
|
|
86
|
+
*
|
|
87
|
+
* For custom emojis, this alt should be used as a fallback
|
|
88
|
+
* text that will be "behind" the custom emoji entity.
|
|
89
|
+
*/
|
|
90
|
+
get emoji(): string;
|
|
91
|
+
/**
|
|
92
|
+
* Whether this custom emoji can be used by non-premium users.
|
|
93
|
+
* `false` if this is not a custom emoji.
|
|
94
|
+
*
|
|
95
|
+
* > Not sure if there are any such stickers currently.
|
|
96
|
+
*/
|
|
97
|
+
get customEmojiFree(): boolean;
|
|
98
|
+
/**
|
|
99
|
+
* If this is a custom emoji, its unique ID
|
|
100
|
+
* that can be used in {@link TelegramClient#getCustomEmojis}
|
|
101
|
+
*/
|
|
102
|
+
get customEmojiId(): tl.Long;
|
|
103
|
+
/**
|
|
104
|
+
* Type of the sticker
|
|
105
|
+
*/
|
|
106
|
+
get stickerType(): StickerType;
|
|
107
|
+
/**
|
|
108
|
+
* Type of the file representing the sticker
|
|
109
|
+
*/
|
|
110
|
+
get sourceType(): StickerSourceType;
|
|
111
|
+
/**
|
|
112
|
+
* Whether this sticker has an associated public sticker set.
|
|
113
|
+
*/
|
|
114
|
+
get hasStickerSet(): boolean;
|
|
115
|
+
/**
|
|
116
|
+
* Input sticker set that it associated with this sticker, if available.
|
|
117
|
+
*/
|
|
118
|
+
get inputStickerSet(): tl.TypeInputStickerSet | null;
|
|
119
|
+
/**
|
|
120
|
+
* Position where this mask should be placed
|
|
121
|
+
*/
|
|
122
|
+
get maskPosition(): MaskPosition | null;
|
|
123
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { tl } from '@mtcute/tl';
|
|
2
|
+
import { Peer } from '../peers/peer.js';
|
|
3
|
+
import { PeersIndex } from '../peers/peers-index.js';
|
|
4
|
+
import { Story } from '../stories/story.js';
|
|
5
|
+
/**
|
|
6
|
+
* Information about a "forwarded" story in a message,
|
|
7
|
+
* internally represented as a message media
|
|
8
|
+
*/
|
|
9
|
+
export declare class MediaStory {
|
|
10
|
+
readonly raw: tl.RawMessageMediaStory;
|
|
11
|
+
readonly _peers: PeersIndex;
|
|
12
|
+
readonly type: "story";
|
|
13
|
+
constructor(raw: tl.RawMessageMediaStory, _peers: PeersIndex);
|
|
14
|
+
/**
|
|
15
|
+
* Whether this story was automatically forwarded to you
|
|
16
|
+
* because you were mentioned in it
|
|
17
|
+
*/
|
|
18
|
+
get isMention(): boolean;
|
|
19
|
+
/**
|
|
20
|
+
* Peer who has posted this story
|
|
21
|
+
*/
|
|
22
|
+
get peer(): Peer;
|
|
23
|
+
/**
|
|
24
|
+
* ID of the story
|
|
25
|
+
*/
|
|
26
|
+
get storyId(): number;
|
|
27
|
+
/**
|
|
28
|
+
* Contents of the story. May not be available, in which case the story
|
|
29
|
+
* should be fetched using {@link getStoriesById}
|
|
30
|
+
*/
|
|
31
|
+
get story(): Story | null;
|
|
32
|
+
get inputMedia(): tl.TypeInputMedia;
|
|
33
|
+
}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { tl } from '@mtcute/tl';
|
|
2
|
+
import { FileLocation } from '../files/index.js';
|
|
3
|
+
/**
|
|
4
|
+
* One size of some thumbnail
|
|
5
|
+
*/
|
|
6
|
+
export declare class Thumbnail extends FileLocation {
|
|
7
|
+
static readonly THUMB_100x100_BOX = "s";
|
|
8
|
+
static readonly THUMB_320x320_BOX = "m";
|
|
9
|
+
static readonly THUMB_800x800_BOX = "x";
|
|
10
|
+
static readonly THUMB_1280x1280_BOX = "y";
|
|
11
|
+
static readonly THUMB_2560x2560_BOX = "w";
|
|
12
|
+
static readonly THUMB_160x160_CROP = "a";
|
|
13
|
+
static readonly THUMB_320x320_CROP = "b";
|
|
14
|
+
static readonly THUMB_640x640_CROP = "c";
|
|
15
|
+
static readonly THUMB_1280x1280_CROP = "d";
|
|
16
|
+
static readonly THUMB_STRIP = "i";
|
|
17
|
+
static readonly THUMB_OUTLINE = "j";
|
|
18
|
+
/** Animated profile pictures preview */
|
|
19
|
+
static readonly THUMB_VIDEO_PROFILE = "u";
|
|
20
|
+
/** Trimmed and downscaled video previews */
|
|
21
|
+
static readonly THUMB_VIDEO_PREVIEW = "v";
|
|
22
|
+
/** Fullscreen animation for Premium stickers */
|
|
23
|
+
static readonly THUMB_VIDEO_FULLSCREEN = "f";
|
|
24
|
+
/** (non-standard) Emoji-based markup for profile photo */
|
|
25
|
+
static readonly THUMB_EMOJI_MARKUP = "pfp_em";
|
|
26
|
+
/** (non-standard) Sticker-based markup for profile photo */
|
|
27
|
+
static readonly THUMB_STICKER_MARKUP = "pfp_st";
|
|
28
|
+
readonly raw: tl.TypePhotoSize | tl.TypeVideoSize;
|
|
29
|
+
/**
|
|
30
|
+
* Thumbnail width
|
|
31
|
+
* (`NaN` for {@link THUMB_OUTLINE} and {@link THUMB_STRIP})
|
|
32
|
+
*/
|
|
33
|
+
readonly width: number;
|
|
34
|
+
/**
|
|
35
|
+
* Thumbnail height
|
|
36
|
+
* (`NaN` for {@link THUMB_OUTLINE} and {@link THUMB_STRIP})
|
|
37
|
+
*/
|
|
38
|
+
readonly height: number;
|
|
39
|
+
private _path?;
|
|
40
|
+
private _media;
|
|
41
|
+
constructor(media: tl.RawPhoto | tl.RawDocument | tl.RawStickerSet | tl.RawMessageExtendedMediaPreview, sz: tl.TypePhotoSize | tl.TypeVideoSize);
|
|
42
|
+
get isVideo(): boolean;
|
|
43
|
+
/**
|
|
44
|
+
* Thumbnail type
|
|
45
|
+
*/
|
|
46
|
+
get type(): string;
|
|
47
|
+
/**
|
|
48
|
+
* If {@link raw} is `tl.RawPhotoPathSize` (i.e. `raw.type === Thumbnail.THUMB_OUTLINE`),
|
|
49
|
+
* this property will return raw SVG path of the preview.
|
|
50
|
+
*
|
|
51
|
+
* When downloading path thumbnails, a valid SVG file is returned.
|
|
52
|
+
*
|
|
53
|
+
* See also: https://core.telegram.org/api/files#vector-thumbnails
|
|
54
|
+
*
|
|
55
|
+
* @throws MtTypeAssertionError In case {@link raw} is not `tl.RawPhotoPathSize`
|
|
56
|
+
*/
|
|
57
|
+
get path(): string;
|
|
58
|
+
/**
|
|
59
|
+
* Get TDLib and Bot API compatible File ID
|
|
60
|
+
* representing this thumbnail.
|
|
61
|
+
*
|
|
62
|
+
* > **Note:** You can't use this file id to send a thumbnail,
|
|
63
|
+
* > only to download it.
|
|
64
|
+
*/
|
|
65
|
+
get fileId(): string;
|
|
66
|
+
/**
|
|
67
|
+
* Get a unique File ID representing this thumbnail.
|
|
68
|
+
*/
|
|
69
|
+
get uniqueFileId(): string;
|
|
70
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { tl } from '@mtcute/tl';
|
|
2
|
+
import { Location } from './location.js';
|
|
3
|
+
export interface VenueSource {
|
|
4
|
+
/**
|
|
5
|
+
* Provider name (`foursquare` or `gplaces` for Google Places)
|
|
6
|
+
*/
|
|
7
|
+
provider?: 'foursquare' | 'gplaces';
|
|
8
|
+
/**
|
|
9
|
+
* Venue ID in the provider's DB
|
|
10
|
+
*/
|
|
11
|
+
id: string;
|
|
12
|
+
/**
|
|
13
|
+
* Venue type in the provider's DB
|
|
14
|
+
*
|
|
15
|
+
* - [Supported types for Foursquare](https://developer.foursquare.com/docs/build-with-foursquare/categories/)
|
|
16
|
+
* (use names, lowercase them, replace spaces and " & " with `_` (underscore) and remove other symbols,
|
|
17
|
+
* and use `/` (slash) as hierarchy separator)
|
|
18
|
+
* - [Supported types for Google Places](https://developers.google.com/places/web-service/supported_types)
|
|
19
|
+
*/
|
|
20
|
+
type: string;
|
|
21
|
+
}
|
|
22
|
+
export declare class Venue {
|
|
23
|
+
readonly raw: tl.RawMessageMediaVenue;
|
|
24
|
+
readonly type: "venue";
|
|
25
|
+
constructor(raw: tl.RawMessageMediaVenue);
|
|
26
|
+
/**
|
|
27
|
+
* Geolocation of the venue
|
|
28
|
+
*/
|
|
29
|
+
get location(): Location;
|
|
30
|
+
/**
|
|
31
|
+
* Venue name
|
|
32
|
+
*/
|
|
33
|
+
get title(): string;
|
|
34
|
+
/**
|
|
35
|
+
* Venue address
|
|
36
|
+
*/
|
|
37
|
+
get address(): string;
|
|
38
|
+
/**
|
|
39
|
+
* When available, source from where this venue was acquired
|
|
40
|
+
*/
|
|
41
|
+
get source(): VenueSource | null;
|
|
42
|
+
/**
|
|
43
|
+
* Input media TL object generated from this object,
|
|
44
|
+
* to be used inside {@link InputMediaLike} and
|
|
45
|
+
* {@link TelegramClient.sendMedia}
|
|
46
|
+
*
|
|
47
|
+
* A few notes:
|
|
48
|
+
* - Using this will result in an
|
|
49
|
+
* independent poll, which will not
|
|
50
|
+
* be auto-updated with the current.
|
|
51
|
+
* - If this is a quiz, a normal poll
|
|
52
|
+
* will be returned since the client does not
|
|
53
|
+
* know the correct answer.
|
|
54
|
+
* - This always returns a non-closed poll,
|
|
55
|
+
* even if the current poll was closed
|
|
56
|
+
*/
|
|
57
|
+
get inputMedia(): tl.TypeInputMedia;
|
|
58
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { tl } from '@mtcute/tl';
|
|
2
|
+
import { tdFileId } from '@mtcute/file-id';
|
|
3
|
+
import { RawDocument } from './document.js';
|
|
4
|
+
/**
|
|
5
|
+
* A video, round video message or GIF animation.
|
|
6
|
+
*
|
|
7
|
+
* **Note:** Legacy GIF animations are also wrapped with this class.
|
|
8
|
+
*/
|
|
9
|
+
export declare class Video extends RawDocument {
|
|
10
|
+
readonly attr: tl.RawDocumentAttributeVideo | tl.RawDocumentAttributeImageSize;
|
|
11
|
+
readonly media?: tl.RawMessageMediaDocument | undefined;
|
|
12
|
+
readonly type: "video";
|
|
13
|
+
protected _fileIdType(): tdFileId.FileType;
|
|
14
|
+
constructor(doc: tl.RawDocument, attr: tl.RawDocumentAttributeVideo | tl.RawDocumentAttributeImageSize, media?: tl.RawMessageMediaDocument | undefined);
|
|
15
|
+
/**
|
|
16
|
+
* Video width in pixels
|
|
17
|
+
*/
|
|
18
|
+
get width(): number;
|
|
19
|
+
/**
|
|
20
|
+
* Video height in pixels
|
|
21
|
+
*/
|
|
22
|
+
get height(): number;
|
|
23
|
+
/**
|
|
24
|
+
* Video duration in seconds.
|
|
25
|
+
*
|
|
26
|
+
* `0` for legacy GIFs
|
|
27
|
+
*/
|
|
28
|
+
get duration(): number;
|
|
29
|
+
/**
|
|
30
|
+
* Whether this video is an animated GIF
|
|
31
|
+
* (represented either by actual GIF or a silent MP4 video)
|
|
32
|
+
*/
|
|
33
|
+
get isAnimation(): boolean;
|
|
34
|
+
/**
|
|
35
|
+
* Whether this video is a round video message (aka video note)
|
|
36
|
+
*/
|
|
37
|
+
get isRound(): boolean;
|
|
38
|
+
/**
|
|
39
|
+
* Whether this video is a legacy GIF (i.e. its MIME is `image/gif`)
|
|
40
|
+
*/
|
|
41
|
+
get isLegacyGif(): boolean;
|
|
42
|
+
/** Whether this video is hidden with a spoiler */
|
|
43
|
+
get hasSpoiler(): boolean;
|
|
44
|
+
/** For self-destructing videos, TTL in seconds */
|
|
45
|
+
get ttlSeconds(): number | null;
|
|
46
|
+
get videoStartTs(): number | null;
|
|
47
|
+
get codec(): string | null;
|
|
48
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { tl } from '@mtcute/tl';
|
|
2
|
+
import { tdFileId } from '@mtcute/file-id';
|
|
3
|
+
import { RawDocument } from './document.js';
|
|
4
|
+
/**
|
|
5
|
+
* An voice note.
|
|
6
|
+
*/
|
|
7
|
+
export declare class Voice extends RawDocument {
|
|
8
|
+
readonly attr: tl.RawDocumentAttributeAudio;
|
|
9
|
+
readonly type: "voice";
|
|
10
|
+
protected _fileIdType(): tdFileId.FileType;
|
|
11
|
+
constructor(doc: tl.RawDocument, attr: tl.RawDocumentAttributeAudio);
|
|
12
|
+
/**
|
|
13
|
+
* Duration of the voice note in seconds.
|
|
14
|
+
*/
|
|
15
|
+
get duration(): number;
|
|
16
|
+
/**
|
|
17
|
+
* Voice note's waveform
|
|
18
|
+
*
|
|
19
|
+
* Represented with integers in range [0, 31],
|
|
20
|
+
* usually has length of 100
|
|
21
|
+
*/
|
|
22
|
+
get waveform(): number[];
|
|
23
|
+
}
|