@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,21 @@
|
|
|
1
|
+
interface LinkedListItem<T> {
|
|
2
|
+
v: T;
|
|
3
|
+
n?: LinkedListItem<T>;
|
|
4
|
+
p?: LinkedListItem<T>;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* A sorted linked list.
|
|
8
|
+
*/
|
|
9
|
+
export declare class SortedLinkedList<T> {
|
|
10
|
+
private comparator;
|
|
11
|
+
_first?: LinkedListItem<T>;
|
|
12
|
+
_last?: LinkedListItem<T>;
|
|
13
|
+
_size: number;
|
|
14
|
+
constructor(comparator: (a: T, b: T) => number);
|
|
15
|
+
get length(): number;
|
|
16
|
+
_remove(item: LinkedListItem<T>): void;
|
|
17
|
+
popFront(): T | undefined;
|
|
18
|
+
add(item: T): void;
|
|
19
|
+
clear(): void;
|
|
20
|
+
}
|
|
21
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { tl } from '@mtcute/tl';
|
|
2
|
+
import { Deeplink } from './common.js';
|
|
3
|
+
/**
|
|
4
|
+
* Bot deeplinks
|
|
5
|
+
*
|
|
6
|
+
* Used to link to bots with a start parameter
|
|
7
|
+
*/
|
|
8
|
+
export declare const botStart: Deeplink<{
|
|
9
|
+
/** Bot username */
|
|
10
|
+
username: string;
|
|
11
|
+
/** Start parameter */
|
|
12
|
+
parameter: string;
|
|
13
|
+
}>;
|
|
14
|
+
type BotAdminRight = Exclude<keyof tl.RawChatAdminRights, '_'>;
|
|
15
|
+
/**
|
|
16
|
+
* Bot add to group links
|
|
17
|
+
*
|
|
18
|
+
* Used to ask the user to add a bot to a group, optionally asking for admin rights.
|
|
19
|
+
* Note that the user is still free to choose which rights to grant, and
|
|
20
|
+
* whether to grant them at all.
|
|
21
|
+
*/
|
|
22
|
+
export declare const botAddToGroup: Deeplink<{
|
|
23
|
+
/** Bot username */
|
|
24
|
+
bot: string;
|
|
25
|
+
/** If specified, the client will call `/start parameter` on the bot once the bot has been added */
|
|
26
|
+
parameter?: string;
|
|
27
|
+
/** Admin rights to request */
|
|
28
|
+
admin?: BotAdminRight[];
|
|
29
|
+
}>;
|
|
30
|
+
/**
|
|
31
|
+
* Bot add to channel links
|
|
32
|
+
*
|
|
33
|
+
* Used to ask the user to add a bot to a channel, optionally with admin rights.
|
|
34
|
+
* Note that the user is still free to choose which rights to grant, and
|
|
35
|
+
* whether to grant them at all.
|
|
36
|
+
*/
|
|
37
|
+
export declare const botAddToChannel: Deeplink<{
|
|
38
|
+
/** Bot username */
|
|
39
|
+
bot: string;
|
|
40
|
+
/** Admin rights to request */
|
|
41
|
+
admin?: BotAdminRight[];
|
|
42
|
+
}>;
|
|
43
|
+
/**
|
|
44
|
+
* Game links
|
|
45
|
+
*
|
|
46
|
+
* Used to share games.
|
|
47
|
+
*/
|
|
48
|
+
export declare const botGame: Deeplink<{
|
|
49
|
+
/** Bot username */
|
|
50
|
+
bot: string;
|
|
51
|
+
/** Game short name */
|
|
52
|
+
game: string;
|
|
53
|
+
}>;
|
|
54
|
+
/**
|
|
55
|
+
* Named bot web app links
|
|
56
|
+
*
|
|
57
|
+
* Used to share named bot web apps.
|
|
58
|
+
*
|
|
59
|
+
* These links are different from bot attachment menu deep links,
|
|
60
|
+
* because they don't require the user to install an attachment menu,
|
|
61
|
+
* and a single bot can offer multiple named web apps, distinguished by
|
|
62
|
+
* their `short_name`.
|
|
63
|
+
*/
|
|
64
|
+
export declare const botWebApp: Deeplink<{
|
|
65
|
+
/** Bot username */
|
|
66
|
+
bot: string;
|
|
67
|
+
/** App short name */
|
|
68
|
+
app: string;
|
|
69
|
+
/** Parameter to be passed by the client to messages.requestAppWebView as `start_param` */
|
|
70
|
+
parameter?: string;
|
|
71
|
+
}>;
|
|
72
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Deeplink } from './common.js';
|
|
2
|
+
/**
|
|
3
|
+
* Video chat/Livestream links
|
|
4
|
+
*
|
|
5
|
+
* Used to join video/voice chats in groups, and livestreams in channels.
|
|
6
|
+
* Such links are generated using phone.exportGroupCallInvite.
|
|
7
|
+
*/
|
|
8
|
+
export declare const videoChat: Deeplink<{
|
|
9
|
+
username: string;
|
|
10
|
+
/**
|
|
11
|
+
* Invite hash exported if the `can_self_unmute` flag is set when calling `phone.exportGroupCallInvite`:
|
|
12
|
+
* should be passed to `phone.joinGroupCall`, allows the user to speak in livestreams
|
|
13
|
+
* or muted group chats.
|
|
14
|
+
*/
|
|
15
|
+
inviteHash?: string;
|
|
16
|
+
isLivestream?: boolean;
|
|
17
|
+
}>;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { Deeplink } from './common.js';
|
|
2
|
+
/**
|
|
3
|
+
* Chat invite links
|
|
4
|
+
*
|
|
5
|
+
* Used to invite users to private groups and channels
|
|
6
|
+
*/
|
|
7
|
+
export declare const chatInvite: Deeplink<{
|
|
8
|
+
hash: string;
|
|
9
|
+
}>;
|
|
10
|
+
/**
|
|
11
|
+
* Chat folder links
|
|
12
|
+
*/
|
|
13
|
+
export declare const chatFolder: Deeplink<{
|
|
14
|
+
slug: string;
|
|
15
|
+
}>;
|
|
16
|
+
/**
|
|
17
|
+
* Message links
|
|
18
|
+
*
|
|
19
|
+
* Used to link to specific messages in public or private groups and channels.
|
|
20
|
+
*
|
|
21
|
+
* Note: `channelId` is a non-marked channel ID
|
|
22
|
+
*/
|
|
23
|
+
export declare const message: Deeplink<({
|
|
24
|
+
username: string;
|
|
25
|
+
} | {
|
|
26
|
+
channelId: number;
|
|
27
|
+
}) & {
|
|
28
|
+
/** Message ID */
|
|
29
|
+
id: number;
|
|
30
|
+
/** Thread ID */
|
|
31
|
+
threadId?: number;
|
|
32
|
+
/**
|
|
33
|
+
* For comments, `id` will contain the message ID of the channel message that started
|
|
34
|
+
* the comment section and this field will contain the message ID of the comment in
|
|
35
|
+
* the discussion group.
|
|
36
|
+
*/
|
|
37
|
+
commentId?: number;
|
|
38
|
+
/**
|
|
39
|
+
* Timestamp at which to start playing the media file present
|
|
40
|
+
* in the body or in the webpage preview of the message
|
|
41
|
+
*/
|
|
42
|
+
mediaTimestamp?: number;
|
|
43
|
+
/**
|
|
44
|
+
* Whether this is a link to a specific message in the album or to the entire album
|
|
45
|
+
*/
|
|
46
|
+
single?: boolean;
|
|
47
|
+
}>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
export interface CommonDeeplinkOptions {
|
|
2
|
+
/**
|
|
3
|
+
* Protocol to use for deeplink
|
|
4
|
+
* - `tg` - use `tg://` protocol links (default)
|
|
5
|
+
* - `http` - use `http://` protocol
|
|
6
|
+
* - `https` - use `https://` protocol
|
|
7
|
+
* - `none` - don't use any protocol
|
|
8
|
+
*
|
|
9
|
+
* @default 'https'
|
|
10
|
+
*/
|
|
11
|
+
protocol?: 'tg' | 'http' | 'https' | 'none';
|
|
12
|
+
/**
|
|
13
|
+
* For protocols except `tg://`, domain to use
|
|
14
|
+
*
|
|
15
|
+
* @default 't.me'
|
|
16
|
+
*/
|
|
17
|
+
domain?: string;
|
|
18
|
+
}
|
|
19
|
+
type InputQuery = Record<string, string | number | true | undefined> | null;
|
|
20
|
+
interface BuildDeeplinkOptions<T> {
|
|
21
|
+
internalBuild?: (options: T) => [string, InputQuery];
|
|
22
|
+
internalParse?: (path: string, query: URLSearchParams) => T | null;
|
|
23
|
+
externalBuild?: (options: T) => [string, InputQuery];
|
|
24
|
+
externalParse?: (path: string, query: URLSearchParams) => T | null;
|
|
25
|
+
}
|
|
26
|
+
export interface Deeplink<T> {
|
|
27
|
+
(options: T & CommonDeeplinkOptions): string;
|
|
28
|
+
parse: (url: string) => T | null;
|
|
29
|
+
}
|
|
30
|
+
export declare function deeplinkBuilder<T>(params: BuildDeeplinkOptions<T>): Deeplink<T>;
|
|
31
|
+
export {};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { Deeplink } from './common.js';
|
|
2
|
+
/**
|
|
3
|
+
* Share links
|
|
4
|
+
*
|
|
5
|
+
* Used to share a prepared message and URL into a chosen chat's text field.
|
|
6
|
+
*/
|
|
7
|
+
export declare const share: Deeplink<{
|
|
8
|
+
url: string;
|
|
9
|
+
text?: string;
|
|
10
|
+
}>;
|
|
11
|
+
/**
|
|
12
|
+
* Boost links
|
|
13
|
+
*
|
|
14
|
+
* Used by users to boost channels, granting them the ability to post stories.
|
|
15
|
+
*/
|
|
16
|
+
export declare const boost: Deeplink<{
|
|
17
|
+
username: string;
|
|
18
|
+
} | {
|
|
19
|
+
channelId: number;
|
|
20
|
+
}>;
|
|
21
|
+
/**
|
|
22
|
+
* Link to a shared folder (chat list)
|
|
23
|
+
*/
|
|
24
|
+
export declare const folder: Deeplink<{
|
|
25
|
+
slug: string;
|
|
26
|
+
}>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Deeplink } from './common.js';
|
|
2
|
+
/**
|
|
3
|
+
* MTProxy links
|
|
4
|
+
*/
|
|
5
|
+
export declare const mtproxy: Deeplink<{
|
|
6
|
+
server: string;
|
|
7
|
+
port: number;
|
|
8
|
+
secret: string;
|
|
9
|
+
}>;
|
|
10
|
+
/**
|
|
11
|
+
* Socks5 proxy links
|
|
12
|
+
*/
|
|
13
|
+
export declare const socks5: Deeplink<{
|
|
14
|
+
server: string;
|
|
15
|
+
port: number;
|
|
16
|
+
user?: string;
|
|
17
|
+
pass?: string;
|
|
18
|
+
}>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { Deeplink } from './common.js';
|
|
2
|
+
/**
|
|
3
|
+
* Public username links
|
|
4
|
+
*
|
|
5
|
+
* Used to link to public users, groups and channels
|
|
6
|
+
*/
|
|
7
|
+
export declare const publicUsername: Deeplink<{
|
|
8
|
+
username: string;
|
|
9
|
+
}>;
|
|
10
|
+
/**
|
|
11
|
+
* Temporary profile links
|
|
12
|
+
*
|
|
13
|
+
* Used to link to user profiles, generated using contacts.exportContactToken.
|
|
14
|
+
* These links can be generated even for profiles that don't have a username,
|
|
15
|
+
* and they have an expiration date, specified by the expires field of the exportedContactToken
|
|
16
|
+
* constructor returned by contacts.exportContactToken.
|
|
17
|
+
*/
|
|
18
|
+
export declare const temporaryProfile: Deeplink<{
|
|
19
|
+
token: string;
|
|
20
|
+
}>;
|
|
21
|
+
/**
|
|
22
|
+
* Phone number links
|
|
23
|
+
*
|
|
24
|
+
* Used to link to public and private users by their phone number.
|
|
25
|
+
*/
|
|
26
|
+
export declare const phoneNumber: Deeplink<{
|
|
27
|
+
phone: string;
|
|
28
|
+
}>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { ICorePlatform } from '../types/platform.js';
|
|
2
|
+
/**
|
|
3
|
+
* Logger created by {@link LogManager}
|
|
4
|
+
*/
|
|
5
|
+
export declare class Logger {
|
|
6
|
+
readonly mgr: LogManager;
|
|
7
|
+
readonly tag: string;
|
|
8
|
+
readonly parent: Logger;
|
|
9
|
+
private color;
|
|
10
|
+
prefix: string;
|
|
11
|
+
constructor(mgr: LogManager, tag: string, parent?: Logger);
|
|
12
|
+
getPrefix(): string;
|
|
13
|
+
log(level: number, fmt: string, ...args: unknown[]): void;
|
|
14
|
+
readonly error: (fmt: string, ...args: unknown[]) => void;
|
|
15
|
+
readonly warn: (fmt: string, ...args: unknown[]) => void;
|
|
16
|
+
readonly info: (fmt: string, ...args: unknown[]) => void;
|
|
17
|
+
readonly debug: (fmt: string, ...args: unknown[]) => void;
|
|
18
|
+
readonly verbose: (fmt: string, ...args: unknown[]) => void;
|
|
19
|
+
/**
|
|
20
|
+
* Create a {@link Logger} with the given tag
|
|
21
|
+
* from the same {@link LogManager} as the current
|
|
22
|
+
* Logger.
|
|
23
|
+
*
|
|
24
|
+
* @param tag Logger tag
|
|
25
|
+
*/
|
|
26
|
+
create(tag: string): Logger;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Log manager. A logger that allows managing child loggers
|
|
30
|
+
*/
|
|
31
|
+
export declare class LogManager extends Logger {
|
|
32
|
+
static OFF: number;
|
|
33
|
+
static ERROR: number;
|
|
34
|
+
static WARN: number;
|
|
35
|
+
static INFO: number;
|
|
36
|
+
static DEBUG: number;
|
|
37
|
+
static VERBOSE: number;
|
|
38
|
+
level: number;
|
|
39
|
+
handler: (color: number, level: number, tag: string, fmt: string, args: unknown[]) => void;
|
|
40
|
+
constructor(tag: string | undefined, platform: ICorePlatform);
|
|
41
|
+
private _filter;
|
|
42
|
+
/**
|
|
43
|
+
* Create a {@link Logger} with the given tag
|
|
44
|
+
*
|
|
45
|
+
* @param tag Logger tag
|
|
46
|
+
*/
|
|
47
|
+
create(tag: string): Logger;
|
|
48
|
+
/**
|
|
49
|
+
* Filter logging by tags.
|
|
50
|
+
*
|
|
51
|
+
* @param cb
|
|
52
|
+
*/
|
|
53
|
+
filter(cb: ((tag: string) => boolean) | null): void;
|
|
54
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { CustomMap, CustomSet } from '@fuman/utils';
|
|
2
|
+
import { default as Long } from 'long';
|
|
3
|
+
/**
|
|
4
|
+
* Get a random Long
|
|
5
|
+
*
|
|
6
|
+
* @param unsigned Whether the number should be unsigned
|
|
7
|
+
*/
|
|
8
|
+
export declare function randomLong(unsigned?: boolean): Long;
|
|
9
|
+
/**
|
|
10
|
+
* Read a Long from a buffer
|
|
11
|
+
*
|
|
12
|
+
* @param buf Buffer to read from
|
|
13
|
+
* @param unsigned Whether the number should be unsigned
|
|
14
|
+
* @param le Whether the number is little-endian
|
|
15
|
+
*/
|
|
16
|
+
export declare function longFromBuffer(buf: Uint8Array, unsigned?: boolean, le?: boolean): Long;
|
|
17
|
+
/**
|
|
18
|
+
* Remove a Long from an array
|
|
19
|
+
*
|
|
20
|
+
* @param arr Array to remove from
|
|
21
|
+
* @param val Value to remove
|
|
22
|
+
*/
|
|
23
|
+
export declare function removeFromLongArray(arr: Long[], val: Long): boolean;
|
|
24
|
+
/**
|
|
25
|
+
* Compare two Longs and return -1, 0 or 1,
|
|
26
|
+
* to be used as a comparator function.
|
|
27
|
+
*/
|
|
28
|
+
export declare function compareLongs(a: Long, b: Long): number;
|
|
29
|
+
/**
|
|
30
|
+
* Serialize a Long (int64) to its fast string representation:
|
|
31
|
+
* `$high|$low`.
|
|
32
|
+
*
|
|
33
|
+
* This method is about 500* times faster than using `Long.toString()`,
|
|
34
|
+
* and very useful when the string will only ever be used internally
|
|
35
|
+
* (e.g. for keying a map)
|
|
36
|
+
*
|
|
37
|
+
* _\* benchmark result, YMMV_
|
|
38
|
+
*
|
|
39
|
+
* @param val
|
|
40
|
+
*/
|
|
41
|
+
export declare function longToFastString(val: Long): string;
|
|
42
|
+
/**
|
|
43
|
+
* Parse a Long (int64) from its fast string representation:
|
|
44
|
+
* `$high|$low`.
|
|
45
|
+
*
|
|
46
|
+
* This method is about 2 times faster than using Long.fromString.
|
|
47
|
+
*
|
|
48
|
+
* @param val
|
|
49
|
+
* @param unsigned
|
|
50
|
+
*/
|
|
51
|
+
export declare function longFromFastString(val: string, unsigned?: boolean): Long;
|
|
52
|
+
/**
|
|
53
|
+
* Map with Longs as key.
|
|
54
|
+
*
|
|
55
|
+
* Uses fast string representation internally.
|
|
56
|
+
*/
|
|
57
|
+
export declare class LongMap<V> extends CustomMap<Long, string, V> {
|
|
58
|
+
constructor();
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Set for Longs.
|
|
62
|
+
*
|
|
63
|
+
* Uses fast string representation internally
|
|
64
|
+
*/
|
|
65
|
+
export declare class LongSet extends CustomSet<Long, string> {
|
|
66
|
+
constructor();
|
|
67
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { tl } from '@mtcute/tl';
|
|
2
|
+
import { BasicPeerType } from '../types/peers.js';
|
|
3
|
+
/**
|
|
4
|
+
* Add or remove channel marker from ID
|
|
5
|
+
*/
|
|
6
|
+
export declare function toggleChannelIdMark(id: number): number;
|
|
7
|
+
/**
|
|
8
|
+
* Get the bare (non-marked) ID from a {@link tl.TypePeer}
|
|
9
|
+
*/
|
|
10
|
+
export declare function getBarePeerId(peer: tl.TypePeer): number;
|
|
11
|
+
/**
|
|
12
|
+
* Get the marked (non-bare) ID from a {@link tl.TypePeer}
|
|
13
|
+
*
|
|
14
|
+
* Mark* is bot API compatible, which is:
|
|
15
|
+
* - ID stays the same for users
|
|
16
|
+
* - ID is negated for chats
|
|
17
|
+
* - ID is negated and `-1e12` is subtracted for channels
|
|
18
|
+
*/
|
|
19
|
+
export declare function getMarkedPeerId(peerId: number, peerType: BasicPeerType): number;
|
|
20
|
+
export declare function getMarkedPeerId(peer: tl.TypePeer | tl.TypeInputPeer | tl.TypeInputUser | tl.TypeInputChannel): number;
|
|
21
|
+
/**
|
|
22
|
+
* Parse a marked ID into a {@link BasicPeerType} and a bare ID
|
|
23
|
+
*/
|
|
24
|
+
export declare function parseMarkedPeerId(id: number): [BasicPeerType, number];
|
|
25
|
+
/**
|
|
26
|
+
* Extracts all (cacheable) entities from a TlObject or a list of them.
|
|
27
|
+
* Only checks `.user`, `.chat`, `.channel`, `.users` and `.chats` properties
|
|
28
|
+
*/
|
|
29
|
+
export declare function getAllPeersFrom(obj: tl.TlObject | tl.TlObject[]): Iterable<tl.TypeUser | tl.TypeChat>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Array that adds elements in sorted order.
|
|
3
|
+
*
|
|
4
|
+
* Comparator is always called like: comparator(itemFromSortedArray, yourItem)
|
|
5
|
+
*/
|
|
6
|
+
export declare class SortedArray<T> {
|
|
7
|
+
readonly comparator: (a: T, b: T) => number;
|
|
8
|
+
readonly raw: T[];
|
|
9
|
+
constructor(array: T[] | undefined, comparator: (a: T, b: T) => number);
|
|
10
|
+
get length(): number;
|
|
11
|
+
insert(item: T | T[]): number;
|
|
12
|
+
index(item: T, closest?: boolean): number;
|
|
13
|
+
remove(item: T): void;
|
|
14
|
+
includes(item: T): boolean;
|
|
15
|
+
find(item: T): T | null;
|
|
16
|
+
clear(): void;
|
|
17
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { timers } from '@fuman/utils';
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { tl } from '@mtcute/tl';
|
|
2
|
+
/**
|
|
3
|
+
* Convert a JS object to TL JSON
|
|
4
|
+
*
|
|
5
|
+
* @param obj Object to be converted
|
|
6
|
+
*/
|
|
7
|
+
export declare function jsonToTlJson(obj: unknown): tl.TypeJSONValue;
|
|
8
|
+
/**
|
|
9
|
+
* Convert TL JSON object to plain JS object
|
|
10
|
+
*
|
|
11
|
+
* @param obj TL JSON object to convert
|
|
12
|
+
*/
|
|
13
|
+
export declare function tlJsonToJson(obj: tl.TypeJSONValue): unknown;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { mtp, tl } from '@mtcute/tl';
|
|
2
|
+
export declare function isPresent<T>(t: T | undefined | null | void): t is T;
|
|
3
|
+
/**
|
|
4
|
+
* Returns a function that can be used to filter down objects
|
|
5
|
+
* to the ones that have a specific value V under a key `k`.
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* ```ts
|
|
9
|
+
* type File = { type: "image", imageUrl: string } | { type: "pdf", pdfUrl: string };
|
|
10
|
+
* const files: File[] = [];
|
|
11
|
+
*
|
|
12
|
+
* const imageFiles = files.filter(file => file.type === "image");
|
|
13
|
+
* files[0].type // In this case, TS will still treat it as `"image" | "pdf"`
|
|
14
|
+
*
|
|
15
|
+
* const filesWithUrl = files.filter(hasValueKey("type", "image" as const));
|
|
16
|
+
* files[0].type // TS will now know that this is "image"
|
|
17
|
+
* files[0].imageUrl // TS will know this is present, because already it excluded the other union members.
|
|
18
|
+
* ```
|
|
19
|
+
*/
|
|
20
|
+
export declare function hasValueAtKey<const K extends string | number | symbol, const V>(k: K, v: V): <T>(a: T & {
|
|
21
|
+
[k in K]: unknown;
|
|
22
|
+
}) => a is T & {
|
|
23
|
+
[k in K]: V;
|
|
24
|
+
};
|
|
25
|
+
export declare function assertTypeIs<T extends tl.TlObject, K extends T['_']>(context: string, obj: T, expected: K): asserts obj is tl.FindByName<T, K>;
|
|
26
|
+
export declare function assertTypeIsNot<T extends tl.TlObject, K extends T['_']>(context: string, obj: T, expectedNot: K): asserts obj is Exclude<T, tl.FindByName<T, K>>;
|
|
27
|
+
export declare function mtpAssertTypeIs<T extends mtp.TlObject, K extends T['_']>(context: string, obj: T, expected: K): asserts obj is mtp.FindByName<T, K>;
|
|
28
|
+
export declare function assertTrue(context: string, cond: boolean): asserts cond;
|
|
29
|
+
export declare function isTlRpcError(obj: unknown): obj is mtp.RawMt_rpc_error;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/utils.d.cts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./utils/index.js"
|
package/worker.d.cts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./highlevel/worker/index.js"
|