@mtcute/core 0.19.0 → 0.19.2
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.cjs +12 -4
- package/client.js +10 -2
- package/highlevel/base.cjs +3 -3
- package/highlevel/base.d.cts +1 -1
- package/highlevel/base.d.ts +1 -1
- package/highlevel/base.js +1 -1
- package/highlevel/client.d.cts +55 -0
- package/highlevel/client.d.ts +55 -0
- package/highlevel/client.types.d.cts +1 -1
- package/highlevel/client.types.d.ts +1 -1
- package/highlevel/managers/app-config-manager.cjs +2 -2
- package/highlevel/managers/timers.cjs +2 -2
- package/highlevel/methods/auth/check-password.cjs +2 -2
- package/highlevel/methods/auth/get-password-hint.cjs +2 -2
- package/highlevel/methods/auth/log-out.cjs +2 -2
- package/highlevel/methods/auth/recover-password.cjs +2 -2
- package/highlevel/methods/auth/resend-code.cjs +2 -2
- package/highlevel/methods/auth/run.cjs +2 -2
- package/highlevel/methods/auth/send-code.cjs +3 -3
- package/highlevel/methods/auth/send-code.js +1 -1
- package/highlevel/methods/auth/send-recovery-code.cjs +2 -2
- package/highlevel/methods/auth/sign-in-bot.cjs +3 -3
- package/highlevel/methods/auth/sign-in-bot.js +1 -1
- package/highlevel/methods/auth/sign-in-qr.cjs +13 -10
- package/highlevel/methods/auth/sign-in-qr.js +11 -8
- package/highlevel/methods/auth/sign-in.cjs +2 -2
- package/highlevel/methods/auth/start-test.cjs +2 -2
- package/highlevel/methods/auth/start.cjs +2 -2
- package/highlevel/methods/auth/utils.cjs +2 -2
- package/highlevel/methods/bots/answer-callback-query.cjs +2 -2
- package/highlevel/methods/bots/answer-inline-query.cjs +2 -2
- package/highlevel/methods/bots/answer-pre-checkout-query.cjs +2 -2
- package/highlevel/methods/bots/delete-my-commands.cjs +2 -2
- package/highlevel/methods/bots/get-bot-info.cjs +2 -2
- package/highlevel/methods/bots/get-bot-menu-button.cjs +2 -2
- package/highlevel/methods/bots/get-callback-answer.cjs +2 -2
- package/highlevel/methods/bots/get-game-high-scores.cjs +2 -2
- package/highlevel/methods/bots/get-my-commands.cjs +2 -2
- package/highlevel/methods/bots/normalize-command-scope.cjs +2 -2
- package/highlevel/methods/bots/open-webview.cjs +2 -2
- package/highlevel/methods/bots/prepare-inline-message.cjs +2 -2
- package/highlevel/methods/bots/set-bot-info.cjs +2 -2
- package/highlevel/methods/bots/set-bot-menu-button.cjs +2 -2
- package/highlevel/methods/bots/set-game-score.cjs +2 -2
- package/highlevel/methods/bots/set-my-commands.cjs +2 -2
- package/highlevel/methods/bots/set-my-default-rights.cjs +2 -2
- package/highlevel/methods/bots/toggle-emoji-status-permission.cjs +2 -2
- package/highlevel/methods/chats/add-chat-members.cjs +2 -2
- package/highlevel/methods/chats/archive-chats.cjs +2 -2
- package/highlevel/methods/chats/ban-chat-member.cjs +2 -2
- package/highlevel/methods/chats/batched-queries.cjs +2 -2
- package/highlevel/methods/chats/create-channel.cjs +2 -2
- package/highlevel/methods/chats/create-group.cjs +2 -2
- package/highlevel/methods/chats/create-supergroup.cjs +2 -2
- package/highlevel/methods/chats/delete-channel.cjs +2 -2
- package/highlevel/methods/chats/delete-chat-photo.cjs +2 -2
- package/highlevel/methods/chats/delete-group.cjs +2 -2
- package/highlevel/methods/chats/delete-history.cjs +2 -2
- package/highlevel/methods/chats/delete-user-history.cjs +2 -2
- package/highlevel/methods/chats/edit-admin-rights.cjs +2 -2
- package/highlevel/methods/chats/get-chat-event-log.cjs +2 -2
- package/highlevel/methods/chats/get-chat-member.cjs +2 -2
- package/highlevel/methods/chats/get-chat-members.cjs +2 -2
- package/highlevel/methods/chats/get-chat-preview.cjs +2 -2
- package/highlevel/methods/chats/get-chat.cjs +2 -2
- package/highlevel/methods/chats/get-full-chat.cjs +2 -2
- package/highlevel/methods/chats/get-full-user.cjs +2 -2
- package/highlevel/methods/chats/get-nearby-chats.cjs +2 -2
- package/highlevel/methods/chats/get-similar-channels.cjs +2 -2
- package/highlevel/methods/chats/get-user.cjs +2 -2
- package/highlevel/methods/chats/iter-chat-event-log.cjs +2 -2
- package/highlevel/methods/chats/iter-chat-members.cjs +2 -2
- package/highlevel/methods/chats/join-chat.cjs +2 -2
- package/highlevel/methods/chats/kick-chat-member.cjs +2 -2
- package/highlevel/methods/chats/leave-chat.cjs +2 -2
- package/highlevel/methods/chats/mark-chat-unread.cjs +2 -2
- package/highlevel/methods/chats/open-chat.cjs +2 -2
- package/highlevel/methods/chats/reorder-usernames.cjs +2 -2
- package/highlevel/methods/chats/restrict-chat-member.cjs +2 -2
- package/highlevel/methods/chats/save-draft.cjs +2 -2
- package/highlevel/methods/chats/set-chat-color.cjs +2 -2
- package/highlevel/methods/chats/set-chat-default-permissions.cjs +2 -2
- package/highlevel/methods/chats/set-chat-description.cjs +2 -2
- package/highlevel/methods/chats/set-chat-photo.cjs +2 -2
- package/highlevel/methods/chats/set-chat-title.cjs +2 -2
- package/highlevel/methods/chats/set-chat-ttl.cjs +2 -2
- package/highlevel/methods/chats/set-chat-username.cjs +2 -2
- package/highlevel/methods/chats/set-slow-mode.cjs +2 -2
- package/highlevel/methods/chats/toggle-content-protection.cjs +2 -2
- package/highlevel/methods/chats/toggle-fragment-username.cjs +2 -2
- package/highlevel/methods/chats/toggle-join-requests.cjs +2 -2
- package/highlevel/methods/chats/toggle-join-to-send.cjs +2 -2
- package/highlevel/methods/chats/unarchive-chats.cjs +2 -2
- package/highlevel/methods/chats/unban-chat-member.cjs +2 -2
- package/highlevel/methods/contacts/add-contact.cjs +2 -2
- package/highlevel/methods/contacts/delete-contacts.cjs +2 -2
- package/highlevel/methods/contacts/get-contacts.cjs +2 -2
- package/highlevel/methods/contacts/import-contacts.cjs +2 -2
- package/highlevel/methods/dialogs/create-folder.cjs +2 -2
- package/highlevel/methods/dialogs/delete-folder.cjs +2 -2
- package/highlevel/methods/dialogs/edit-folder.cjs +3 -3
- package/highlevel/methods/dialogs/edit-folder.js +1 -1
- package/highlevel/methods/dialogs/find-dialogs.cjs +2 -2
- package/highlevel/methods/dialogs/find-folder.cjs +3 -3
- package/highlevel/methods/dialogs/find-folder.js +1 -1
- package/highlevel/methods/dialogs/get-chatlist-preview.cjs +2 -2
- package/highlevel/methods/dialogs/get-folders.cjs +3 -3
- package/highlevel/methods/dialogs/get-folders.js +1 -1
- package/highlevel/methods/dialogs/get-peer-dialogs.cjs +2 -2
- package/highlevel/methods/dialogs/iter-dialogs.cjs +3 -3
- package/highlevel/methods/dialogs/iter-dialogs.js +1 -1
- package/highlevel/methods/dialogs/join-chatlist.cjs +2 -2
- package/highlevel/methods/dialogs/set-folders-order.cjs +2 -2
- package/highlevel/methods/files/download-buffer.cjs +2 -2
- package/highlevel/methods/files/download-iterable.cjs +2 -2
- package/highlevel/methods/files/download-stream.cjs +2 -2
- package/highlevel/methods/files/normalize-file-to-document.cjs +2 -2
- package/highlevel/methods/files/normalize-input-file.cjs +2 -2
- package/highlevel/methods/files/normalize-input-media.cjs +2 -2
- package/highlevel/methods/files/upload-file.cjs +2 -2
- package/highlevel/methods/files/upload-media.cjs +2 -2
- package/highlevel/methods/forums/create-forum-topic.cjs +2 -2
- package/highlevel/methods/forums/delete-forum-topic-history.cjs +2 -2
- package/highlevel/methods/forums/edit-forum-topic.cjs +2 -2
- package/highlevel/methods/forums/get-forum-topics-by-id.cjs +2 -2
- package/highlevel/methods/forums/get-forum-topics.cjs +2 -2
- package/highlevel/methods/forums/iter-forum-topics.cjs +2 -2
- package/highlevel/methods/forums/reorder-pinned-forum-topics.cjs +2 -2
- package/highlevel/methods/forums/toggle-forum-topic-closed.cjs +2 -2
- package/highlevel/methods/forums/toggle-forum-topic-pinned.cjs +2 -2
- package/highlevel/methods/forums/toggle-forum.cjs +2 -2
- package/highlevel/methods/forums/toggle-general-topic-hidden.cjs +2 -2
- package/highlevel/methods/invite-links/create-invite-link.cjs +2 -2
- package/highlevel/methods/invite-links/edit-invite-link.cjs +2 -2
- package/highlevel/methods/invite-links/export-invite-link.cjs +2 -2
- package/highlevel/methods/invite-links/get-invite-link-members.cjs +2 -2
- package/highlevel/methods/invite-links/get-invite-link.cjs +2 -2
- package/highlevel/methods/invite-links/get-invite-links.cjs +2 -2
- package/highlevel/methods/invite-links/get-primary-invite-link.cjs +2 -2
- package/highlevel/methods/invite-links/hide-all-join-requests.cjs +2 -2
- package/highlevel/methods/invite-links/hide-join-request.cjs +2 -2
- package/highlevel/methods/invite-links/iter-invite-link-members.cjs +2 -2
- package/highlevel/methods/invite-links/iter-invite-links.cjs +2 -2
- package/highlevel/methods/invite-links/revoke-invite-link.cjs +2 -2
- package/highlevel/methods/messages/_business-connection.cjs +2 -2
- package/highlevel/methods/messages/close-poll.cjs +2 -2
- package/highlevel/methods/messages/delete-messages.cjs +2 -2
- package/highlevel/methods/messages/delete-scheduled-messages.cjs +2 -2
- package/highlevel/methods/messages/edit-inline-message.cjs +2 -2
- package/highlevel/methods/messages/edit-message.cjs +2 -2
- package/highlevel/methods/messages/find-in-update.cjs +2 -2
- package/highlevel/methods/messages/forward-messages.cjs +2 -2
- package/highlevel/methods/messages/get-all-scheduled-messages.cjs +2 -2
- package/highlevel/methods/messages/get-available-effects.cjs +2 -2
- package/highlevel/methods/messages/get-callback-query-message.cjs +2 -2
- package/highlevel/methods/messages/get-discussion-message.cjs +2 -2
- package/highlevel/methods/messages/get-fact-check.cjs +2 -2
- package/highlevel/methods/messages/get-history.cjs +2 -2
- package/highlevel/methods/messages/get-message-by-link.cjs +2 -2
- package/highlevel/methods/messages/get-message-group.cjs +2 -2
- package/highlevel/methods/messages/get-message-reactions.cjs +2 -2
- package/highlevel/methods/messages/get-messages-unsafe.cjs +2 -2
- package/highlevel/methods/messages/get-messages.cjs +2 -2
- package/highlevel/methods/messages/get-reaction-users.cjs +2 -2
- package/highlevel/methods/messages/get-reply-to.cjs +2 -2
- package/highlevel/methods/messages/get-scheduled-messages.cjs +2 -2
- package/highlevel/methods/messages/iter-history.cjs +2 -2
- package/highlevel/methods/messages/iter-reaction-users.cjs +2 -2
- package/highlevel/methods/messages/iter-search-global.cjs +2 -2
- package/highlevel/methods/messages/iter-search-messages.cjs +2 -2
- package/highlevel/methods/messages/pin-message.cjs +2 -2
- package/highlevel/methods/messages/read-history.cjs +3 -5
- package/highlevel/methods/messages/read-history.js +1 -3
- package/highlevel/methods/messages/read-reactions.cjs +2 -2
- package/highlevel/methods/messages/search-global.cjs +2 -2
- package/highlevel/methods/messages/search-hashtag.cjs +2 -2
- package/highlevel/methods/messages/search-messages.cjs +2 -2
- package/highlevel/methods/messages/send-answer.cjs +2 -2
- package/highlevel/methods/messages/send-comment.cjs +2 -2
- package/highlevel/methods/messages/send-common.cjs +2 -2
- package/highlevel/methods/messages/send-copy-group.cjs +2 -2
- package/highlevel/methods/messages/send-copy.cjs +2 -2
- package/highlevel/methods/messages/send-media-group.cjs +2 -2
- package/highlevel/methods/messages/send-media.cjs +2 -2
- package/highlevel/methods/messages/send-paid-reaction.cjs +2 -2
- package/highlevel/methods/messages/send-quote.cjs +2 -2
- package/highlevel/methods/messages/send-reaction.cjs +2 -2
- package/highlevel/methods/messages/send-reply.cjs +2 -2
- package/highlevel/methods/messages/send-scheduled.cjs +2 -2
- package/highlevel/methods/messages/send-text.cjs +2 -2
- package/highlevel/methods/messages/send-typing.cjs +2 -2
- package/highlevel/methods/messages/send-vote.cjs +2 -2
- package/highlevel/methods/messages/set-typing.cjs +2 -2
- package/highlevel/methods/messages/translate-message.cjs +2 -2
- package/highlevel/methods/messages/translate-text.cjs +2 -2
- package/highlevel/methods/messages/unpin-all-messages.cjs +2 -2
- package/highlevel/methods/messages/unpin-message.cjs +2 -2
- package/highlevel/methods/misc/chain-id.cjs +2 -2
- package/highlevel/methods/misc/get-collectible-info.cjs +2 -2
- package/highlevel/methods/misc/init-takeout-session.cjs +2 -2
- package/highlevel/methods/misc/normalize-privacy-rules.cjs +2 -2
- package/highlevel/methods/misc/normalize-text.cjs +2 -2
- package/highlevel/methods/misc/with-params.cjs +2 -2
- package/highlevel/methods/password/change-cloud-password.cjs +2 -2
- package/highlevel/methods/password/enable-cloud-password.cjs +2 -2
- package/highlevel/methods/password/password-email.cjs +2 -2
- package/highlevel/methods/password/remove-cloud-password.cjs +2 -2
- package/highlevel/methods/premium/accept-star-gift.cjs +3 -8
- package/highlevel/methods/premium/accept-star-gift.d.cts +4 -2
- package/highlevel/methods/premium/accept-star-gift.d.ts +4 -2
- package/highlevel/methods/premium/accept-star-gift.js +1 -6
- package/highlevel/methods/premium/apply-boost.cjs +2 -2
- package/highlevel/methods/premium/can-apply-boost.cjs +2 -2
- package/highlevel/methods/premium/create-business-chat-link.cjs +2 -2
- package/highlevel/methods/premium/edit-business-chat-link.cjs +2 -2
- package/highlevel/methods/premium/get-boost-stats.cjs +2 -2
- package/highlevel/methods/premium/get-boosts.cjs +2 -2
- package/highlevel/methods/premium/get-business-chat-links.cjs +2 -2
- package/highlevel/methods/premium/get-business-connection.cjs +2 -2
- package/highlevel/methods/premium/get-my-boost-slots.cjs +2 -2
- package/highlevel/methods/premium/get-star-gift-options.cjs +9 -3
- package/highlevel/methods/premium/get-star-gift-options.js +7 -1
- package/highlevel/methods/premium/get-star-gifts.cjs +2 -2
- package/highlevel/methods/premium/get-stars-transactions.cjs +2 -2
- package/highlevel/methods/premium/iter-boosters.cjs +2 -2
- package/highlevel/methods/premium/iter-star-gifts.cjs +2 -2
- package/highlevel/methods/premium/iter-stars-transactions.cjs +2 -2
- package/highlevel/methods/premium/send-star-gift.cjs +12 -4
- package/highlevel/methods/premium/send-star-gift.d.cts +2 -0
- package/highlevel/methods/premium/send-star-gift.d.ts +2 -0
- package/highlevel/methods/premium/send-star-gift.js +10 -2
- package/highlevel/methods/premium/set-business-intro.cjs +2 -2
- package/highlevel/methods/premium/set-business-work-hours.cjs +2 -2
- package/highlevel/methods/premium/transfer-star-gift.cjs +31 -0
- package/highlevel/methods/premium/transfer-star-gift.d.cts +24 -0
- package/highlevel/methods/premium/transfer-star-gift.d.ts +24 -0
- package/highlevel/methods/premium/transfer-star-gift.js +26 -0
- package/highlevel/methods/premium/upgrade-star-gift.cjs +30 -0
- package/highlevel/methods/premium/upgrade-star-gift.d.cts +26 -0
- package/highlevel/methods/premium/upgrade-star-gift.d.ts +26 -0
- package/highlevel/methods/premium/upgrade-star-gift.js +25 -0
- package/highlevel/methods/stickers/_utils.cjs +2 -2
- package/highlevel/methods/stickers/add-sticker-to-set.cjs +2 -2
- package/highlevel/methods/stickers/create-sticker-set.cjs +2 -2
- package/highlevel/methods/stickers/delete-sticker-from-set.cjs +2 -2
- package/highlevel/methods/stickers/get-custom-emojis.cjs +2 -2
- package/highlevel/methods/stickers/get-installed-stickers.cjs +2 -2
- package/highlevel/methods/stickers/get-my-sticker-sets.cjs +2 -2
- package/highlevel/methods/stickers/get-sticker-set.cjs +2 -2
- package/highlevel/methods/stickers/move-sticker-in-set.cjs +2 -2
- package/highlevel/methods/stickers/replace-sticker-in-set.cjs +2 -2
- package/highlevel/methods/stickers/set-chat-sticker-set.cjs +2 -2
- package/highlevel/methods/stickers/set-sticker-set-thumb.cjs +2 -2
- package/highlevel/methods/stories/can-send-story.cjs +2 -2
- package/highlevel/methods/stories/delete-stories.cjs +2 -2
- package/highlevel/methods/stories/edit-story.cjs +2 -2
- package/highlevel/methods/stories/find-in-update.cjs +2 -2
- package/highlevel/methods/stories/get-all-stories.cjs +2 -2
- package/highlevel/methods/stories/get-peer-stories.cjs +2 -2
- package/highlevel/methods/stories/get-profile-stories.cjs +2 -2
- package/highlevel/methods/stories/get-stories-by-id.cjs +2 -2
- package/highlevel/methods/stories/get-stories-interactions.cjs +2 -2
- package/highlevel/methods/stories/get-story-link.cjs +2 -2
- package/highlevel/methods/stories/get-story-viewers.cjs +2 -2
- package/highlevel/methods/stories/hide-my-stories-views.cjs +2 -2
- package/highlevel/methods/stories/increment-stories-views.cjs +2 -2
- package/highlevel/methods/stories/iter-all-stories.cjs +2 -2
- package/highlevel/methods/stories/iter-profile-stories.cjs +2 -2
- package/highlevel/methods/stories/iter-story-viewers.cjs +2 -2
- package/highlevel/methods/stories/read-stories.cjs +2 -2
- package/highlevel/methods/stories/send-story-reaction.cjs +2 -2
- package/highlevel/methods/stories/send-story.cjs +2 -2
- package/highlevel/methods/stories/toggle-peer-stories-archived.cjs +2 -2
- package/highlevel/methods/stories/toggle-stories-pinned.cjs +2 -2
- package/highlevel/methods/users/block-user.cjs +2 -2
- package/highlevel/methods/users/delete-profile-photos.cjs +2 -2
- package/highlevel/methods/users/edit-close-friends.cjs +2 -2
- package/highlevel/methods/users/get-common-chats.cjs +2 -2
- package/highlevel/methods/users/get-global-ttl.cjs +2 -2
- package/highlevel/methods/users/get-me.cjs +2 -2
- package/highlevel/methods/users/get-my-username.cjs +2 -2
- package/highlevel/methods/users/get-profile-photo.cjs +2 -2
- package/highlevel/methods/users/get-profile-photos.cjs +2 -2
- package/highlevel/methods/users/get-users.cjs +2 -2
- package/highlevel/methods/users/is-peer-available.cjs +2 -2
- package/highlevel/methods/users/iter-profile-photos.cjs +2 -2
- package/highlevel/methods/users/resolve-peer-many.cjs +2 -2
- package/highlevel/methods/users/resolve-peer.cjs +2 -2
- package/highlevel/methods/users/set-emoji-status.cjs +2 -2
- package/highlevel/methods/users/set-global-ttl.cjs +2 -2
- package/highlevel/methods/users/set-my-birthday.cjs +2 -2
- package/highlevel/methods/users/set-my-profile-photo.cjs +2 -2
- package/highlevel/methods/users/set-my-username.cjs +2 -2
- package/highlevel/methods/users/set-online.cjs +2 -2
- package/highlevel/methods/users/unblock-user.cjs +2 -2
- package/highlevel/methods/users/update-profile.cjs +2 -2
- package/highlevel/methods.d.cts +2 -0
- package/highlevel/methods.d.ts +2 -0
- package/highlevel/storage/service/current-user.cjs +2 -2
- package/highlevel/storage/service/peers.cjs +2 -2
- package/highlevel/storage/service/ref-messages.cjs +2 -2
- package/highlevel/storage/service/updates.cjs +2 -2
- package/highlevel/storage/storage.cjs +2 -2
- package/highlevel/types/auth/sent-code.cjs +2 -2
- package/highlevel/types/bots/command-scope/inner.cjs +2 -2
- package/highlevel/types/bots/game-high-score.cjs +2 -2
- package/highlevel/types/bots/inline-message/factories.cjs +2 -2
- package/highlevel/types/bots/inline-result/factories.cjs +2 -2
- package/highlevel/types/bots/keyboards/builder.cjs +2 -2
- package/highlevel/types/bots/keyboards/factories.cjs +2 -2
- package/highlevel/types/bots/webview.cjs +2 -2
- package/highlevel/types/conversation.cjs +2 -2
- package/highlevel/types/errors.cjs +2 -2
- package/highlevel/types/files/file-location.cjs +2 -2
- package/highlevel/types/files/uploaded-file.cjs +2 -2
- package/highlevel/types/files/web-document.cjs +2 -2
- package/highlevel/types/index.d.cts +0 -1
- package/highlevel/types/index.d.ts +0 -1
- package/highlevel/types/media/audio.cjs +2 -2
- package/highlevel/types/media/contact.cjs +2 -2
- package/highlevel/types/media/dice.cjs +2 -2
- package/highlevel/types/media/document-utils.cjs +2 -2
- package/highlevel/types/media/document.cjs +2 -2
- package/highlevel/types/media/extended-media.cjs +2 -2
- package/highlevel/types/media/game.cjs +2 -2
- package/highlevel/types/media/input-media/factories.cjs +2 -2
- package/highlevel/types/media/invoice.cjs +2 -2
- package/highlevel/types/media/location.cjs +2 -2
- package/highlevel/types/media/paid-media.cjs +2 -2
- package/highlevel/types/media/photo.cjs +2 -2
- package/highlevel/types/media/poll.cjs +2 -2
- package/highlevel/types/media/sticker.cjs +2 -2
- package/highlevel/types/media/story.cjs +2 -2
- package/highlevel/types/media/thumbnail.cjs +2 -2
- package/highlevel/types/media/venue.cjs +2 -2
- package/highlevel/types/media/video.cjs +2 -2
- package/highlevel/types/media/voice.cjs +2 -2
- package/highlevel/types/media/web-page.cjs +2 -2
- package/highlevel/types/messages/dialog.cjs +5 -3
- package/highlevel/types/messages/dialog.js +3 -1
- package/highlevel/types/messages/draft-message.cjs +2 -2
- package/highlevel/types/messages/fact-check.cjs +2 -2
- package/highlevel/types/messages/input-message-id.cjs +2 -2
- package/highlevel/types/messages/message-action.cjs +11 -6
- package/highlevel/types/messages/message-action.d.cts +14 -3
- package/highlevel/types/messages/message-action.d.ts +14 -3
- package/highlevel/types/messages/message-action.js +9 -4
- package/highlevel/types/messages/message-effect.cjs +2 -2
- package/highlevel/types/messages/message-entity.cjs +2 -2
- package/highlevel/types/messages/message-forward.cjs +2 -2
- package/highlevel/types/messages/message-media.cjs +2 -2
- package/highlevel/types/messages/message-reactions.cjs +2 -2
- package/highlevel/types/messages/message-replies.cjs +2 -2
- package/highlevel/types/messages/message.cjs +13 -3
- package/highlevel/types/messages/message.d.cts +7 -0
- package/highlevel/types/messages/message.d.ts +7 -0
- package/highlevel/types/messages/message.js +11 -1
- package/highlevel/types/messages/replied-message.cjs +2 -2
- package/highlevel/types/messages/search-filters.cjs +2 -2
- package/highlevel/types/misc/collectible-info.cjs +2 -2
- package/highlevel/types/misc/entities.cjs +2 -2
- package/highlevel/types/misc/input-privacy-rule/allow.cjs +2 -2
- package/highlevel/types/misc/input-privacy-rule/bundle.cjs +2 -2
- package/highlevel/types/misc/input-privacy-rule/disallow.cjs +2 -2
- package/highlevel/types/misc/sticker-set.cjs +2 -2
- package/highlevel/types/misc/takeout-session.cjs +2 -2
- package/highlevel/types/peers/bot-info.cjs +5 -2
- package/highlevel/types/peers/bot-info.d.cts +1 -0
- package/highlevel/types/peers/bot-info.d.ts +1 -0
- package/highlevel/types/peers/bot-info.js +3 -0
- package/highlevel/types/peers/bot-verification.cjs +27 -0
- package/highlevel/types/peers/bot-verification.d.cts +12 -0
- package/highlevel/types/peers/bot-verification.d.ts +12 -0
- package/highlevel/types/peers/bot-verification.js +22 -0
- package/highlevel/types/peers/chat-colors.cjs +2 -2
- package/highlevel/types/peers/chat-event/actions.cjs +2 -2
- package/highlevel/types/peers/chat-event/filters.cjs +2 -2
- package/highlevel/types/peers/chat-event/index.cjs +2 -2
- package/highlevel/types/peers/chat-invite-link-member.cjs +2 -2
- package/highlevel/types/peers/chat-invite-link.cjs +2 -2
- package/highlevel/types/peers/chat-location.cjs +2 -2
- package/highlevel/types/peers/chat-member.cjs +2 -2
- package/highlevel/types/peers/chat-permissions.cjs +2 -2
- package/highlevel/types/peers/chat-photo.cjs +2 -2
- package/highlevel/types/peers/chat-preview.cjs +10 -2
- package/highlevel/types/peers/chat-preview.d.cts +6 -0
- package/highlevel/types/peers/chat-preview.d.ts +6 -0
- package/highlevel/types/peers/chat-preview.js +8 -0
- package/highlevel/types/peers/chat.cjs +10 -2
- package/highlevel/types/peers/chat.d.cts +5 -0
- package/highlevel/types/peers/chat.d.ts +5 -0
- package/highlevel/types/peers/chat.js +8 -0
- package/highlevel/types/peers/chatlist-preview.cjs +3 -3
- package/highlevel/types/peers/chatlist-preview.d.cts +2 -1
- package/highlevel/types/peers/chatlist-preview.d.ts +2 -1
- package/highlevel/types/peers/chatlist-preview.js +1 -1
- package/highlevel/types/peers/forum-topic.cjs +2 -2
- package/highlevel/types/peers/full-chat.cjs +10 -3
- package/highlevel/types/peers/full-chat.d.cts +3 -0
- package/highlevel/types/peers/full-chat.d.ts +3 -0
- package/highlevel/types/peers/full-chat.js +8 -1
- package/highlevel/types/peers/full-user.cjs +10 -3
- package/highlevel/types/peers/full-user.d.cts +3 -0
- package/highlevel/types/peers/full-user.d.ts +3 -0
- package/highlevel/types/peers/full-user.js +8 -1
- package/highlevel/types/peers/index.d.cts +1 -0
- package/highlevel/types/peers/index.d.ts +1 -0
- package/highlevel/types/peers/peer.cjs +2 -2
- package/highlevel/types/peers/peers-index.cjs +2 -2
- package/highlevel/types/peers/user.cjs +9 -2
- package/highlevel/types/peers/user.d.cts +5 -0
- package/highlevel/types/peers/user.d.ts +5 -0
- package/highlevel/types/peers/user.js +7 -0
- package/highlevel/types/premium/boost-slot.cjs +2 -2
- package/highlevel/types/premium/boost-stats.cjs +2 -2
- package/highlevel/types/premium/boost.cjs +2 -2
- package/highlevel/types/premium/business-account.cjs +2 -2
- package/highlevel/types/premium/business-chat-link.cjs +2 -2
- package/highlevel/types/premium/business-connection.cjs +2 -2
- package/highlevel/types/premium/business-intro.cjs +2 -2
- package/highlevel/types/premium/business-location.cjs +2 -2
- package/highlevel/types/premium/business-work-hours.cjs +2 -2
- package/highlevel/types/premium/index.d.cts +1 -0
- package/highlevel/types/premium/index.d.ts +1 -0
- package/highlevel/types/premium/stars-gift-unique.cjs +148 -0
- package/highlevel/types/premium/stars-gift-unique.d.cts +70 -0
- package/highlevel/types/premium/stars-gift-unique.d.ts +70 -0
- package/highlevel/types/premium/stars-gift-unique.js +143 -0
- package/highlevel/types/premium/stars-gift.cjs +33 -4
- package/highlevel/types/premium/stars-gift.d.cts +19 -4
- package/highlevel/types/premium/stars-gift.d.ts +19 -4
- package/highlevel/types/premium/stars-gift.js +31 -2
- package/highlevel/types/premium/stars-status.cjs +2 -2
- package/highlevel/types/premium/stars-transaction.cjs +34 -17
- package/highlevel/types/premium/stars-transaction.d.cts +15 -0
- package/highlevel/types/premium/stars-transaction.d.ts +15 -0
- package/highlevel/types/premium/stars-transaction.js +32 -15
- package/highlevel/types/reactions/emoji-status.cjs +2 -2
- package/highlevel/types/reactions/peer-reaction.cjs +2 -2
- package/highlevel/types/reactions/reaction-count.cjs +2 -2
- package/highlevel/types/reactions/types.cjs +2 -2
- package/highlevel/types/stories/all-stories.cjs +2 -2
- package/highlevel/types/stories/interactive/base.cjs +2 -2
- package/highlevel/types/stories/interactive/channel-post.cjs +2 -2
- package/highlevel/types/stories/interactive/index.cjs +2 -2
- package/highlevel/types/stories/interactive/input.cjs +2 -2
- package/highlevel/types/stories/interactive/location.cjs +2 -2
- package/highlevel/types/stories/interactive/reaction.cjs +2 -2
- package/highlevel/types/stories/interactive/url.cjs +2 -2
- package/highlevel/types/stories/interactive/venue.cjs +2 -2
- package/highlevel/types/stories/interactive/weather.cjs +2 -2
- package/highlevel/types/stories/peer-stories.cjs +2 -2
- package/highlevel/types/stories/stealth-mode.cjs +2 -2
- package/highlevel/types/stories/story-interactions.cjs +2 -2
- package/highlevel/types/stories/story-viewer.cjs +2 -2
- package/highlevel/types/stories/story.cjs +2 -2
- package/highlevel/types/updates/bot-chat-join-request.cjs +2 -2
- package/highlevel/types/updates/bot-reaction.cjs +2 -2
- package/highlevel/types/updates/bot-stopped.cjs +2 -2
- package/highlevel/types/updates/business-message.cjs +2 -3
- package/highlevel/types/updates/business-message.d.cts +0 -1
- package/highlevel/types/updates/business-message.d.ts +0 -1
- package/highlevel/types/updates/business-message.js +0 -1
- package/highlevel/types/updates/callback-query.cjs +2 -2
- package/highlevel/types/updates/chat-join-request.cjs +2 -2
- package/highlevel/types/updates/chat-member-update.cjs +2 -2
- package/highlevel/types/updates/chosen-inline-result.cjs +2 -2
- package/highlevel/types/updates/delete-business-message-update.cjs +2 -2
- package/highlevel/types/updates/delete-message-update.cjs +2 -2
- package/highlevel/types/updates/delete-story-update.cjs +2 -2
- package/highlevel/types/updates/history-read-update.cjs +2 -2
- package/highlevel/types/updates/inline-query.cjs +2 -2
- package/highlevel/types/updates/parse-update.cjs +2 -2
- package/highlevel/types/updates/poll-update.cjs +2 -2
- package/highlevel/types/updates/poll-vote.cjs +2 -2
- package/highlevel/types/updates/pre-checkout-query.cjs +2 -2
- package/highlevel/types/updates/story-update.cjs +2 -2
- package/highlevel/types/updates/user-status-update.cjs +2 -2
- package/highlevel/types/updates/user-typing-update.cjs +2 -2
- package/highlevel/updates/manager.cjs +2 -2
- package/highlevel/updates/parsed.cjs +2 -2
- package/highlevel/updates/types.cjs +2 -2
- package/highlevel/updates/utils.cjs +2 -2
- package/highlevel/utils/convert-file-id.cjs +2 -2
- package/highlevel/utils/entities.cjs +2 -2
- package/highlevel/utils/file-type.cjs +2 -2
- package/highlevel/utils/file-utils.cjs +2 -2
- package/highlevel/utils/inline-utils.cjs +2 -2
- package/highlevel/utils/inspectable.cjs +2 -2
- package/highlevel/utils/memoize.cjs +2 -2
- package/highlevel/utils/misc-utils.cjs +2 -2
- package/highlevel/utils/peer-utils.cjs +2 -2
- package/highlevel/utils/query-batcher.cjs +2 -2
- package/highlevel/utils/rps-meter.cjs +2 -2
- package/highlevel/utils/stream-utils.cjs +2 -2
- package/highlevel/utils/string-session.cjs +2 -2
- package/highlevel/utils/voice-utils.cjs +2 -2
- package/highlevel/worker/app-config.cjs +2 -2
- package/highlevel/worker/errors.cjs +2 -2
- package/highlevel/worker/invoker.cjs +2 -2
- package/highlevel/worker/port.cjs +4 -4
- package/highlevel/worker/port.d.cts +1 -1
- package/highlevel/worker/port.d.ts +1 -1
- package/highlevel/worker/port.js +2 -2
- package/highlevel/worker/protocol.cjs +2 -2
- package/highlevel/worker/storage.cjs +2 -2
- package/highlevel/worker/worker.cjs +2 -2
- package/index.cjs +9 -5
- package/index.js +7 -3
- package/methods.cjs +6 -2
- package/methods.js +4 -0
- package/network/auth-key.cjs +2 -2
- package/network/authorization.cjs +2 -2
- package/network/client.cjs +2 -2
- package/network/config-manager.cjs +2 -2
- package/network/middlewares/bundle.cjs +2 -2
- package/network/middlewares/default.cjs +2 -2
- package/network/middlewares/flood-waiter.cjs +2 -2
- package/network/middlewares/internal-errors.cjs +2 -2
- package/network/middlewares/on-error.cjs +2 -2
- package/network/middlewares/on-method.cjs +2 -2
- package/network/mtproto-session.cjs +2 -2
- package/network/mtproxy/_fake-tls.cjs +2 -2
- package/network/mtproxy/index.cjs +2 -2
- package/network/multi-session-connection.cjs +2 -2
- package/network/network-manager.cjs +3 -3
- package/network/network-manager.js +1 -1
- package/network/persistent-connection.cjs +2 -2
- package/network/server-salt.cjs +2 -2
- package/network/session-connection.cjs +2 -2
- package/network/transports/abstract.cjs +2 -2
- package/network/transports/intermediate.cjs +2 -2
- package/network/transports/obfuscated.cjs +2 -2
- package/package.json +4 -5
- package/storage/driver.cjs +2 -2
- package/storage/memory/driver.cjs +2 -2
- package/storage/memory/index.cjs +2 -2
- package/storage/memory/repository/auth-keys.cjs +2 -2
- package/storage/memory/repository/kv.cjs +2 -2
- package/storage/memory/repository/peers.cjs +2 -2
- package/storage/memory/repository/ref-messages.cjs +2 -2
- package/storage/service/auth-keys.cjs +2 -2
- package/storage/service/base.cjs +2 -2
- package/storage/service/default-dcs.cjs +2 -2
- package/storage/service/future-salts.cjs +2 -2
- package/storage/sqlite/driver.cjs +2 -2
- package/storage/sqlite/index.cjs +2 -2
- package/storage/sqlite/repository/auth-keys.cjs +2 -2
- package/storage/sqlite/repository/kv.cjs +2 -2
- package/storage/sqlite/repository/peers.cjs +2 -2
- package/storage/sqlite/repository/ref-messages.cjs +2 -2
- package/storage/storage.cjs +2 -2
- package/types/errors.cjs +2 -2
- package/types/utils.cjs +2 -2
- package/utils/abort-signal.cjs +2 -2
- package/utils/bigint-utils.cjs +2 -2
- package/utils/binary/asn1-parser.cjs +2 -2
- package/utils/crypto/abstract.cjs +2 -2
- package/utils/crypto/factorization.cjs +2 -2
- package/utils/crypto/keys.cjs +2 -2
- package/utils/crypto/miller-rabin.cjs +2 -2
- package/utils/crypto/mtproto.cjs +2 -2
- package/utils/crypto/password.cjs +2 -2
- package/utils/dcs.cjs +2 -2
- package/utils/early-timer.cjs +2 -2
- package/utils/error-reporting.cjs +2 -2
- package/utils/function-utils.cjs +2 -2
- package/utils/linked-list.cjs +2 -2
- package/utils/links/bots.cjs +2 -2
- package/utils/links/bundle.cjs +2 -2
- package/utils/links/calls.cjs +2 -2
- package/utils/links/chat.cjs +2 -2
- package/utils/links/common.cjs +2 -2
- package/utils/links/misc.cjs +2 -2
- package/utils/links/proxy.cjs +2 -2
- package/utils/links/stickers.cjs +2 -2
- package/utils/links/user.cjs +2 -2
- package/utils/logger.cjs +2 -2
- package/utils/long-utils.cjs +2 -2
- package/utils/misc-utils.cjs +2 -2
- package/utils/peer-utils.cjs +2 -2
- package/utils/sorted-array.cjs +2 -2
- package/utils/tl-json.cjs +2 -2
- package/utils/type-assertions.cjs +2 -2
- package/utils.cjs +2 -2
- package/worker.cjs +2 -2
- package/highlevel/types/calls/discard-reason.cjs +0 -38
- package/highlevel/types/calls/discard-reason.d.cts +0 -13
- package/highlevel/types/calls/discard-reason.d.ts +0 -13
- package/highlevel/types/calls/discard-reason.js +0 -33
- package/highlevel/types/calls/index.d.cts +0 -1
- package/highlevel/types/calls/index.d.ts +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
if (typeof globalThis !== "undefined" && !globalThis._MTCUTE_CJS_DEPRECATION_WARNED) {
|
|
2
2
|
globalThis._MTCUTE_CJS_DEPRECATION_WARNED = true;
|
|
3
|
-
console.warn("[mtcute
|
|
4
|
-
console.warn("[mtcute
|
|
3
|
+
console.warn("[@mtcute/core] CommonJS support is deprecated and will be removed in 0.25.0. Please consider switching to ESM, it's " + (/* @__PURE__ */ new Date()).getFullYear() + " already.");
|
|
4
|
+
console.warn("[@mtcute/core] Learn more about switching to ESM: https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c");
|
|
5
5
|
}
|
|
6
6
|
"use strict";
|
|
7
7
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
if (typeof globalThis !== "undefined" && !globalThis._MTCUTE_CJS_DEPRECATION_WARNED) {
|
|
2
2
|
globalThis._MTCUTE_CJS_DEPRECATION_WARNED = true;
|
|
3
|
-
console.warn("[mtcute
|
|
4
|
-
console.warn("[mtcute
|
|
3
|
+
console.warn("[@mtcute/core] CommonJS support is deprecated and will be removed in 0.25.0. Please consider switching to ESM, it's " + (/* @__PURE__ */ new Date()).getFullYear() + " already.");
|
|
4
|
+
console.warn("[@mtcute/core] Learn more about switching to ESM: https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c");
|
|
5
5
|
}
|
|
6
6
|
"use strict";
|
|
7
7
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
if (typeof globalThis !== "undefined" && !globalThis._MTCUTE_CJS_DEPRECATION_WARNED) {
|
|
2
2
|
globalThis._MTCUTE_CJS_DEPRECATION_WARNED = true;
|
|
3
|
-
console.warn("[mtcute
|
|
4
|
-
console.warn("[mtcute
|
|
3
|
+
console.warn("[@mtcute/core] CommonJS support is deprecated and will be removed in 0.25.0. Please consider switching to ESM, it's " + (/* @__PURE__ */ new Date()).getFullYear() + " already.");
|
|
4
|
+
console.warn("[@mtcute/core] Learn more about switching to ESM: https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c");
|
|
5
5
|
}
|
|
6
6
|
"use strict";
|
|
7
7
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
if (typeof globalThis !== "undefined" && !globalThis._MTCUTE_CJS_DEPRECATION_WARNED) {
|
|
2
2
|
globalThis._MTCUTE_CJS_DEPRECATION_WARNED = true;
|
|
3
|
-
console.warn("[mtcute
|
|
4
|
-
console.warn("[mtcute
|
|
3
|
+
console.warn("[@mtcute/core] CommonJS support is deprecated and will be removed in 0.25.0. Please consider switching to ESM, it's " + (/* @__PURE__ */ new Date()).getFullYear() + " already.");
|
|
4
|
+
console.warn("[@mtcute/core] Learn more about switching to ESM: https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c");
|
|
5
5
|
}
|
|
6
6
|
"use strict";
|
|
7
7
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
if (typeof globalThis !== "undefined" && !globalThis._MTCUTE_CJS_DEPRECATION_WARNED) {
|
|
2
2
|
globalThis._MTCUTE_CJS_DEPRECATION_WARNED = true;
|
|
3
|
-
console.warn("[mtcute
|
|
4
|
-
console.warn("[mtcute
|
|
3
|
+
console.warn("[@mtcute/core] CommonJS support is deprecated and will be removed in 0.25.0. Please consider switching to ESM, it's " + (/* @__PURE__ */ new Date()).getFullYear() + " already.");
|
|
4
|
+
console.warn("[@mtcute/core] Learn more about switching to ESM: https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c");
|
|
5
5
|
}
|
|
6
6
|
"use strict";
|
|
7
7
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
@@ -7,6 +7,7 @@ export * from './business-connection.js';
|
|
|
7
7
|
export * from './business-intro.js';
|
|
8
8
|
export * from './business-location.js';
|
|
9
9
|
export * from './business-work-hours.js';
|
|
10
|
+
export * from './stars-gift-unique.js';
|
|
10
11
|
export * from './stars-gift.js';
|
|
11
12
|
export * from './stars-status.js';
|
|
12
13
|
export * from './stars-transaction.js';
|
|
@@ -7,6 +7,7 @@ export * from './business-connection.js';
|
|
|
7
7
|
export * from './business-intro.js';
|
|
8
8
|
export * from './business-location.js';
|
|
9
9
|
export * from './business-work-hours.js';
|
|
10
|
+
export * from './stars-gift-unique.js';
|
|
10
11
|
export * from './stars-gift.js';
|
|
11
12
|
export * from './stars-status.js';
|
|
12
13
|
export * from './stars-transaction.js';
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
if (typeof globalThis !== "undefined" && !globalThis._MTCUTE_CJS_DEPRECATION_WARNED) {
|
|
2
|
+
globalThis._MTCUTE_CJS_DEPRECATION_WARNED = true;
|
|
3
|
+
console.warn("[@mtcute/core] CommonJS support is deprecated and will be removed in 0.25.0. Please consider switching to ESM, it's " + (/* @__PURE__ */ new Date()).getFullYear() + " already.");
|
|
4
|
+
console.warn("[@mtcute/core] Learn more about switching to ESM: https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c");
|
|
5
|
+
}
|
|
6
|
+
"use strict";
|
|
7
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
8
|
+
const utils = require("@fuman/utils");
|
|
9
|
+
const inspectable = require("../../utils/inspectable.cjs");
|
|
10
|
+
const memoize = require("../../utils/memoize.cjs");
|
|
11
|
+
const documentUtils = require("../media/document-utils.cjs");
|
|
12
|
+
const user = require("../peers/user.cjs");
|
|
13
|
+
class StarGiftUniqueAttribute {
|
|
14
|
+
constructor(raw) {
|
|
15
|
+
this.raw = raw;
|
|
16
|
+
}
|
|
17
|
+
/** Rarity permille of the attribute */
|
|
18
|
+
get permille() {
|
|
19
|
+
return this.raw.rarityPermille;
|
|
20
|
+
}
|
|
21
|
+
/** Display name of the attribute */
|
|
22
|
+
get name() {
|
|
23
|
+
return this.raw.name;
|
|
24
|
+
}
|
|
25
|
+
get sticker() {
|
|
26
|
+
utils.assert(this.raw.document._ === "document");
|
|
27
|
+
const parsed = documentUtils.parseDocument(this.raw.document);
|
|
28
|
+
utils.assert(parsed.type === "sticker");
|
|
29
|
+
return parsed;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
const StarGiftUniqueAttribute$1 = /* @__PURE__ */ inspectable.makeInspectable(StarGiftUniqueAttribute);
|
|
33
|
+
const StarGiftUniqueAttribute$2 = /* @__PURE__ */ memoize.memoizeGetters(StarGiftUniqueAttribute$1, ["sticker"]);
|
|
34
|
+
class StarGiftUniqueBackdrop {
|
|
35
|
+
constructor(raw) {
|
|
36
|
+
this.raw = raw;
|
|
37
|
+
}
|
|
38
|
+
/** Rarity permille of the attribute */
|
|
39
|
+
get permille() {
|
|
40
|
+
return this.raw.rarityPermille;
|
|
41
|
+
}
|
|
42
|
+
/** Display name of the attribute */
|
|
43
|
+
get name() {
|
|
44
|
+
return this.raw.name;
|
|
45
|
+
}
|
|
46
|
+
get centerColor() {
|
|
47
|
+
return this.raw.centerColor;
|
|
48
|
+
}
|
|
49
|
+
get edgeColor() {
|
|
50
|
+
return this.raw.edgeColor;
|
|
51
|
+
}
|
|
52
|
+
get patternColor() {
|
|
53
|
+
return this.raw.patternColor;
|
|
54
|
+
}
|
|
55
|
+
get textColor() {
|
|
56
|
+
return this.raw.textColor;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
const StarGiftUniqueBackdrop$1 = /* @__PURE__ */ inspectable.makeInspectable(StarGiftUniqueBackdrop);
|
|
60
|
+
class StarGiftUniqueOriginalDetails {
|
|
61
|
+
constructor(raw, _peers) {
|
|
62
|
+
this.raw = raw;
|
|
63
|
+
this._peers = _peers;
|
|
64
|
+
}
|
|
65
|
+
/** ID of the user who sent the original star gift */
|
|
66
|
+
get sender() {
|
|
67
|
+
return this.raw.senderId ? new user.User(this._peers.user(this.raw.senderId)) : null;
|
|
68
|
+
}
|
|
69
|
+
/** ID of the user who received the original star gift */
|
|
70
|
+
get recipient() {
|
|
71
|
+
return new user.User(this._peers.user(this.raw.recipientId));
|
|
72
|
+
}
|
|
73
|
+
/** Date when the original star gift was sent */
|
|
74
|
+
get date() {
|
|
75
|
+
return new Date(this.raw.date * 1e3);
|
|
76
|
+
}
|
|
77
|
+
/** Message attached to the original star gift */
|
|
78
|
+
get message() {
|
|
79
|
+
return this.raw.message ?? null;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
class StarGiftUnique {
|
|
83
|
+
constructor(raw, _peers) {
|
|
84
|
+
this.raw = raw;
|
|
85
|
+
this._peers = _peers;
|
|
86
|
+
for (const attr of this.raw.attributes) {
|
|
87
|
+
if (attr._ === "starGiftAttributeModel") {
|
|
88
|
+
this._model = attr;
|
|
89
|
+
} else if (attr._ === "starGiftAttributePattern") {
|
|
90
|
+
this._pattern = attr;
|
|
91
|
+
} else if (attr._ === "starGiftAttributeBackdrop") {
|
|
92
|
+
this._backdrop = attr;
|
|
93
|
+
} else if (attr._ === "starGiftAttributeOriginalDetails") {
|
|
94
|
+
this._originalDetails = attr;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
utils.assert(this._model !== void 0);
|
|
98
|
+
utils.assert(this._pattern !== void 0);
|
|
99
|
+
utils.assert(this._backdrop !== void 0);
|
|
100
|
+
}
|
|
101
|
+
_model;
|
|
102
|
+
_pattern;
|
|
103
|
+
_backdrop;
|
|
104
|
+
_originalDetails;
|
|
105
|
+
/** Whether this gift is a unique gift */
|
|
106
|
+
isUnique = true;
|
|
107
|
+
/** Number of the NFT */
|
|
108
|
+
get num() {
|
|
109
|
+
return this.raw.num;
|
|
110
|
+
}
|
|
111
|
+
/** Title of the NFT */
|
|
112
|
+
get title() {
|
|
113
|
+
return this.raw.title;
|
|
114
|
+
}
|
|
115
|
+
/** ID of the user who owns this gift */
|
|
116
|
+
get owner() {
|
|
117
|
+
return new user.User(this._peers.user(this.raw.ownerId));
|
|
118
|
+
}
|
|
119
|
+
get availabilityIssued() {
|
|
120
|
+
return this.raw.availabilityIssued;
|
|
121
|
+
}
|
|
122
|
+
get availabilityTotal() {
|
|
123
|
+
return this.raw.availabilityTotal;
|
|
124
|
+
}
|
|
125
|
+
/** Model (i.e. the gift itself) of the unique star gift */
|
|
126
|
+
get model() {
|
|
127
|
+
return new StarGiftUniqueAttribute(this._model);
|
|
128
|
+
}
|
|
129
|
+
/** Pattern of the unique star gift */
|
|
130
|
+
get pattern() {
|
|
131
|
+
return new StarGiftUniqueAttribute(this._pattern);
|
|
132
|
+
}
|
|
133
|
+
/** Backdrop of the unique star gift */
|
|
134
|
+
get backdrop() {
|
|
135
|
+
return new StarGiftUniqueBackdrop(this._backdrop);
|
|
136
|
+
}
|
|
137
|
+
/** Details about the original star gift (if they were retained when minting) */
|
|
138
|
+
get originalDetails() {
|
|
139
|
+
if (!this._originalDetails) return null;
|
|
140
|
+
return new StarGiftUniqueOriginalDetails(this._originalDetails, this._peers);
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
const StarGiftUnique$1 = /* @__PURE__ */ inspectable.makeInspectable(StarGiftUnique);
|
|
144
|
+
const StarGiftUnique$2 = /* @__PURE__ */ memoize.memoizeGetters(StarGiftUnique$1, ["model", "pattern", "backdrop", "originalDetails"]);
|
|
145
|
+
exports.StarGiftUnique = StarGiftUnique$2;
|
|
146
|
+
exports.StarGiftUniqueAttribute = StarGiftUniqueAttribute$2;
|
|
147
|
+
exports.StarGiftUniqueBackdrop = StarGiftUniqueBackdrop$1;
|
|
148
|
+
exports.StarGiftUniqueOriginalDetails = StarGiftUniqueOriginalDetails;
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { tl } from '@mtcute/tl';
|
|
2
|
+
import { Sticker } from '../media/sticker.js';
|
|
3
|
+
import { TextWithEntities } from '../misc/entities.js';
|
|
4
|
+
import { PeersIndex } from '../peers/peers-index.js';
|
|
5
|
+
import { User } from '../peers/user.js';
|
|
6
|
+
/** An attribute of a unique star gift containing a sticker */
|
|
7
|
+
export declare class StarGiftUniqueAttribute {
|
|
8
|
+
readonly raw: tl.RawStarGiftAttributeModel | tl.RawStarGiftAttributePattern;
|
|
9
|
+
constructor(raw: tl.RawStarGiftAttributeModel | tl.RawStarGiftAttributePattern);
|
|
10
|
+
/** Rarity permille of the attribute */
|
|
11
|
+
get permille(): number;
|
|
12
|
+
/** Display name of the attribute */
|
|
13
|
+
get name(): string;
|
|
14
|
+
get sticker(): Sticker;
|
|
15
|
+
}
|
|
16
|
+
/** Information about a unique star gift's backdrop */
|
|
17
|
+
export declare class StarGiftUniqueBackdrop {
|
|
18
|
+
readonly raw: tl.RawStarGiftAttributeBackdrop;
|
|
19
|
+
constructor(raw: tl.RawStarGiftAttributeBackdrop);
|
|
20
|
+
/** Rarity permille of the attribute */
|
|
21
|
+
get permille(): number;
|
|
22
|
+
/** Display name of the attribute */
|
|
23
|
+
get name(): string;
|
|
24
|
+
get centerColor(): number;
|
|
25
|
+
get edgeColor(): number;
|
|
26
|
+
get patternColor(): number;
|
|
27
|
+
get textColor(): number;
|
|
28
|
+
}
|
|
29
|
+
/** Details about the original star gift */
|
|
30
|
+
export declare class StarGiftUniqueOriginalDetails {
|
|
31
|
+
readonly raw: tl.RawStarGiftAttributeOriginalDetails;
|
|
32
|
+
readonly _peers: PeersIndex;
|
|
33
|
+
constructor(raw: tl.RawStarGiftAttributeOriginalDetails, _peers: PeersIndex);
|
|
34
|
+
/** ID of the user who sent the original star gift */
|
|
35
|
+
get sender(): User | null;
|
|
36
|
+
/** ID of the user who received the original star gift */
|
|
37
|
+
get recipient(): User;
|
|
38
|
+
/** Date when the original star gift was sent */
|
|
39
|
+
get date(): Date;
|
|
40
|
+
/** Message attached to the original star gift */
|
|
41
|
+
get message(): TextWithEntities | null;
|
|
42
|
+
}
|
|
43
|
+
/** A unique star gift */
|
|
44
|
+
export declare class StarGiftUnique {
|
|
45
|
+
readonly raw: tl.RawStarGiftUnique;
|
|
46
|
+
readonly _peers: PeersIndex;
|
|
47
|
+
readonly _model: tl.RawStarGiftAttributeModel;
|
|
48
|
+
readonly _pattern: tl.RawStarGiftAttributePattern;
|
|
49
|
+
readonly _backdrop: tl.RawStarGiftAttributeBackdrop;
|
|
50
|
+
readonly _originalDetails: tl.RawStarGiftAttributeOriginalDetails | undefined;
|
|
51
|
+
/** Whether this gift is a unique gift */
|
|
52
|
+
readonly isUnique: true;
|
|
53
|
+
constructor(raw: tl.RawStarGiftUnique, _peers: PeersIndex);
|
|
54
|
+
/** Number of the NFT */
|
|
55
|
+
get num(): number;
|
|
56
|
+
/** Title of the NFT */
|
|
57
|
+
get title(): string;
|
|
58
|
+
/** ID of the user who owns this gift */
|
|
59
|
+
get owner(): User;
|
|
60
|
+
get availabilityIssued(): number;
|
|
61
|
+
get availabilityTotal(): number;
|
|
62
|
+
/** Model (i.e. the gift itself) of the unique star gift */
|
|
63
|
+
get model(): StarGiftUniqueAttribute;
|
|
64
|
+
/** Pattern of the unique star gift */
|
|
65
|
+
get pattern(): StarGiftUniqueAttribute;
|
|
66
|
+
/** Backdrop of the unique star gift */
|
|
67
|
+
get backdrop(): StarGiftUniqueBackdrop;
|
|
68
|
+
/** Details about the original star gift (if they were retained when minting) */
|
|
69
|
+
get originalDetails(): StarGiftUniqueOriginalDetails | null;
|
|
70
|
+
}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { tl } from '@mtcute/tl';
|
|
2
|
+
import { Sticker } from '../media/sticker.js';
|
|
3
|
+
import { TextWithEntities } from '../misc/entities.js';
|
|
4
|
+
import { PeersIndex } from '../peers/peers-index.js';
|
|
5
|
+
import { User } from '../peers/user.js';
|
|
6
|
+
/** An attribute of a unique star gift containing a sticker */
|
|
7
|
+
export declare class StarGiftUniqueAttribute {
|
|
8
|
+
readonly raw: tl.RawStarGiftAttributeModel | tl.RawStarGiftAttributePattern;
|
|
9
|
+
constructor(raw: tl.RawStarGiftAttributeModel | tl.RawStarGiftAttributePattern);
|
|
10
|
+
/** Rarity permille of the attribute */
|
|
11
|
+
get permille(): number;
|
|
12
|
+
/** Display name of the attribute */
|
|
13
|
+
get name(): string;
|
|
14
|
+
get sticker(): Sticker;
|
|
15
|
+
}
|
|
16
|
+
/** Information about a unique star gift's backdrop */
|
|
17
|
+
export declare class StarGiftUniqueBackdrop {
|
|
18
|
+
readonly raw: tl.RawStarGiftAttributeBackdrop;
|
|
19
|
+
constructor(raw: tl.RawStarGiftAttributeBackdrop);
|
|
20
|
+
/** Rarity permille of the attribute */
|
|
21
|
+
get permille(): number;
|
|
22
|
+
/** Display name of the attribute */
|
|
23
|
+
get name(): string;
|
|
24
|
+
get centerColor(): number;
|
|
25
|
+
get edgeColor(): number;
|
|
26
|
+
get patternColor(): number;
|
|
27
|
+
get textColor(): number;
|
|
28
|
+
}
|
|
29
|
+
/** Details about the original star gift */
|
|
30
|
+
export declare class StarGiftUniqueOriginalDetails {
|
|
31
|
+
readonly raw: tl.RawStarGiftAttributeOriginalDetails;
|
|
32
|
+
readonly _peers: PeersIndex;
|
|
33
|
+
constructor(raw: tl.RawStarGiftAttributeOriginalDetails, _peers: PeersIndex);
|
|
34
|
+
/** ID of the user who sent the original star gift */
|
|
35
|
+
get sender(): User | null;
|
|
36
|
+
/** ID of the user who received the original star gift */
|
|
37
|
+
get recipient(): User;
|
|
38
|
+
/** Date when the original star gift was sent */
|
|
39
|
+
get date(): Date;
|
|
40
|
+
/** Message attached to the original star gift */
|
|
41
|
+
get message(): TextWithEntities | null;
|
|
42
|
+
}
|
|
43
|
+
/** A unique star gift */
|
|
44
|
+
export declare class StarGiftUnique {
|
|
45
|
+
readonly raw: tl.RawStarGiftUnique;
|
|
46
|
+
readonly _peers: PeersIndex;
|
|
47
|
+
readonly _model: tl.RawStarGiftAttributeModel;
|
|
48
|
+
readonly _pattern: tl.RawStarGiftAttributePattern;
|
|
49
|
+
readonly _backdrop: tl.RawStarGiftAttributeBackdrop;
|
|
50
|
+
readonly _originalDetails: tl.RawStarGiftAttributeOriginalDetails | undefined;
|
|
51
|
+
/** Whether this gift is a unique gift */
|
|
52
|
+
readonly isUnique: true;
|
|
53
|
+
constructor(raw: tl.RawStarGiftUnique, _peers: PeersIndex);
|
|
54
|
+
/** Number of the NFT */
|
|
55
|
+
get num(): number;
|
|
56
|
+
/** Title of the NFT */
|
|
57
|
+
get title(): string;
|
|
58
|
+
/** ID of the user who owns this gift */
|
|
59
|
+
get owner(): User;
|
|
60
|
+
get availabilityIssued(): number;
|
|
61
|
+
get availabilityTotal(): number;
|
|
62
|
+
/** Model (i.e. the gift itself) of the unique star gift */
|
|
63
|
+
get model(): StarGiftUniqueAttribute;
|
|
64
|
+
/** Pattern of the unique star gift */
|
|
65
|
+
get pattern(): StarGiftUniqueAttribute;
|
|
66
|
+
/** Backdrop of the unique star gift */
|
|
67
|
+
get backdrop(): StarGiftUniqueBackdrop;
|
|
68
|
+
/** Details about the original star gift (if they were retained when minting) */
|
|
69
|
+
get originalDetails(): StarGiftUniqueOriginalDetails | null;
|
|
70
|
+
}
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
import { assert } from "@fuman/utils";
|
|
2
|
+
import { makeInspectable } from "../../utils/inspectable.js";
|
|
3
|
+
import { memoizeGetters } from "../../utils/memoize.js";
|
|
4
|
+
import { parseDocument } from "../media/document-utils.js";
|
|
5
|
+
import { User as User$2 } from "../peers/user.js";
|
|
6
|
+
class StarGiftUniqueAttribute {
|
|
7
|
+
constructor(raw) {
|
|
8
|
+
this.raw = raw;
|
|
9
|
+
}
|
|
10
|
+
/** Rarity permille of the attribute */
|
|
11
|
+
get permille() {
|
|
12
|
+
return this.raw.rarityPermille;
|
|
13
|
+
}
|
|
14
|
+
/** Display name of the attribute */
|
|
15
|
+
get name() {
|
|
16
|
+
return this.raw.name;
|
|
17
|
+
}
|
|
18
|
+
get sticker() {
|
|
19
|
+
assert(this.raw.document._ === "document");
|
|
20
|
+
const parsed = parseDocument(this.raw.document);
|
|
21
|
+
assert(parsed.type === "sticker");
|
|
22
|
+
return parsed;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
const StarGiftUniqueAttribute$1 = /* @__PURE__ */ makeInspectable(StarGiftUniqueAttribute);
|
|
26
|
+
const StarGiftUniqueAttribute$2 = /* @__PURE__ */ memoizeGetters(StarGiftUniqueAttribute$1, ["sticker"]);
|
|
27
|
+
class StarGiftUniqueBackdrop {
|
|
28
|
+
constructor(raw) {
|
|
29
|
+
this.raw = raw;
|
|
30
|
+
}
|
|
31
|
+
/** Rarity permille of the attribute */
|
|
32
|
+
get permille() {
|
|
33
|
+
return this.raw.rarityPermille;
|
|
34
|
+
}
|
|
35
|
+
/** Display name of the attribute */
|
|
36
|
+
get name() {
|
|
37
|
+
return this.raw.name;
|
|
38
|
+
}
|
|
39
|
+
get centerColor() {
|
|
40
|
+
return this.raw.centerColor;
|
|
41
|
+
}
|
|
42
|
+
get edgeColor() {
|
|
43
|
+
return this.raw.edgeColor;
|
|
44
|
+
}
|
|
45
|
+
get patternColor() {
|
|
46
|
+
return this.raw.patternColor;
|
|
47
|
+
}
|
|
48
|
+
get textColor() {
|
|
49
|
+
return this.raw.textColor;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
const StarGiftUniqueBackdrop$1 = /* @__PURE__ */ makeInspectable(StarGiftUniqueBackdrop);
|
|
53
|
+
class StarGiftUniqueOriginalDetails {
|
|
54
|
+
constructor(raw, _peers) {
|
|
55
|
+
this.raw = raw;
|
|
56
|
+
this._peers = _peers;
|
|
57
|
+
}
|
|
58
|
+
/** ID of the user who sent the original star gift */
|
|
59
|
+
get sender() {
|
|
60
|
+
return this.raw.senderId ? new User$2(this._peers.user(this.raw.senderId)) : null;
|
|
61
|
+
}
|
|
62
|
+
/** ID of the user who received the original star gift */
|
|
63
|
+
get recipient() {
|
|
64
|
+
return new User$2(this._peers.user(this.raw.recipientId));
|
|
65
|
+
}
|
|
66
|
+
/** Date when the original star gift was sent */
|
|
67
|
+
get date() {
|
|
68
|
+
return new Date(this.raw.date * 1e3);
|
|
69
|
+
}
|
|
70
|
+
/** Message attached to the original star gift */
|
|
71
|
+
get message() {
|
|
72
|
+
return this.raw.message ?? null;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
class StarGiftUnique {
|
|
76
|
+
constructor(raw, _peers) {
|
|
77
|
+
this.raw = raw;
|
|
78
|
+
this._peers = _peers;
|
|
79
|
+
for (const attr of this.raw.attributes) {
|
|
80
|
+
if (attr._ === "starGiftAttributeModel") {
|
|
81
|
+
this._model = attr;
|
|
82
|
+
} else if (attr._ === "starGiftAttributePattern") {
|
|
83
|
+
this._pattern = attr;
|
|
84
|
+
} else if (attr._ === "starGiftAttributeBackdrop") {
|
|
85
|
+
this._backdrop = attr;
|
|
86
|
+
} else if (attr._ === "starGiftAttributeOriginalDetails") {
|
|
87
|
+
this._originalDetails = attr;
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
assert(this._model !== void 0);
|
|
91
|
+
assert(this._pattern !== void 0);
|
|
92
|
+
assert(this._backdrop !== void 0);
|
|
93
|
+
}
|
|
94
|
+
_model;
|
|
95
|
+
_pattern;
|
|
96
|
+
_backdrop;
|
|
97
|
+
_originalDetails;
|
|
98
|
+
/** Whether this gift is a unique gift */
|
|
99
|
+
isUnique = true;
|
|
100
|
+
/** Number of the NFT */
|
|
101
|
+
get num() {
|
|
102
|
+
return this.raw.num;
|
|
103
|
+
}
|
|
104
|
+
/** Title of the NFT */
|
|
105
|
+
get title() {
|
|
106
|
+
return this.raw.title;
|
|
107
|
+
}
|
|
108
|
+
/** ID of the user who owns this gift */
|
|
109
|
+
get owner() {
|
|
110
|
+
return new User$2(this._peers.user(this.raw.ownerId));
|
|
111
|
+
}
|
|
112
|
+
get availabilityIssued() {
|
|
113
|
+
return this.raw.availabilityIssued;
|
|
114
|
+
}
|
|
115
|
+
get availabilityTotal() {
|
|
116
|
+
return this.raw.availabilityTotal;
|
|
117
|
+
}
|
|
118
|
+
/** Model (i.e. the gift itself) of the unique star gift */
|
|
119
|
+
get model() {
|
|
120
|
+
return new StarGiftUniqueAttribute(this._model);
|
|
121
|
+
}
|
|
122
|
+
/** Pattern of the unique star gift */
|
|
123
|
+
get pattern() {
|
|
124
|
+
return new StarGiftUniqueAttribute(this._pattern);
|
|
125
|
+
}
|
|
126
|
+
/** Backdrop of the unique star gift */
|
|
127
|
+
get backdrop() {
|
|
128
|
+
return new StarGiftUniqueBackdrop(this._backdrop);
|
|
129
|
+
}
|
|
130
|
+
/** Details about the original star gift (if they were retained when minting) */
|
|
131
|
+
get originalDetails() {
|
|
132
|
+
if (!this._originalDetails) return null;
|
|
133
|
+
return new StarGiftUniqueOriginalDetails(this._originalDetails, this._peers);
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
const StarGiftUnique$1 = /* @__PURE__ */ makeInspectable(StarGiftUnique);
|
|
137
|
+
const StarGiftUnique$2 = /* @__PURE__ */ memoizeGetters(StarGiftUnique$1, ["model", "pattern", "backdrop", "originalDetails"]);
|
|
138
|
+
export {
|
|
139
|
+
StarGiftUnique$2 as StarGiftUnique,
|
|
140
|
+
StarGiftUniqueAttribute$2 as StarGiftUniqueAttribute,
|
|
141
|
+
StarGiftUniqueBackdrop$1 as StarGiftUniqueBackdrop,
|
|
142
|
+
StarGiftUniqueOriginalDetails
|
|
143
|
+
};
|
|
@@ -1,16 +1,18 @@
|
|
|
1
1
|
if (typeof globalThis !== "undefined" && !globalThis._MTCUTE_CJS_DEPRECATION_WARNED) {
|
|
2
2
|
globalThis._MTCUTE_CJS_DEPRECATION_WARNED = true;
|
|
3
|
-
console.warn("[mtcute
|
|
4
|
-
console.warn("[mtcute
|
|
3
|
+
console.warn("[@mtcute/core] CommonJS support is deprecated and will be removed in 0.25.0. Please consider switching to ESM, it's " + (/* @__PURE__ */ new Date()).getFullYear() + " already.");
|
|
4
|
+
console.warn("[@mtcute/core] Learn more about switching to ESM: https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c");
|
|
5
5
|
}
|
|
6
6
|
"use strict";
|
|
7
7
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
8
|
+
const Long = require("long");
|
|
8
9
|
const errors = require("../../../types/errors.cjs");
|
|
9
10
|
const typeAssertions = require("../../../utils/type-assertions.cjs");
|
|
10
11
|
const inspectable = require("../../utils/inspectable.cjs");
|
|
11
12
|
const memoize = require("../../utils/memoize.cjs");
|
|
12
13
|
const documentUtils = require("../media/document-utils.cjs");
|
|
13
14
|
const user = require("../peers/user.cjs");
|
|
15
|
+
const starsGiftUnique = require("./stars-gift-unique.cjs");
|
|
14
16
|
class StarGift {
|
|
15
17
|
constructor(raw) {
|
|
16
18
|
this.raw = raw;
|
|
@@ -27,6 +29,8 @@ class StarGift {
|
|
|
27
29
|
get isLimited() {
|
|
28
30
|
return this.raw.limited;
|
|
29
31
|
}
|
|
32
|
+
/** Whether this gift is a unique gift */
|
|
33
|
+
isUnique = false;
|
|
30
34
|
/** Additional information for sold-out gifts */
|
|
31
35
|
get soldOutInfo() {
|
|
32
36
|
if (this.raw.firstSaleDate == null || this.raw.lastSaleDate == null) {
|
|
@@ -56,6 +60,12 @@ class StarGift {
|
|
|
56
60
|
get convertStars() {
|
|
57
61
|
return this.raw.convertStars;
|
|
58
62
|
}
|
|
63
|
+
/**
|
|
64
|
+
* Amount of stars the gift can be upgraded for
|
|
65
|
+
*/
|
|
66
|
+
get upgradeStars() {
|
|
67
|
+
return this.raw.upgradeStars ?? null;
|
|
68
|
+
}
|
|
59
69
|
/**
|
|
60
70
|
* For limited availability gifts,
|
|
61
71
|
* the number of remaining and total gifts available
|
|
@@ -85,6 +95,9 @@ class UserStarGift {
|
|
|
85
95
|
get hidden() {
|
|
86
96
|
return this.raw.unsaved;
|
|
87
97
|
}
|
|
98
|
+
get isRefunded() {
|
|
99
|
+
return this.raw.refunded;
|
|
100
|
+
}
|
|
88
101
|
/** Sender of the gift, if available */
|
|
89
102
|
get sender() {
|
|
90
103
|
return this.raw.fromId ? new user.User(this.peers.user(this.raw.fromId)) : null;
|
|
@@ -93,13 +106,22 @@ class UserStarGift {
|
|
|
93
106
|
get messageId() {
|
|
94
107
|
return this.raw.msgId ?? null;
|
|
95
108
|
}
|
|
96
|
-
/** Date the gift was sent */
|
|
109
|
+
/** Date the gift was sent or minted */
|
|
97
110
|
get date() {
|
|
98
111
|
return new Date(this.raw.date * 1e3);
|
|
99
112
|
}
|
|
113
|
+
/** Whether the gift can be upgraded to a unique gift */
|
|
114
|
+
get canUpgrade() {
|
|
115
|
+
return this.raw.canUpgrade;
|
|
116
|
+
}
|
|
117
|
+
/** Number of stars to upgrade the gift to a unique gift (may be 0) */
|
|
118
|
+
get upgradeStars() {
|
|
119
|
+
if (!this.raw.canUpgrade) return null;
|
|
120
|
+
return this.raw.upgradeStars ?? Long.ZERO;
|
|
121
|
+
}
|
|
100
122
|
/** The gift itself */
|
|
101
123
|
get gift() {
|
|
102
|
-
return new StarGift(this.raw.gift);
|
|
124
|
+
return this.raw.gift._ === "starGift" ? new StarGift(this.raw.gift) : new starsGiftUnique.StarGiftUnique(this.raw.gift, this.peers);
|
|
103
125
|
}
|
|
104
126
|
/** Text attached to the gift */
|
|
105
127
|
get text() {
|
|
@@ -112,6 +134,13 @@ class UserStarGift {
|
|
|
112
134
|
get convertStars() {
|
|
113
135
|
return this.raw.convertStars ?? null;
|
|
114
136
|
}
|
|
137
|
+
get canExportAt() {
|
|
138
|
+
return this.raw.canExportAt ? new Date(this.raw.canExportAt * 1e3) : null;
|
|
139
|
+
}
|
|
140
|
+
/** Number of stars this gift can be transferred for */
|
|
141
|
+
get transferStars() {
|
|
142
|
+
return this.raw.transferStars ?? null;
|
|
143
|
+
}
|
|
115
144
|
}
|
|
116
145
|
const UserStarGift$1 = /* @__PURE__ */ inspectable.makeInspectable(UserStarGift);
|
|
117
146
|
const UserStarGift$2 = /* @__PURE__ */ memoize.memoizeGetters(UserStarGift$1, ["sender", "gift"]);
|
|
@@ -3,18 +3,21 @@ import { Sticker } from '../media/sticker.js';
|
|
|
3
3
|
import { TextWithEntities } from '../misc/entities.js';
|
|
4
4
|
import { PeersIndex } from '../peers/peers-index.js';
|
|
5
5
|
import { User } from '../peers/user.js';
|
|
6
|
+
import { StarGiftUnique } from './stars-gift-unique.js';
|
|
6
7
|
/**
|
|
7
8
|
* A gift with stars attached to it.
|
|
8
9
|
*/
|
|
9
10
|
export declare class StarGift {
|
|
10
|
-
readonly raw: tl.
|
|
11
|
-
constructor(raw: tl.
|
|
11
|
+
readonly raw: tl.RawStarGift;
|
|
12
|
+
constructor(raw: tl.RawStarGift);
|
|
12
13
|
/** ID of the gift */
|
|
13
14
|
get id(): tl.Long;
|
|
14
15
|
/** Whether this gift sold out and cannot be bought anymore */
|
|
15
16
|
get isSoldOut(): boolean;
|
|
16
17
|
/** Whether this gift has limited availability */
|
|
17
18
|
get isLimited(): boolean;
|
|
19
|
+
/** Whether this gift is a unique gift */
|
|
20
|
+
readonly isUnique: false;
|
|
18
21
|
/** Additional information for sold-out gifts */
|
|
19
22
|
get soldOutInfo(): {
|
|
20
23
|
/** Date when the first gift was bought */
|
|
@@ -30,6 +33,10 @@ export declare class StarGift {
|
|
|
30
33
|
* Amount of stars the gift can be converted to by the recipient
|
|
31
34
|
*/
|
|
32
35
|
get convertStars(): tl.Long;
|
|
36
|
+
/**
|
|
37
|
+
* Amount of stars the gift can be upgraded for
|
|
38
|
+
*/
|
|
39
|
+
get upgradeStars(): tl.Long | null;
|
|
33
40
|
/**
|
|
34
41
|
* For limited availability gifts,
|
|
35
42
|
* the number of remaining and total gifts available
|
|
@@ -50,14 +57,19 @@ export declare class UserStarGift {
|
|
|
50
57
|
get nameHidden(): boolean;
|
|
51
58
|
/** Whether this gift is not visible on the recipient's profile */
|
|
52
59
|
get hidden(): boolean;
|
|
60
|
+
get isRefunded(): boolean;
|
|
53
61
|
/** Sender of the gift, if available */
|
|
54
62
|
get sender(): User | null;
|
|
55
63
|
/** Message ID where the gift was sent, if available */
|
|
56
64
|
get messageId(): number | null;
|
|
57
|
-
/** Date the gift was sent */
|
|
65
|
+
/** Date the gift was sent or minted */
|
|
58
66
|
get date(): Date;
|
|
67
|
+
/** Whether the gift can be upgraded to a unique gift */
|
|
68
|
+
get canUpgrade(): boolean;
|
|
69
|
+
/** Number of stars to upgrade the gift to a unique gift (may be 0) */
|
|
70
|
+
get upgradeStars(): tl.Long | null;
|
|
59
71
|
/** The gift itself */
|
|
60
|
-
get gift(): StarGift;
|
|
72
|
+
get gift(): StarGift | StarGiftUnique;
|
|
61
73
|
/** Text attached to the gift */
|
|
62
74
|
get text(): TextWithEntities | null;
|
|
63
75
|
/**
|
|
@@ -65,4 +77,7 @@ export declare class UserStarGift {
|
|
|
65
77
|
* it was converted to
|
|
66
78
|
*/
|
|
67
79
|
get convertStars(): tl.Long | null;
|
|
80
|
+
get canExportAt(): Date | null;
|
|
81
|
+
/** Number of stars this gift can be transferred for */
|
|
82
|
+
get transferStars(): tl.Long | null;
|
|
68
83
|
}
|