@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,49 @@
|
|
|
1
|
+
import { tl } from '@mtcute/tl';
|
|
2
|
+
import { PeersIndex } from './peers-index.js';
|
|
3
|
+
import { Chat } from './chat.js';
|
|
4
|
+
import { User } from './user.js';
|
|
5
|
+
/**
|
|
6
|
+
* More extensive peer types, that differentiate between
|
|
7
|
+
* users and bots, channels and supergroups.
|
|
8
|
+
*/
|
|
9
|
+
export type PeerType = 'user' | 'bot' | 'group' | 'channel' | 'supergroup';
|
|
10
|
+
/**
|
|
11
|
+
* Type that can be used as an input peer to most of the high-level methods. Can be:
|
|
12
|
+
* - `number`, representing peer's marked ID*
|
|
13
|
+
* - `string`, representing peer's username (without preceding `@`)
|
|
14
|
+
* - `string`, representing user's phone number
|
|
15
|
+
* - `"me"` and `"self"` which will be replaced with the current user/bot
|
|
16
|
+
* - Any object with `inputPeer: tl.TypeInputPeer` property
|
|
17
|
+
* - Raw TL object
|
|
18
|
+
*
|
|
19
|
+
* > * Telegram has moved to int64 IDs. Though, Levin [has confirmed](https://t.me/tdlibchat/25071)
|
|
20
|
+
* > that new IDs *will* still fit into int53, meaning JS integers are fine.
|
|
21
|
+
*/
|
|
22
|
+
export type InputPeerLike = string | number | tl.TypePeer | tl.TypeInputPeer | tl.TypeInputUser | tl.TypeInputChannel | {
|
|
23
|
+
inputPeer: tl.TypeInputPeer;
|
|
24
|
+
};
|
|
25
|
+
/**
|
|
26
|
+
* Peer (a user or a chat)
|
|
27
|
+
*
|
|
28
|
+
* Type of the peer can be determined by the `.type` property
|
|
29
|
+
*/
|
|
30
|
+
export type Peer = User | Chat;
|
|
31
|
+
/**
|
|
32
|
+
* An object representing an anonymous sender (e.g. for users that have forwards hidden)
|
|
33
|
+
*/
|
|
34
|
+
export interface AnonymousSender {
|
|
35
|
+
readonly type: 'anonymous';
|
|
36
|
+
/**
|
|
37
|
+
* Name of the anonymous sender that should be displayed
|
|
38
|
+
*/
|
|
39
|
+
readonly displayName: string;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Object representing a sender of a forwarded message,
|
|
43
|
+
* which can be either a {@link Peer} or an {@link AnonymousSender}
|
|
44
|
+
*/
|
|
45
|
+
export type PeerSender = Peer | AnonymousSender;
|
|
46
|
+
/**
|
|
47
|
+
* Given a `tl.TypePeer`, return a {@link Peer} object ({@link User} or {@link Chat})
|
|
48
|
+
*/
|
|
49
|
+
export declare function parsePeer(peer: tl.TypePeer, index: PeersIndex): Peer;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { tl } from '@mtcute/tl';
|
|
2
|
+
export declare class PeersIndex {
|
|
3
|
+
readonly users: Map<number, tl.TypeUser>;
|
|
4
|
+
readonly chats: Map<number, tl.TypeChat>;
|
|
5
|
+
constructor(users?: Map<number, tl.TypeUser>, chats?: Map<number, tl.TypeChat>);
|
|
6
|
+
hasMin: boolean;
|
|
7
|
+
static from(obj: {
|
|
8
|
+
users?: tl.TypeUser[];
|
|
9
|
+
chats?: tl.TypeChat[];
|
|
10
|
+
}): PeersIndex;
|
|
11
|
+
get empty(): boolean;
|
|
12
|
+
user(id: number): tl.TypeUser;
|
|
13
|
+
chat(id: number): tl.TypeChat;
|
|
14
|
+
get(peer: tl.TypePeer): tl.TypeUser | tl.TypeChat;
|
|
15
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* User typing status. Used to provide detailed
|
|
3
|
+
* information about chat partners' actions:
|
|
4
|
+
* typing messages, recording/uploading attachments, etc.
|
|
5
|
+
*
|
|
6
|
+
* Can be:
|
|
7
|
+
* - `typing`: User is typing
|
|
8
|
+
* - `cancel`: User is not doing anything (used to cancel previously sent status)
|
|
9
|
+
* - `record_video`: User is recording a video
|
|
10
|
+
* - `upload_video`: User is uploading a video
|
|
11
|
+
* - `record_voice`: User is recording a voice message
|
|
12
|
+
* - `upload_voice`: User is uploading a voice message
|
|
13
|
+
* - `upload_photo`: User is uploading a photo
|
|
14
|
+
* - `upload_document`: User is uploading a document
|
|
15
|
+
* - `geo`: User is choosing a geolocation to share
|
|
16
|
+
* - `contact`: User is choosing a contact to share
|
|
17
|
+
* - `game`: User is playing a game
|
|
18
|
+
* - `record_round`: User is recording a round video message
|
|
19
|
+
* - `upload_round`: User is uploading a round video message
|
|
20
|
+
* - `speak_call`: User is speaking in a group call
|
|
21
|
+
* - `history_import`: User is importing history
|
|
22
|
+
* - `sticker`: User is choosing a sticker
|
|
23
|
+
* - `interaction`: User has sent an emoji interaction
|
|
24
|
+
* - `interaction_seen`: User is watching a previously sent emoji interaction
|
|
25
|
+
*/
|
|
26
|
+
export type TypingStatus = 'typing' | 'cancel' | 'record_video' | 'upload_video' | 'record_voice' | 'upload_voice' | 'upload_photo' | 'upload_document' | 'geo' | 'contact' | 'game' | 'record_round' | 'upload_round' | 'speak_call' | 'history_import' | 'sticker' | 'interaction' | 'interaction_seen';
|
|
@@ -0,0 +1,268 @@
|
|
|
1
|
+
import { tl } from '@mtcute/tl';
|
|
2
|
+
import { MessageEntity } from '../messages/message-entity.js';
|
|
3
|
+
import { EmojiStatus } from '../reactions/emoji-status.js';
|
|
4
|
+
import { ChatColors } from './chat-colors.js';
|
|
5
|
+
import { ChatPhoto } from './chat-photo.js';
|
|
6
|
+
/**
|
|
7
|
+
* User's Last Seen & Online status.
|
|
8
|
+
* Can be one of the following:
|
|
9
|
+
* - `online`, user is online right now.
|
|
10
|
+
* - `offline`, user is currently offline.
|
|
11
|
+
* - `recently`, user with hidden last seen time who was online between 1 second and 72 hours ago.
|
|
12
|
+
* - `within_week`, user with hidden last seen time who was online between 72 hours and 7 days ago.
|
|
13
|
+
* - `within_month`, user with hidden last seen time who was online between 7 days and a month ago.
|
|
14
|
+
* - `long_time_ago`, blocked user or user with hidden last seen time who was online more than a month ago.
|
|
15
|
+
* - `bot`, for bots.
|
|
16
|
+
*/
|
|
17
|
+
export type UserStatus = 'online' | 'offline' | 'recently' | 'within_week' | 'within_month' | 'long_time_ago' | 'bot';
|
|
18
|
+
export interface UserParsedStatus {
|
|
19
|
+
status: UserStatus;
|
|
20
|
+
lastOnline: Date | null;
|
|
21
|
+
nextOffline: Date | null;
|
|
22
|
+
byMe: boolean;
|
|
23
|
+
}
|
|
24
|
+
export declare class User {
|
|
25
|
+
readonly type: "user";
|
|
26
|
+
/**
|
|
27
|
+
* Underlying raw TL object
|
|
28
|
+
*/
|
|
29
|
+
readonly raw: tl.RawUser;
|
|
30
|
+
constructor(user: tl.TypeUser);
|
|
31
|
+
/** Unique identifier for this user or bot */
|
|
32
|
+
get id(): number;
|
|
33
|
+
/**
|
|
34
|
+
* Whether this user's information is incomplete.
|
|
35
|
+
*
|
|
36
|
+
* This usually only happens in large chats, where
|
|
37
|
+
* the server sometimes sends only a part of the user's
|
|
38
|
+
* information. Basic info like name and profile photo
|
|
39
|
+
* are always available, but other fields may be omitted
|
|
40
|
+
* despite being available.
|
|
41
|
+
*
|
|
42
|
+
* For a rough list of fields that may be missing, see the
|
|
43
|
+
* [official docs](https://core.telegram.org/constructor/user).
|
|
44
|
+
*
|
|
45
|
+
* This currently only ever happens for non-bot users, so if you are building
|
|
46
|
+
* a normal bot, you can safely ignore this field.
|
|
47
|
+
*
|
|
48
|
+
* To fetch the "complete" user information, use one of these methods:
|
|
49
|
+
* - {@link TelegramClient.getUsers}
|
|
50
|
+
* - {@link TelegramClient.getChat}
|
|
51
|
+
* - {@link TelegramClient.getFullChat}.
|
|
52
|
+
*
|
|
53
|
+
* Learn more: [Incomplete peers](https://mtcute.dev/guide/topics/peers.html#incomplete-peers)
|
|
54
|
+
*/
|
|
55
|
+
get isMin(): boolean;
|
|
56
|
+
/** Whether this user is you yourself */
|
|
57
|
+
get isSelf(): boolean;
|
|
58
|
+
/** Whether this user is in your contacts */
|
|
59
|
+
get isContact(): boolean;
|
|
60
|
+
/** Whether you both have each other's contact */
|
|
61
|
+
get isMutualContact(): boolean;
|
|
62
|
+
/** Whether this user is in yout "close friends" list */
|
|
63
|
+
get isCloseFriend(): boolean;
|
|
64
|
+
/** Whether this user is deleted */
|
|
65
|
+
get isDeleted(): boolean;
|
|
66
|
+
/** Whether this user is a bot */
|
|
67
|
+
get isBot(): boolean;
|
|
68
|
+
/**
|
|
69
|
+
* Whether this user is a bot that can be connected to a
|
|
70
|
+
* Telegram Business account to receive its messages
|
|
71
|
+
*/
|
|
72
|
+
get isBusinessBot(): boolean;
|
|
73
|
+
/** Whether this user is a bot that has access to all messages */
|
|
74
|
+
get isBotWithHistory(): boolean;
|
|
75
|
+
/** Whether this user is a bot that can't be added to chats */
|
|
76
|
+
get isBotWithoutChats(): boolean;
|
|
77
|
+
/** Whether this bot offers an attachment menu web app */
|
|
78
|
+
get isBotWithAttachmentMenu(): boolean;
|
|
79
|
+
/** Whether this bot offers an attachment menu web app, and we have it enabled */
|
|
80
|
+
get isBotAttachmentMenuEnabled(): boolean;
|
|
81
|
+
/** Whether this bot can request geolocation when used in inline mode */
|
|
82
|
+
get isBotWithInlineGeo(): boolean;
|
|
83
|
+
/** Whether this bot can be edited by the current user */
|
|
84
|
+
get isBotEditable(): boolean;
|
|
85
|
+
/** Whether this user has been verified by Telegram */
|
|
86
|
+
get isVerified(): boolean;
|
|
87
|
+
/**
|
|
88
|
+
* Whether this user has been restricted. Bots only.
|
|
89
|
+
* See {@link restrictionReason} for details
|
|
90
|
+
*/
|
|
91
|
+
get isRestricted(): boolean;
|
|
92
|
+
/**
|
|
93
|
+
* Reason why this bot was restricted
|
|
94
|
+
*/
|
|
95
|
+
get restrictionReason(): tl.TypeRestrictionReason[];
|
|
96
|
+
/** Whether this user has been flagged for scam */
|
|
97
|
+
get isScam(): boolean;
|
|
98
|
+
/** Whether this user has been flagged for impersonation */
|
|
99
|
+
get isFake(): boolean;
|
|
100
|
+
/** Whether this user is part of the Telegram support team */
|
|
101
|
+
get isSupport(): boolean;
|
|
102
|
+
/** Whether this user has Premium subscription */
|
|
103
|
+
get isPremium(): boolean;
|
|
104
|
+
/** Whether Premium is required to contact this user */
|
|
105
|
+
get isPremiumRequired(): boolean;
|
|
106
|
+
/** Number of bot's active users, if available */
|
|
107
|
+
get botActiveUsers(): number | null;
|
|
108
|
+
/** Whether this bot has a main app */
|
|
109
|
+
get hasMainApp(): boolean;
|
|
110
|
+
/** User's or bot's first name */
|
|
111
|
+
get firstName(): string;
|
|
112
|
+
/** User's or bot's last name */
|
|
113
|
+
get lastName(): string | null;
|
|
114
|
+
static parseStatus(status?: tl.TypeUserStatus, bot?: boolean): UserParsedStatus;
|
|
115
|
+
private get _parsedStatus();
|
|
116
|
+
/** User's Last Seen & Online status */
|
|
117
|
+
get status(): UserStatus;
|
|
118
|
+
/**
|
|
119
|
+
* Whether user's online status is hidden because
|
|
120
|
+
* we have hidden our own online status from them,
|
|
121
|
+
* and we don't have Premium subscription.
|
|
122
|
+
*/
|
|
123
|
+
get statusHiddenByMe(): boolean;
|
|
124
|
+
/**
|
|
125
|
+
* Last time this user was seen online.
|
|
126
|
+
* Only available if {@link status} is `offline`
|
|
127
|
+
*/
|
|
128
|
+
get lastOnline(): Date | null;
|
|
129
|
+
/**
|
|
130
|
+
* Time when this user will automatically go offline.
|
|
131
|
+
* Only available if {@link status} is `online`
|
|
132
|
+
*/
|
|
133
|
+
get nextOffline(): Date | null;
|
|
134
|
+
/** User's or bot's username */
|
|
135
|
+
get username(): string | null;
|
|
136
|
+
/** User's or bot's usernames (including collectibles) */
|
|
137
|
+
get usernames(): ReadonlyArray<tl.RawUsername> | null;
|
|
138
|
+
/**
|
|
139
|
+
* IETF language tag of the user's language
|
|
140
|
+
*
|
|
141
|
+
* Only available in some contexts
|
|
142
|
+
*/
|
|
143
|
+
get language(): string | null;
|
|
144
|
+
/**
|
|
145
|
+
* User's or bot's assigned DC (data center).
|
|
146
|
+
* Available only in case the user has set a public profile photo.
|
|
147
|
+
*
|
|
148
|
+
* **Note**: this information is approximate; it is based on where
|
|
149
|
+
* Telegram stores a user profile pictures and does not by any means tell
|
|
150
|
+
* you the user location (i.e. a user might travel far away, but will still connect
|
|
151
|
+
* to its assigned DC).
|
|
152
|
+
* More info at [Pyrogram FAQ](https://docs.pyrogram.org/faq#what-are-the-ip-addresses-of-telegram-data-centers).
|
|
153
|
+
*/
|
|
154
|
+
get dcId(): number | null;
|
|
155
|
+
/** User's phone number */
|
|
156
|
+
get phoneNumber(): string | null;
|
|
157
|
+
/**
|
|
158
|
+
* Get this user's input peer for advanced use-cases.
|
|
159
|
+
*
|
|
160
|
+
* > **Note**: for {@link min} users, this method will return
|
|
161
|
+
* > `mtcute.dummyInputPeerMinUser`, which is actually not a valid input peer.
|
|
162
|
+
* > These are used to indicate that the user is incomplete, and a message
|
|
163
|
+
* > reference is needed to resolve the peer.
|
|
164
|
+
* >
|
|
165
|
+
* > Such objects are handled by {@link TelegramClient.resolvePeer} method,
|
|
166
|
+
* > so prefer using it whenever you need an input peer.
|
|
167
|
+
*/
|
|
168
|
+
get inputPeer(): tl.TypeInputPeer;
|
|
169
|
+
/**
|
|
170
|
+
* User's or bot's current profile photo, if any.
|
|
171
|
+
* Suitable for downloads only
|
|
172
|
+
*/
|
|
173
|
+
get photo(): ChatPhoto | null;
|
|
174
|
+
/**
|
|
175
|
+
* The list of reasons why this bot might be unavailable to some users.
|
|
176
|
+
* This field is available only in case *isRestricted* is `true`
|
|
177
|
+
*/
|
|
178
|
+
get restrictions(): ReadonlyArray<tl.RawRestrictionReason> | null;
|
|
179
|
+
/**
|
|
180
|
+
* User's display name.
|
|
181
|
+
*
|
|
182
|
+
* First name and last name if available,
|
|
183
|
+
* only first name otherwise.
|
|
184
|
+
*/
|
|
185
|
+
get displayName(): string;
|
|
186
|
+
/**
|
|
187
|
+
* User's emoji status, if any.
|
|
188
|
+
*/
|
|
189
|
+
get emojiStatus(): EmojiStatus | null;
|
|
190
|
+
/** Whether you have hidden (arhived) this user's stories */
|
|
191
|
+
get storiesHidden(): boolean;
|
|
192
|
+
get storiesUnavailable(): boolean;
|
|
193
|
+
/**
|
|
194
|
+
* Maximum ID of stories this user has (or 0 if none)
|
|
195
|
+
*/
|
|
196
|
+
get storiesMaxId(): number;
|
|
197
|
+
/**
|
|
198
|
+
* Color that should be used when rendering replies to
|
|
199
|
+
* their messages and web previews sent by them,
|
|
200
|
+
* as well as to render the chat title
|
|
201
|
+
*/
|
|
202
|
+
get color(): ChatColors;
|
|
203
|
+
/**
|
|
204
|
+
* Color that should be used when rendering the header of
|
|
205
|
+
* the user's profile
|
|
206
|
+
*
|
|
207
|
+
* If `null`, a generic header should be used instead
|
|
208
|
+
*/
|
|
209
|
+
get profileColors(): ChatColors | null;
|
|
210
|
+
/**
|
|
211
|
+
* Create a mention for the user.
|
|
212
|
+
*
|
|
213
|
+
* When available and `text` is omitted, this method will return `@username`.
|
|
214
|
+
* Otherwise, text mention is created.
|
|
215
|
+
*
|
|
216
|
+
* Use `null` as `text` (first parameter) to force create a text
|
|
217
|
+
* mention with display name, even if there is a username.
|
|
218
|
+
*
|
|
219
|
+
* > **Note**: This method doesn't format anything on its own.
|
|
220
|
+
* > Instead, it returns a {@link MessageEntity} that can later
|
|
221
|
+
* > be used with `html` or `md` template tags
|
|
222
|
+
*
|
|
223
|
+
* @param text Text of the mention.
|
|
224
|
+
* @example
|
|
225
|
+
* ```typescript
|
|
226
|
+
* msg.replyText(html`Hello, ${msg.sender.mention()`)
|
|
227
|
+
* ```
|
|
228
|
+
*/
|
|
229
|
+
mention(text?: string | null): string | MessageEntity;
|
|
230
|
+
/**
|
|
231
|
+
* Create a permanent mention for this user.
|
|
232
|
+
*
|
|
233
|
+
* Permanent* means that this mention will also
|
|
234
|
+
* contain user's access hash, so even if the user
|
|
235
|
+
* changes their username or the client forgets
|
|
236
|
+
* about that user, it can still be mentioned.
|
|
237
|
+
*
|
|
238
|
+
* Telegram might change access hash in some cases,
|
|
239
|
+
* so it may not exactly be *permanent*. The only way
|
|
240
|
+
* to actually make it permanent is to send it as a message
|
|
241
|
+
* somewhere and load it from there if needed.
|
|
242
|
+
*
|
|
243
|
+
* Note that some users (particularly, users with hidden forwards)
|
|
244
|
+
* may not be mentioned like this outside the chats you have in common.
|
|
245
|
+
*
|
|
246
|
+
* This method is only needed when the result will be
|
|
247
|
+
* stored somewhere outside current mtcute instance (e.g. saved for later use),
|
|
248
|
+
* otherwise {@link mention} will be enough.
|
|
249
|
+
*
|
|
250
|
+
* > **Note**: This method doesn't format anything on its own.
|
|
251
|
+
* > Instead, it returns a {@link MessageEntity} that can later
|
|
252
|
+
* > be used with `html` or `md` template tags
|
|
253
|
+
*
|
|
254
|
+
* > **Note**: the resulting text can only be used by clients
|
|
255
|
+
* > that support mtcute notation of permanent
|
|
256
|
+
* > mention links (`tg://user?id=123&hash=abc`).
|
|
257
|
+
* >
|
|
258
|
+
* > Also note that these permanent mentions are only
|
|
259
|
+
* > valid for current account, since peer access hashes are
|
|
260
|
+
* > account-specific and can't be used on another account.
|
|
261
|
+
* >
|
|
262
|
+
* > Also note that for some users such mentions might not work at all
|
|
263
|
+
* > due to privacy settings.
|
|
264
|
+
*
|
|
265
|
+
* @param text Mention text
|
|
266
|
+
*/
|
|
267
|
+
permanentMention(text?: string | null): MessageEntity;
|
|
268
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { tl } from '@mtcute/tl';
|
|
2
|
+
import { PeersIndex, Chat } from '../peers/index.js';
|
|
3
|
+
/**
|
|
4
|
+
* Information about a boost slot
|
|
5
|
+
*/
|
|
6
|
+
export declare class BoostSlot {
|
|
7
|
+
readonly raw: tl.RawMyBoost;
|
|
8
|
+
readonly _peers: PeersIndex;
|
|
9
|
+
constructor(raw: tl.RawMyBoost, _peers: PeersIndex);
|
|
10
|
+
/** ID of this slot */
|
|
11
|
+
get id(): number;
|
|
12
|
+
/**
|
|
13
|
+
* Whether this slot is occupied
|
|
14
|
+
*/
|
|
15
|
+
get occupied(): boolean;
|
|
16
|
+
/**
|
|
17
|
+
* Channel that is occupying this slot, if any
|
|
18
|
+
*/
|
|
19
|
+
get chat(): Chat | null;
|
|
20
|
+
/**
|
|
21
|
+
* Date when we started boosting this channel
|
|
22
|
+
*
|
|
23
|
+
* If this slot is not occupied, will be `0`
|
|
24
|
+
*/
|
|
25
|
+
get date(): Date;
|
|
26
|
+
/**
|
|
27
|
+
* Date when this boost will automatically expire.
|
|
28
|
+
*/
|
|
29
|
+
get expireDate(): Date;
|
|
30
|
+
/**
|
|
31
|
+
* If this slot is occupied, returns the date when
|
|
32
|
+
* we can reassing this slot to another channel.
|
|
33
|
+
*
|
|
34
|
+
* If `null`, we can reassign it immediately.
|
|
35
|
+
*/
|
|
36
|
+
get cooldownUntil(): Date | null;
|
|
37
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { tl } from '@mtcute/tl';
|
|
2
|
+
/**
|
|
3
|
+
* Information about boosts in a channel
|
|
4
|
+
*/
|
|
5
|
+
export declare class BoostStats {
|
|
6
|
+
readonly raw: tl.premium.RawBoostsStatus;
|
|
7
|
+
constructor(raw: tl.premium.RawBoostsStatus);
|
|
8
|
+
/** Whether this channel is being boosted by the current user */
|
|
9
|
+
get isBoosting(): boolean;
|
|
10
|
+
/**
|
|
11
|
+
* Current level of boosts in this channel.
|
|
12
|
+
*
|
|
13
|
+
* Currently this maps 1-to-1 to the number of stories
|
|
14
|
+
* the channel can post daily
|
|
15
|
+
*/
|
|
16
|
+
get level(): number;
|
|
17
|
+
/** Whether this channel is already at the maximum level */
|
|
18
|
+
get isMaxLevel(): boolean;
|
|
19
|
+
/**
|
|
20
|
+
* The number of boosts acquired from created Telegram Premium
|
|
21
|
+
* gift codes and giveaways, only available to channel admins
|
|
22
|
+
*/
|
|
23
|
+
get gifts(): number;
|
|
24
|
+
/**
|
|
25
|
+
* Number of boosts that were needed for the current level
|
|
26
|
+
*/
|
|
27
|
+
get currentLevelBoosts(): number;
|
|
28
|
+
/** Total number of boosts this channel has */
|
|
29
|
+
get currentBoosts(): number;
|
|
30
|
+
/**
|
|
31
|
+
* Number of boosts the channel must have to reach the next level
|
|
32
|
+
*
|
|
33
|
+
* `null` if the channel is already at the maximum level
|
|
34
|
+
*/
|
|
35
|
+
get nextLevelBoosts(): number | null;
|
|
36
|
+
/**
|
|
37
|
+
* Number of boosts the channel needs in addition to the current value
|
|
38
|
+
* to reach the next level
|
|
39
|
+
*/
|
|
40
|
+
get remainingBoosts(): number;
|
|
41
|
+
/** If available, total number of subscribers this channel has */
|
|
42
|
+
get totalSubscribers(): number | null;
|
|
43
|
+
/** If available, total number of Premium subscribers this channel has */
|
|
44
|
+
get totalPremiumSubscribers(): number | null;
|
|
45
|
+
/** If available, percentage of this channel's subscribers that are Premium */
|
|
46
|
+
get premiumSubscribersPercentage(): number | null;
|
|
47
|
+
/** URL that would bring up the boost interface */
|
|
48
|
+
get url(): string;
|
|
49
|
+
/**
|
|
50
|
+
* If {@link isBoosting}, IDs of the boost slots that are
|
|
51
|
+
* currently occupied by this channel
|
|
52
|
+
*/
|
|
53
|
+
get boostSlots(): number[];
|
|
54
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { tl } from '@mtcute/tl';
|
|
2
|
+
import { PeersIndex, User } from '../peers/index.js';
|
|
3
|
+
/**
|
|
4
|
+
* Origin of a boost
|
|
5
|
+
*
|
|
6
|
+
* - `gift` - boost applied because the channel gifted a subscription to some user
|
|
7
|
+
* - `unclaimed_gift` - boost applied because the channel gifted a subscription to some user,
|
|
8
|
+
* but the user hasn't yet claimed it
|
|
9
|
+
* - `giveaway` - boost applied because the user was chosen in a giveaway
|
|
10
|
+
* - `user` - boost applied because the user directly boosted the channel
|
|
11
|
+
*/
|
|
12
|
+
export type BoostOrigin = 'gift' | 'unclaimed_gift' | 'giveaway' | 'user';
|
|
13
|
+
/**
|
|
14
|
+
* Information about a boost (one or more)
|
|
15
|
+
*/
|
|
16
|
+
export declare class Boost {
|
|
17
|
+
readonly raw: tl.RawBoost;
|
|
18
|
+
readonly _peers: PeersIndex;
|
|
19
|
+
constructor(raw: tl.RawBoost, _peers: PeersIndex);
|
|
20
|
+
/** Unique ID of this boost */
|
|
21
|
+
get id(): string;
|
|
22
|
+
/** Number of boosts this boost is actually representing */
|
|
23
|
+
get count(): number;
|
|
24
|
+
/** Date when this boost was applied */
|
|
25
|
+
get date(): Date;
|
|
26
|
+
/** Amount of Telegram Stars that were awarded along with this boost */
|
|
27
|
+
get stars(): tl.Long | null;
|
|
28
|
+
/**
|
|
29
|
+
* Date when this boost will automatically expire.
|
|
30
|
+
*
|
|
31
|
+
* > **Note**: User can still manually cancel the boost before that date
|
|
32
|
+
*/
|
|
33
|
+
get expireDate(): Date;
|
|
34
|
+
/**
|
|
35
|
+
* Whether this boost was applied because the channel
|
|
36
|
+
* directly gifted a subscription to the user
|
|
37
|
+
*/
|
|
38
|
+
get origin(): BoostOrigin;
|
|
39
|
+
/**
|
|
40
|
+
* User who is boosting the channel.
|
|
41
|
+
*
|
|
42
|
+
* Only available for some origins
|
|
43
|
+
*/
|
|
44
|
+
get user(): User | null;
|
|
45
|
+
/**
|
|
46
|
+
* ID of the message containing the giveaway where this
|
|
47
|
+
* user has won
|
|
48
|
+
*/
|
|
49
|
+
get giveawayMessageId(): number | null;
|
|
50
|
+
/**
|
|
51
|
+
* The created Telegram Premium gift code, only set if `origin` is not `user`,
|
|
52
|
+
* AND it is either a gift code for the currently logged in user,
|
|
53
|
+
* or if it was already claimed
|
|
54
|
+
*/
|
|
55
|
+
get usedGiftSlug(): string | null;
|
|
56
|
+
}
|
|
@@ -9,7 +9,7 @@ import { PeersIndex, User } from '../peers/index.js';
|
|
|
9
9
|
* - `giveaway` - boost applied because the user was chosen in a giveaway
|
|
10
10
|
* - `user` - boost applied because the user directly boosted the channel
|
|
11
11
|
*/
|
|
12
|
-
type BoostOrigin = 'gift' | 'unclaimed_gift' | 'giveaway' | 'user';
|
|
12
|
+
export type BoostOrigin = 'gift' | 'unclaimed_gift' | 'giveaway' | 'user';
|
|
13
13
|
/**
|
|
14
14
|
* Information about a boost (one or more)
|
|
15
15
|
*/
|
|
@@ -54,4 +54,3 @@ export declare class Boost {
|
|
|
54
54
|
*/
|
|
55
55
|
get usedGiftSlug(): string | null;
|
|
56
56
|
}
|
|
57
|
-
export {};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { tl } from '@mtcute/tl';
|
|
2
|
+
import { BusinessIntro } from './business-intro.js';
|
|
3
|
+
import { BusinessLocation } from './business-location.js';
|
|
4
|
+
import { BusinessWorkHours } from './business-work-hours.js';
|
|
5
|
+
/** Information about a business account */
|
|
6
|
+
export declare class BusinessAccount {
|
|
7
|
+
readonly info: tl.RawUserFull;
|
|
8
|
+
constructor(info: tl.RawUserFull);
|
|
9
|
+
/** Introduction of the business account */
|
|
10
|
+
get intro(): BusinessIntro | null;
|
|
11
|
+
/** Work hours of the business */
|
|
12
|
+
get workHours(): BusinessWorkHours | null;
|
|
13
|
+
/** Location of the business */
|
|
14
|
+
get location(): BusinessLocation | null;
|
|
15
|
+
/** Information about a greeting message */
|
|
16
|
+
get greetingMessage(): tl.TypeBusinessGreetingMessage | null;
|
|
17
|
+
/** Information about an "away" message */
|
|
18
|
+
get awayMessage(): tl.TypeBusinessAwayMessage | null;
|
|
19
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { tl } from '@mtcute/tl';
|
|
2
|
+
import { MessageEntity } from '../messages/message-entity.js';
|
|
3
|
+
/**
|
|
4
|
+
* A business chat link, i.e. a link to start a chat with a pre-filled message.
|
|
5
|
+
*/
|
|
6
|
+
export declare class BusinessChatLink {
|
|
7
|
+
readonly raw: tl.RawBusinessChatLink;
|
|
8
|
+
constructor(raw: tl.RawBusinessChatLink);
|
|
9
|
+
/** The link itself */
|
|
10
|
+
get link(): string;
|
|
11
|
+
/** Text to be inserted into the message input */
|
|
12
|
+
get text(): string;
|
|
13
|
+
/** Entities for the text */
|
|
14
|
+
get entities(): MessageEntity[];
|
|
15
|
+
/** Custom title for the link */
|
|
16
|
+
get title(): string | null;
|
|
17
|
+
/** Number of clicks on the link */
|
|
18
|
+
get clicks(): number;
|
|
19
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { tl } from '@mtcute/tl';
|
|
2
|
+
import { PeersIndex } from '../peers/peers-index.js';
|
|
3
|
+
import { User } from '../peers/user.js';
|
|
4
|
+
/**
|
|
5
|
+
* Describes the connection of the bot with a business account.
|
|
6
|
+
*/
|
|
7
|
+
export declare class BusinessConnection {
|
|
8
|
+
readonly raw: tl.TypeBotBusinessConnection;
|
|
9
|
+
readonly _peers: PeersIndex;
|
|
10
|
+
constructor(raw: tl.TypeBotBusinessConnection, _peers: PeersIndex);
|
|
11
|
+
/** Whether the connection was removed by the user */
|
|
12
|
+
get isRemoved(): boolean;
|
|
13
|
+
/** ID of the connection */
|
|
14
|
+
get id(): string;
|
|
15
|
+
/** Datacenter ID of the connected user */
|
|
16
|
+
get dcId(): number;
|
|
17
|
+
/** Date when the connection was created */
|
|
18
|
+
get date(): Date;
|
|
19
|
+
/** Whether the bot can reply on behalf of the user */
|
|
20
|
+
get canReply(): boolean;
|
|
21
|
+
/** Business account user that created the business connection */
|
|
22
|
+
get user(): User;
|
|
23
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { tl } from '@mtcute/tl';
|
|
2
|
+
import { Sticker } from '../media/sticker.js';
|
|
3
|
+
/**
|
|
4
|
+
* Information about a "business intro" – text that is displayed
|
|
5
|
+
* when a user opens a chat with a business account for the first time.
|
|
6
|
+
*/
|
|
7
|
+
export declare class BusinessIntro {
|
|
8
|
+
readonly raw: tl.RawBusinessIntro;
|
|
9
|
+
constructor(raw: tl.RawBusinessIntro);
|
|
10
|
+
/**
|
|
11
|
+
* Title of the intro.
|
|
12
|
+
*/
|
|
13
|
+
get title(): string;
|
|
14
|
+
/**
|
|
15
|
+
* Description of the intro.
|
|
16
|
+
*/
|
|
17
|
+
get description(): string;
|
|
18
|
+
/**
|
|
19
|
+
* Sticker of the intro.
|
|
20
|
+
*/
|
|
21
|
+
get sticker(): Sticker | null;
|
|
22
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { tl } from '@mtcute/tl';
|
|
2
|
+
import { Location } from '../media/location.js';
|
|
3
|
+
/** Location of a business */
|
|
4
|
+
export declare class BusinessLocation {
|
|
5
|
+
readonly raw: tl.RawBusinessLocation;
|
|
6
|
+
constructor(raw: tl.RawBusinessLocation);
|
|
7
|
+
/** Address of the business */
|
|
8
|
+
get address(): string;
|
|
9
|
+
get location(): Location | null;
|
|
10
|
+
}
|