@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,31 @@
|
|
|
1
|
+
import { tl } from '@mtcute/tl';
|
|
2
|
+
/**
|
|
3
|
+
* A phone contact
|
|
4
|
+
*/
|
|
5
|
+
export declare class Contact {
|
|
6
|
+
readonly obj: tl.RawMessageMediaContact;
|
|
7
|
+
readonly type: "contact";
|
|
8
|
+
constructor(obj: tl.RawMessageMediaContact);
|
|
9
|
+
/**
|
|
10
|
+
* Contact's phone number
|
|
11
|
+
*/
|
|
12
|
+
get phoneNumber(): string;
|
|
13
|
+
/**
|
|
14
|
+
* Contact's first name
|
|
15
|
+
*/
|
|
16
|
+
get firstName(): string;
|
|
17
|
+
/**
|
|
18
|
+
* Contact's last name
|
|
19
|
+
*/
|
|
20
|
+
get lastName(): string;
|
|
21
|
+
/**
|
|
22
|
+
* Contact's user ID in Telegram or `0` if not available
|
|
23
|
+
*/
|
|
24
|
+
get userId(): number;
|
|
25
|
+
/**
|
|
26
|
+
* Input media TL object generated from this object,
|
|
27
|
+
* to be used inside {@link InputMediaLike} and
|
|
28
|
+
* {@link TelegramClient.sendMedia}
|
|
29
|
+
*/
|
|
30
|
+
get inputMedia(): tl.TypeInputMedia;
|
|
31
|
+
}
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
import { tl } from '@mtcute/tl';
|
|
2
|
+
/**
|
|
3
|
+
* A dice or another interactive random emoji.
|
|
4
|
+
*/
|
|
5
|
+
export declare class Dice {
|
|
6
|
+
readonly obj: tl.RawMessageMediaDice;
|
|
7
|
+
readonly type: "dice";
|
|
8
|
+
/**
|
|
9
|
+
* A simple 6-sided dice.
|
|
10
|
+
*
|
|
11
|
+
* {@link value} represents its value (1-6)
|
|
12
|
+
*/
|
|
13
|
+
static readonly TYPE_DICE = "\uD83C\uDFB2";
|
|
14
|
+
/**
|
|
15
|
+
* A dart. Telegram dart has 4 rings and middle.
|
|
16
|
+
*
|
|
17
|
+
* {@link value} represents the position of the dart:
|
|
18
|
+
* 
|
|
19
|
+
*/
|
|
20
|
+
static readonly TYPE_DART = "\uD83C\uDFAF";
|
|
21
|
+
/**
|
|
22
|
+
* A basketball thrown into a hoop.
|
|
23
|
+
*
|
|
24
|
+
* {@link value} represents the motion of the ball:
|
|
25
|
+
* - 1: simple miss (ball hits right part, bounces to the left)
|
|
26
|
+
* - 2: first hit the ring, then miss
|
|
27
|
+
* - 3: ball gets stuck between the ring and the base
|
|
28
|
+
* - 4: first hit the ring, then score
|
|
29
|
+
* - 5: direct score
|
|
30
|
+
*/
|
|
31
|
+
static readonly TYPE_BASKETBALL = "\uD83C\uDFC0";
|
|
32
|
+
/**
|
|
33
|
+
* A football thrown to the gate.
|
|
34
|
+
*
|
|
35
|
+
* {@link value} represents the motion of the ball:
|
|
36
|
+
* - 1: flies above the top barbell
|
|
37
|
+
* - 2: hits right barbell, then miss
|
|
38
|
+
* - 3: direct score in the middle
|
|
39
|
+
* - 4: hits left barbell, then score, then hits right barbell
|
|
40
|
+
* - 5: score in the top-right corner
|
|
41
|
+
*/
|
|
42
|
+
static readonly TYPE_FOOTBALL = "\u26BD\uFE0F";
|
|
43
|
+
/**
|
|
44
|
+
* A bowling ball thrown to pins.
|
|
45
|
+
*
|
|
46
|
+
* Assuming the following identifiers for the pins:
|
|
47
|
+
* ```
|
|
48
|
+
* 4 5 6
|
|
49
|
+
* 2 3
|
|
50
|
+
* 1
|
|
51
|
+
* ```
|
|
52
|
+
*
|
|
53
|
+
* {@link value} represents the motion of the ball and pins:
|
|
54
|
+
* - 1: the ball touched 6th pin, none are down
|
|
55
|
+
* - 2: the ball hit 4th pin, only 4th pin is down.
|
|
56
|
+
* - 3: the ball hit 1st pin, pins 1, 2, 5 are down, leaving pins 3, 4, 6
|
|
57
|
+
* - 4: the ball hit 1st pin on the right side, all the pins except 2nd and 6th are down
|
|
58
|
+
* - 5: the ball hit 3rd pin and all the pins except 2nd are down.
|
|
59
|
+
* - 6: the ball hit 1st pin and all pins are down
|
|
60
|
+
*/
|
|
61
|
+
static readonly TYPE_BOWLING = "\uD83C\uDFB3";
|
|
62
|
+
/**
|
|
63
|
+
* A slot machine.
|
|
64
|
+
*
|
|
65
|
+
* {@link value} represents the result of the machine.
|
|
66
|
+
* Value itself is an integer in range `[1, 64]`,
|
|
67
|
+
* and is composed out of several parts.
|
|
68
|
+
*
|
|
69
|
+
* > **Note**: The following information is based on the TDesktop
|
|
70
|
+
* > implementation. These are the relevant files:
|
|
71
|
+
* > - [`chat_helpers/stickers_dice_pack.cpp`](https://github.com/telegramdesktop/tdesktop/blob/dev/Telegram/SourceFiles/chat_helpers/stickers_dice_pack.cpp)
|
|
72
|
+
* > - [`history/view/media/history_view_slot_machine.cpp`](https://github.com/telegramdesktop/tdesktop/blob/dev/Telegram/SourceFiles/history/view/media/history_view_slot_machine.cpp)
|
|
73
|
+
*
|
|
74
|
+
* Unlike other animated dices, this does not have
|
|
75
|
+
* all the possible combinations in the sticker set.
|
|
76
|
+
* Instead, `value` is a specially encoded integer that contains
|
|
77
|
+
* the information about the indexes.
|
|
78
|
+
*
|
|
79
|
+
* There are some base parts of the animations:
|
|
80
|
+
* - 0th sticker is the base background of the machine
|
|
81
|
+
* - 1st sticker is the background of the machine for the "winning" state (i.e. `777`)
|
|
82
|
+
* - 2nd sticker is the frame of the machine, including the handle
|
|
83
|
+
* - 8th sticker is the "idle" state for the left slot
|
|
84
|
+
* - 14th sticker is the "idle" state for the middle slot
|
|
85
|
+
* - 20th sticker is the "idle" state for the right slot
|
|
86
|
+
*
|
|
87
|
+
* The machine result is encoded as 3 concatenated two-bit integers,
|
|
88
|
+
* and the resulting integer is incremented by one.
|
|
89
|
+
*
|
|
90
|
+
* So, to decode the value to its parts, you can use this code:
|
|
91
|
+
* ```typescript
|
|
92
|
+
* const computePartValue = (val: number, idx: number) => ((val - 1) >> (idx * 2)) & 0x03; // 0..3
|
|
93
|
+
* const parts = [
|
|
94
|
+
* computePartValue(msg.media.value, 0),
|
|
95
|
+
* computePartValue(msg.media.value, 1),
|
|
96
|
+
* computePartValue(msg.media.value, 2),
|
|
97
|
+
* ]
|
|
98
|
+
* ```
|
|
99
|
+
*
|
|
100
|
+
* Each part of the value corresponds to a particular slot (i.e. part 0 is left slot,
|
|
101
|
+
* part 1 is middle, part 2 is right). The slot values are as follows:
|
|
102
|
+
* - 0: BAR (displayed as a *BAR* sign on a black background)
|
|
103
|
+
* - 1: BERRIES (displayed as berries, similar to emoji 🍇)
|
|
104
|
+
* - 2: LEMON (displayed as a lemon, similar to emoji 🍋)
|
|
105
|
+
* - 3: SEVEN (displayed as a red digit 7)
|
|
106
|
+
*
|
|
107
|
+
* Therefore, the winning value (i.e. `777`) is represented as `(3 << 4 | 3 << 2 | 3 << 0) + 1 = 64`
|
|
108
|
+
*
|
|
109
|
+
* To determine the needed animation parts, you'll need to apply some shifts.
|
|
110
|
+
* These are the offsets for the individual symbols:
|
|
111
|
+
* - WIN_SEVEN: 0
|
|
112
|
+
* - SEVEN: 1
|
|
113
|
+
* - BAR: 2
|
|
114
|
+
* - BERRIES: 3
|
|
115
|
+
* - LEMON: 4
|
|
116
|
+
*
|
|
117
|
+
* And these are the shifts for each slot:
|
|
118
|
+
* - LEFT: 3
|
|
119
|
+
* - MIDDLE: 9
|
|
120
|
+
* - RIGHT: 15
|
|
121
|
+
*
|
|
122
|
+
* > WIN_SEVEN is the same as SEVEN, but only used if the machine result is `777` (i.e. `value = 64`),
|
|
123
|
+
* > as it contains additional "blinking" animation.
|
|
124
|
+
*
|
|
125
|
+
* The sticker index is computed as follows: `SHIFTS[SLOT] + OFFSETS[SYM]`.
|
|
126
|
+
* For example, berries for the middle slot would be: `SHIFTS[MIDDLE] + OFFSETS[BERRIES] = 9 + 3 = 12`
|
|
127
|
+
*
|
|
128
|
+
* Currently, this sticker set is used for the machine: [SlotMachineAnimated](https://t.me/addstickers/SlotMachineAnimated)
|
|
129
|
+
*/
|
|
130
|
+
static readonly TYPE_SLOTS = "\uD83C\uDFB0";
|
|
131
|
+
constructor(obj: tl.RawMessageMediaDice);
|
|
132
|
+
/**
|
|
133
|
+
* An emoji which was originally sent.
|
|
134
|
+
*
|
|
135
|
+
* See static members of {@link Dice} for a list
|
|
136
|
+
* of possible values
|
|
137
|
+
*/
|
|
138
|
+
get emoji(): string;
|
|
139
|
+
/**
|
|
140
|
+
* Emoji's interactive value.
|
|
141
|
+
*
|
|
142
|
+
* See what this value represents in the corresponding
|
|
143
|
+
* type's documentation (in {@link Dice} static fields)
|
|
144
|
+
*/
|
|
145
|
+
get value(): number;
|
|
146
|
+
/**
|
|
147
|
+
* Input media TL object generated from this object,
|
|
148
|
+
* to be used inside {@link InputMediaLike} and
|
|
149
|
+
* {@link TelegramClient.sendMedia}
|
|
150
|
+
*
|
|
151
|
+
* Note that when you use this media, a new `value`
|
|
152
|
+
* will be generated!
|
|
153
|
+
*/
|
|
154
|
+
get inputMedia(): tl.TypeInputMedia;
|
|
155
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { tl } from '@mtcute/tl';
|
|
2
|
+
import { Audio } from './audio.js';
|
|
3
|
+
import { Document } from './document.js';
|
|
4
|
+
import { Sticker } from './sticker.js';
|
|
5
|
+
import { Video } from './video.js';
|
|
6
|
+
import { Voice } from './voice.js';
|
|
7
|
+
export type ParsedDocument = Sticker | Voice | Audio | Video | Document;
|
|
8
|
+
/** @internal */
|
|
9
|
+
export declare function parseSticker(doc: tl.RawDocument): Sticker | undefined;
|
|
10
|
+
/** @internal */
|
|
11
|
+
export declare function parseDocument(doc: tl.RawDocument, media?: tl.RawMessageMediaDocument): ParsedDocument;
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { tl } from '@mtcute/tl';
|
|
2
|
+
import { tdFileId as td } from '@mtcute/file-id';
|
|
3
|
+
import { FileLocation } from '../files/index.js';
|
|
4
|
+
import { Thumbnail } from './thumbnail.js';
|
|
5
|
+
/**
|
|
6
|
+
* A file that is represented as a document in MTProto.
|
|
7
|
+
*
|
|
8
|
+
* This also includes audios, videos, voices etc.
|
|
9
|
+
*/
|
|
10
|
+
export declare abstract class RawDocument extends FileLocation {
|
|
11
|
+
readonly raw: tl.RawDocument;
|
|
12
|
+
/** Type of the media (for use in a tagged union) */
|
|
13
|
+
abstract type: string;
|
|
14
|
+
constructor(raw: tl.RawDocument);
|
|
15
|
+
/**
|
|
16
|
+
* Original file name, extracted from the document
|
|
17
|
+
* attributes.
|
|
18
|
+
*/
|
|
19
|
+
get fileName(): string | null;
|
|
20
|
+
/**
|
|
21
|
+
* File MIME type, as defined by the sender.
|
|
22
|
+
*/
|
|
23
|
+
get mimeType(): string;
|
|
24
|
+
/**
|
|
25
|
+
* Date the document was sent
|
|
26
|
+
*/
|
|
27
|
+
get date(): Date;
|
|
28
|
+
/**
|
|
29
|
+
* Available thumbnails, if any.
|
|
30
|
+
*
|
|
31
|
+
* If there are no thumbnails, the array will be empty.
|
|
32
|
+
*/
|
|
33
|
+
get thumbnails(): ReadonlyArray<Thumbnail>;
|
|
34
|
+
/**
|
|
35
|
+
* Get a thumbnail by its type.
|
|
36
|
+
*
|
|
37
|
+
* Thumbnail types are described in the
|
|
38
|
+
* [Telegram docs](https://core.telegram.org/api/files#image-thumbnail-types),
|
|
39
|
+
* and are also available as static members of {@link Thumbnail} for convenience.
|
|
40
|
+
*
|
|
41
|
+
* @param type Thumbnail type
|
|
42
|
+
*/
|
|
43
|
+
getThumbnail(type: string): Thumbnail | null;
|
|
44
|
+
/**
|
|
45
|
+
* Input document TL object generated from this object,
|
|
46
|
+
* to be used with methods that use it
|
|
47
|
+
*/
|
|
48
|
+
get inputDocument(): tl.TypeInputDocument;
|
|
49
|
+
/**
|
|
50
|
+
* Input media TL object generated from this object,
|
|
51
|
+
* to be used inside {@link InputMediaLike} and
|
|
52
|
+
* {@link TelegramClient.sendMedia}
|
|
53
|
+
*/
|
|
54
|
+
get inputMedia(): tl.TypeInputMedia;
|
|
55
|
+
protected _fileIdType(): td.FileType;
|
|
56
|
+
/**
|
|
57
|
+
* Get TDLib and Bot API compatible File ID
|
|
58
|
+
* representing this document.
|
|
59
|
+
*/
|
|
60
|
+
get fileId(): string;
|
|
61
|
+
/**
|
|
62
|
+
* Get a unique File ID representing this document.
|
|
63
|
+
*/
|
|
64
|
+
get uniqueFileId(): string;
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* A generic file.
|
|
68
|
+
*
|
|
69
|
+
* This does not include audios, videos, voices etc.
|
|
70
|
+
* and only used for documents without any special
|
|
71
|
+
* attributes.
|
|
72
|
+
*/
|
|
73
|
+
export declare class Document extends RawDocument {
|
|
74
|
+
readonly type: "document";
|
|
75
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { tl } from '@mtcute/tl';
|
|
2
|
+
import { Thumbnail } from './thumbnail.js';
|
|
3
|
+
export declare class ExtendedMediaPreview {
|
|
4
|
+
readonly raw: tl.RawMessageExtendedMediaPreview;
|
|
5
|
+
constructor(raw: tl.RawMessageExtendedMediaPreview);
|
|
6
|
+
/**
|
|
7
|
+
* Width of the preview, in pixels (if available, else 0)
|
|
8
|
+
*/
|
|
9
|
+
get width(): number;
|
|
10
|
+
/**
|
|
11
|
+
* Height of the preview, in pixels (if available, else 0)
|
|
12
|
+
*/
|
|
13
|
+
get height(): number;
|
|
14
|
+
get thumbnail(): Thumbnail | null;
|
|
15
|
+
/**
|
|
16
|
+
* If this is a video, the duration of the video,
|
|
17
|
+
* in seconds (if available, else 0)
|
|
18
|
+
*/
|
|
19
|
+
get videoDuration(): number;
|
|
20
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { tl } from '@mtcute/tl';
|
|
2
|
+
import { Photo } from './photo.js';
|
|
3
|
+
import { Video } from './video.js';
|
|
4
|
+
export declare class Game {
|
|
5
|
+
readonly game: tl.RawGame;
|
|
6
|
+
readonly type: "game";
|
|
7
|
+
constructor(game: tl.RawGame);
|
|
8
|
+
/**
|
|
9
|
+
* Unique identifier of the game.
|
|
10
|
+
*/
|
|
11
|
+
get id(): tl.Long;
|
|
12
|
+
/**
|
|
13
|
+
* Title of the game
|
|
14
|
+
*/
|
|
15
|
+
get title(): string;
|
|
16
|
+
/**
|
|
17
|
+
* Description of the game
|
|
18
|
+
*/
|
|
19
|
+
get description(): string;
|
|
20
|
+
/**
|
|
21
|
+
* Unique short name of the game
|
|
22
|
+
*/
|
|
23
|
+
get shortName(): string;
|
|
24
|
+
/**
|
|
25
|
+
* Photo that will be displayed in the game message in chats
|
|
26
|
+
*/
|
|
27
|
+
get photo(): Photo | null;
|
|
28
|
+
/**
|
|
29
|
+
* Animation that will be displayed in the game message in chats
|
|
30
|
+
*/
|
|
31
|
+
get animation(): Video | null;
|
|
32
|
+
/**
|
|
33
|
+
* Input media TL object generated from this object,
|
|
34
|
+
* to be used inside {@link InputMediaLike} and
|
|
35
|
+
* {@link TelegramClient.sendMedia}
|
|
36
|
+
*/
|
|
37
|
+
get inputMedia(): tl.TypeInputMedia;
|
|
38
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export * from './audio.js';
|
|
2
|
+
export * from './contact.js';
|
|
3
|
+
export * from './dice.js';
|
|
4
|
+
export * from './document.js';
|
|
5
|
+
export * from './extended-media.js';
|
|
6
|
+
export * from './game.js';
|
|
7
|
+
export * from './input-media/index.js';
|
|
8
|
+
export * from './invoice.js';
|
|
9
|
+
export * from './location.js';
|
|
10
|
+
export * from './paid-media.js';
|
|
11
|
+
export * from './photo.js';
|
|
12
|
+
export * from './poll.js';
|
|
13
|
+
export * from './sticker.js';
|
|
14
|
+
export * from './story.js';
|
|
15
|
+
export * from './thumbnail.js';
|
|
16
|
+
export * from './venue.js';
|
|
17
|
+
export * from './video.js';
|
|
18
|
+
export * from './voice.js';
|
|
19
|
+
export * from './web-page.js';
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
import { tl } from '@mtcute/tl';
|
|
2
|
+
import { InputFileLike } from '../../files/utils.js';
|
|
3
|
+
import { CaptionMixin, InputMediaAudio, InputMediaAuto, InputMediaContact, InputMediaDice, InputMediaDocument, InputMediaGame, InputMediaGeo, InputMediaGeoLive, InputMediaInvoice, InputMediaLike, InputMediaPaidMedia, InputMediaPhoto, InputMediaPoll, InputMediaQuiz, InputMediaSticker, InputMediaStory, InputMediaVenue, InputMediaVideo, InputMediaVoice, InputMediaWebpage } from './types.js';
|
|
4
|
+
/** Omit `type` and `file` from the given type */
|
|
5
|
+
export type OmitTypeAndFile<T extends InputMediaLike, K extends keyof T = never> = Omit<T, 'type' | 'file' | K>;
|
|
6
|
+
/**
|
|
7
|
+
* Create an animation to be sent
|
|
8
|
+
*
|
|
9
|
+
* @param file Animation
|
|
10
|
+
* @param params Additional parameters
|
|
11
|
+
*/
|
|
12
|
+
export declare function animation(file: InputFileLike, params?: OmitTypeAndFile<InputMediaVideo>): InputMediaVideo;
|
|
13
|
+
/**
|
|
14
|
+
* Create an audio to be sent
|
|
15
|
+
*
|
|
16
|
+
* @param file Audio file
|
|
17
|
+
* @param params Additional parameters
|
|
18
|
+
*/
|
|
19
|
+
export declare function audio(file: InputFileLike, params?: OmitTypeAndFile<InputMediaAudio>): InputMediaAudio;
|
|
20
|
+
/**
|
|
21
|
+
* Create an document to be sent
|
|
22
|
+
*
|
|
23
|
+
* @param file Document
|
|
24
|
+
* @param params Additional parameters
|
|
25
|
+
*/
|
|
26
|
+
export declare function document(file: InputFileLike, params?: OmitTypeAndFile<InputMediaDocument>): InputMediaDocument;
|
|
27
|
+
/**
|
|
28
|
+
* Create an photo to be sent
|
|
29
|
+
*
|
|
30
|
+
* @param file Photo
|
|
31
|
+
* @param params Additional parameters
|
|
32
|
+
*/
|
|
33
|
+
export declare function photo(file: InputFileLike, params?: OmitTypeAndFile<InputMediaPhoto>): InputMediaPhoto;
|
|
34
|
+
/**
|
|
35
|
+
* Create an video to be sent
|
|
36
|
+
*
|
|
37
|
+
* @param file Video
|
|
38
|
+
* @param params Additional parameters
|
|
39
|
+
*/
|
|
40
|
+
export declare function video(file: InputFileLike, params?: OmitTypeAndFile<InputMediaVideo>): InputMediaVideo;
|
|
41
|
+
/**
|
|
42
|
+
* Create a voice note to be sent
|
|
43
|
+
*
|
|
44
|
+
* @param file Voice note
|
|
45
|
+
* @param params Additional parameters
|
|
46
|
+
*/
|
|
47
|
+
export declare function voice(file: InputFileLike, params?: OmitTypeAndFile<InputMediaVoice>): InputMediaVoice;
|
|
48
|
+
/**
|
|
49
|
+
* Create a sticker to be sent
|
|
50
|
+
*
|
|
51
|
+
* @param file Sticker
|
|
52
|
+
* @param params Additional parameters
|
|
53
|
+
*/
|
|
54
|
+
export declare function sticker(file: InputFileLike, params?: OmitTypeAndFile<InputMediaSticker>): InputMediaSticker;
|
|
55
|
+
/**
|
|
56
|
+
* Create a venue to be sent
|
|
57
|
+
*
|
|
58
|
+
* @param params Venue parameters
|
|
59
|
+
*/
|
|
60
|
+
export declare function venue(params: OmitTypeAndFile<InputMediaVenue>): InputMediaVenue;
|
|
61
|
+
/**
|
|
62
|
+
* Create a geolocation to be sent
|
|
63
|
+
*
|
|
64
|
+
* @param latitude Latitude of the location
|
|
65
|
+
* @param longitude Longitude of the location
|
|
66
|
+
* @param params Additional parameters
|
|
67
|
+
*/
|
|
68
|
+
export declare function geo(latitude: number, longitude: number, params?: OmitTypeAndFile<InputMediaGeo, 'latitude' | 'longitude'>): InputMediaGeo;
|
|
69
|
+
/**
|
|
70
|
+
* Create a live geolocation to be sent
|
|
71
|
+
*
|
|
72
|
+
* @param latitude Latitude of the current location
|
|
73
|
+
* @param longitude Longitude of the current location
|
|
74
|
+
* @param params Additional parameters
|
|
75
|
+
*/
|
|
76
|
+
export declare function geoLive(latitude: number, longitude: number, params?: OmitTypeAndFile<InputMediaGeoLive, 'latitude' | 'longitude'>): InputMediaGeoLive;
|
|
77
|
+
/**
|
|
78
|
+
* Create a dice to be sent
|
|
79
|
+
*
|
|
80
|
+
* For convenience, known dice emojis are available
|
|
81
|
+
* as static members of {@link Dice}.
|
|
82
|
+
*
|
|
83
|
+
* @param emoji Emoji representing the dice
|
|
84
|
+
* @param params Additional parameters
|
|
85
|
+
*/
|
|
86
|
+
export declare function dice(emoji: string, params: CaptionMixin): InputMediaDice;
|
|
87
|
+
/**
|
|
88
|
+
* Create a contact to be sent
|
|
89
|
+
*
|
|
90
|
+
* @param params Contact parameters
|
|
91
|
+
*/
|
|
92
|
+
export declare function contact(params: OmitTypeAndFile<InputMediaContact>): InputMediaContact;
|
|
93
|
+
/**
|
|
94
|
+
* Create a game to be sent
|
|
95
|
+
*
|
|
96
|
+
* @param game Game short name or TL object representing one
|
|
97
|
+
*/
|
|
98
|
+
export declare function game(game: string | tl.TypeInputGame): InputMediaGame;
|
|
99
|
+
/**
|
|
100
|
+
* Create an invoice to be sent
|
|
101
|
+
*
|
|
102
|
+
* @param params Invoice parameters
|
|
103
|
+
*/
|
|
104
|
+
export declare function invoice(params: OmitTypeAndFile<InputMediaInvoice>): InputMediaInvoice;
|
|
105
|
+
/**
|
|
106
|
+
* Create a poll to be sent
|
|
107
|
+
*
|
|
108
|
+
* @param params Poll parameters
|
|
109
|
+
*/
|
|
110
|
+
export declare function poll(params: OmitTypeAndFile<InputMediaPoll>): InputMediaPoll;
|
|
111
|
+
/**
|
|
112
|
+
* Create a quiz to be sent
|
|
113
|
+
*
|
|
114
|
+
* @param params Quiz parameters
|
|
115
|
+
*/
|
|
116
|
+
export declare function quiz(params: OmitTypeAndFile<InputMediaQuiz>): InputMediaQuiz;
|
|
117
|
+
/**
|
|
118
|
+
* Create a story to be sent
|
|
119
|
+
*
|
|
120
|
+
* @param params Story parameters
|
|
121
|
+
*/
|
|
122
|
+
export declare function story(params: OmitTypeAndFile<InputMediaStory>): InputMediaStory;
|
|
123
|
+
/**
|
|
124
|
+
* Create a webpage to be sent
|
|
125
|
+
*
|
|
126
|
+
* @param url Webpage URL
|
|
127
|
+
* @param params Additional parameters
|
|
128
|
+
*/
|
|
129
|
+
export declare function webpage(url: string, params?: OmitTypeAndFile<InputMediaWebpage, 'url'>): InputMediaWebpage;
|
|
130
|
+
export declare function paid(params: OmitTypeAndFile<InputMediaPaidMedia>): InputMediaPaidMedia;
|
|
131
|
+
/**
|
|
132
|
+
* Create a document to be sent, which subtype
|
|
133
|
+
* is inferred automatically by file contents.
|
|
134
|
+
*
|
|
135
|
+
* Photo type is only inferred for reused files,
|
|
136
|
+
* newly uploaded photos with `auto` will be
|
|
137
|
+
* uploaded as a document
|
|
138
|
+
*
|
|
139
|
+
* @param file The media file
|
|
140
|
+
* @param params Additional parameters
|
|
141
|
+
*/
|
|
142
|
+
export declare function auto(file: InputFileLike, params?: OmitTypeAndFile<InputMediaAuto>): InputMediaAuto;
|