@mtcute/core 0.16.13 → 0.17.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/chunks/cjs/{CntZHjXA.js → BcdQkLTS.js} +83 -15
- package/chunks/cjs/{chPq0GcA.js → CSfUPcui.js} +914 -796
- package/chunks/cjs/{BO3RV06t.js → kxT7E_JE.js} +3 -3
- package/chunks/es/{xihQcMp0.js → BJRm2PAH.js} +3 -3
- package/chunks/es/{Jz_hDg6M.js → CbXFWEiB.js} +83 -15
- package/chunks/es/{Btmu4f4t.js → DKzd1_Yg.js} +914 -796
- package/client.cjs +21 -9
- package/client.js +21 -9
- package/highlevel/client.d.ts +109 -25
- package/highlevel/methods/files/upload-file.d.ts +8 -0
- package/highlevel/methods/premium/accept-star-gift.d.ts +16 -0
- package/highlevel/methods/premium/get-star-gift-options.d.ts +6 -0
- package/highlevel/methods/premium/get-star-gifts.d.ts +22 -0
- package/highlevel/methods/premium/iter-star-gifts.d.ts +26 -0
- package/highlevel/methods/premium/send-star-gift.d.ts +35 -0
- package/highlevel/methods/stickers/create-sticker-set.d.ts +1 -7
- package/highlevel/methods.d.ts +5 -1
- package/highlevel/types/bots/keyboards/factories.d.ts +7 -0
- package/highlevel/types/media/video.d.ts +1 -0
- package/highlevel/types/messages/message-action.d.ts +19 -2
- package/highlevel/types/misc/sticker-set.d.ts +1 -5
- package/highlevel/types/premium/index.d.ts +1 -0
- package/highlevel/types/premium/stars-gift.d.ts +57 -0
- package/highlevel/types/premium/stars-transaction.d.ts +8 -0
- package/index.cjs +5 -3
- package/index.js +7 -5
- package/methods.cjs +7 -3
- package/methods.js +7 -3
- package/network/client.d.ts +1 -1
- package/network/multi-session-connection.d.ts +1 -1
- package/network/persistent-connection.d.ts +1 -1
- package/network/transports/abstract.d.ts +1 -1
- package/network/transports/streamed.d.ts +1 -1
- package/network/transports/wrapped.d.ts +1 -1
- package/package.json +4 -4
- package/highlevel/methods/stories/report-story.d.ts +0 -19
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { tl } from '@mtcute/tl';
|
|
2
|
+
import { Sticker } from '../media/sticker.js';
|
|
3
|
+
import { PeersIndex } from '../peers/peers-index.js';
|
|
4
|
+
import { User } from '../peers/user.js';
|
|
5
|
+
import { TextWithEntities } from '../misc/entities.js';
|
|
6
|
+
/**
|
|
7
|
+
* A gift with stars attached to it.
|
|
8
|
+
*/
|
|
9
|
+
export declare class StarGift {
|
|
10
|
+
readonly raw: tl.TypeStarGift;
|
|
11
|
+
constructor(raw: tl.TypeStarGift);
|
|
12
|
+
/** ID of the gift */
|
|
13
|
+
get id(): tl.Long;
|
|
14
|
+
/** Sticker associated with the gift */
|
|
15
|
+
get sticker(): Sticker;
|
|
16
|
+
/** Amount of stars the gift was purchased for */
|
|
17
|
+
get purchaseStars(): tl.Long;
|
|
18
|
+
/**
|
|
19
|
+
* Amount of stars the gift can be converted to by the recipient
|
|
20
|
+
*/
|
|
21
|
+
get convertStars(): tl.Long;
|
|
22
|
+
/**
|
|
23
|
+
* For limited availability gifts,
|
|
24
|
+
* the number of remaining and total gifts available
|
|
25
|
+
*/
|
|
26
|
+
get availability(): {
|
|
27
|
+
remains: number;
|
|
28
|
+
total: number;
|
|
29
|
+
} | null;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Information about a certain user's {@link StarGift}.
|
|
33
|
+
*/
|
|
34
|
+
export declare class UserStarGift {
|
|
35
|
+
readonly raw: tl.RawUserStarGift;
|
|
36
|
+
readonly peers: PeersIndex;
|
|
37
|
+
constructor(raw: tl.RawUserStarGift, peers: PeersIndex);
|
|
38
|
+
/** Whether the sender chose to appear anonymously */
|
|
39
|
+
get nameHidden(): boolean;
|
|
40
|
+
/** Whether this gift is not visible on the recipient's profile */
|
|
41
|
+
get hidden(): boolean;
|
|
42
|
+
/** Sender of the gift, if available */
|
|
43
|
+
get sender(): User | null;
|
|
44
|
+
/** Message ID where the gift was sent, if available */
|
|
45
|
+
get messageId(): number | null;
|
|
46
|
+
/** Date the gift was sent */
|
|
47
|
+
get date(): Date;
|
|
48
|
+
/** The gift itself */
|
|
49
|
+
get gift(): StarGift;
|
|
50
|
+
/** Text attached to the gift */
|
|
51
|
+
get text(): TextWithEntities | null;
|
|
52
|
+
/**
|
|
53
|
+
* If the gift was converted to stars, the amount of stars
|
|
54
|
+
* it was converted to
|
|
55
|
+
*/
|
|
56
|
+
get convertStars(): tl.Long | null;
|
|
57
|
+
}
|
|
@@ -4,6 +4,7 @@ import { Peer } from '../peers/peer.js';
|
|
|
4
4
|
import { User } from '../peers/user.js';
|
|
5
5
|
import { MessageMedia } from '../messages/message-media.js';
|
|
6
6
|
import { WebDocument } from '../files/web-document.js';
|
|
7
|
+
import { StarGift } from './stars-gift.js';
|
|
7
8
|
/**
|
|
8
9
|
* Type of the transaction.
|
|
9
10
|
*
|
|
@@ -16,6 +17,7 @@ import { WebDocument } from '../files/web-document.js';
|
|
|
16
17
|
* - `gift`: This transaction is a gift from a user
|
|
17
18
|
* - `bot_purchase`: This transaction is a purchase at a bot-operated store
|
|
18
19
|
* - `channel_subscription`: This transaction is a subscription to a channel
|
|
20
|
+
* - `star_gift`: This transaction is either a star gift to a user (if outgoing), or converting a star gift to stars (if incoming)
|
|
19
21
|
*/
|
|
20
22
|
export type StarsTransactionType = {
|
|
21
23
|
type: 'unsupported';
|
|
@@ -98,6 +100,12 @@ export type StarsTransactionType = {
|
|
|
98
100
|
peer: Peer;
|
|
99
101
|
/** ID of the message containing the giveaway where the stars were given */
|
|
100
102
|
messageId: number;
|
|
103
|
+
} | {
|
|
104
|
+
type: 'star_gift';
|
|
105
|
+
/** Related peer */
|
|
106
|
+
peer: Peer;
|
|
107
|
+
/** The gift */
|
|
108
|
+
gift: StarGift;
|
|
101
109
|
};
|
|
102
110
|
export declare class StarsTransaction {
|
|
103
111
|
readonly raw: tl.RawStarsTransaction;
|
package/index.cjs
CHANGED
|
@@ -8,12 +8,12 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
|
8
8
|
const Long = require("long");
|
|
9
9
|
const conditionVariable = require("./chunks/cjs/eX3zeDAz.js");
|
|
10
10
|
const tl = require("@mtcute/tl");
|
|
11
|
-
const client = require("./chunks/cjs/
|
|
12
|
-
const storyViewer = require("./chunks/cjs/
|
|
11
|
+
const client = require("./chunks/cjs/kxT7E_JE.js");
|
|
12
|
+
const storyViewer = require("./chunks/cjs/CSfUPcui.js");
|
|
13
13
|
const controllablePromise = require("./chunks/cjs/CZAB54t2.js");
|
|
14
14
|
const peersIndex = require("./chunks/cjs/ija5tZ1t.js");
|
|
15
15
|
require("@mtcute/tl-runtime");
|
|
16
|
-
const EventEmitter = require("
|
|
16
|
+
const EventEmitter = require("events");
|
|
17
17
|
const platform = require("./chunks/cjs/j7rWn_1y.js");
|
|
18
18
|
const reader_js = require("@mtcute/tl/binary/reader.js");
|
|
19
19
|
const writer_js = require("@mtcute/tl/binary/writer.js");
|
|
@@ -1231,6 +1231,7 @@ exports.RawLocation = storyViewer.RawLocation;
|
|
|
1231
1231
|
exports.RepliedMessageInfo = storyViewer.RepliedMessageInfo$2;
|
|
1232
1232
|
exports.SearchFilters = storyViewer.SearchFilters;
|
|
1233
1233
|
exports.SentCode = storyViewer.SentCode$1;
|
|
1234
|
+
exports.StarGift = storyViewer.StarGift$2;
|
|
1234
1235
|
exports.StarsStatus = storyViewer.StarsStatus$2;
|
|
1235
1236
|
exports.StarsTransaction = storyViewer.StarsTransaction$2;
|
|
1236
1237
|
exports.Sticker = storyViewer.Sticker$2;
|
|
@@ -1250,6 +1251,7 @@ exports.StoryViewersList = storyViewer.StoryViewersList$2;
|
|
|
1250
1251
|
exports.TakeoutSession = storyViewer.TakeoutSession$1;
|
|
1251
1252
|
exports.Thumbnail = storyViewer.Thumbnail$2;
|
|
1252
1253
|
exports.User = storyViewer.User$2;
|
|
1254
|
+
exports.UserStarGift = storyViewer.UserStarGift$2;
|
|
1253
1255
|
exports.Venue = storyViewer.Venue$2;
|
|
1254
1256
|
exports.Video = storyViewer.Video$2;
|
|
1255
1257
|
exports.Voice = storyViewer.Voice$2;
|
package/index.js
CHANGED
|
@@ -3,15 +3,15 @@ import { default as default2 } from "long";
|
|
|
3
3
|
import { concatBuffers, dataViewFromBuffer, getRandomInt, bufferToReversed } from "./chunks/es/DY1E3mHM.js";
|
|
4
4
|
import { assertNever, getAllPeersFrom, getBarePeerId, getMarkedPeerId, parseMarkedPeerId, toggleChannelIdMark } from "./chunks/es/DY1E3mHM.js";
|
|
5
5
|
import { mtp, tl } from "@mtcute/tl";
|
|
6
|
-
import { TransportError, basic } from "./chunks/es/
|
|
7
|
-
import { BotChatJoinRequestUpdate$2, BotReactionCountUpdate$2, BotReactionUpdate$2, BotStoppedUpdate$2, BusinessCallbackQuery$2, BusinessMessage, CallbackQuery$2, ChatJoinRequestUpdate$2, ChatMemberUpdate$2, ChosenInlineResult$2, Conversation, DeleteBusinessMessageUpdate$2, DeleteMessageUpdate$1, DeleteStoryUpdate$2, HistoryReadUpdate$1, InlineCallbackQuery$2, InlineQuery$2, MtClient, PollUpdate$2, PollVoteUpdate$2, PreCheckoutQuery$2, SessionConnection, StorageManager, StoryUpdate$2, TelegramStorageManager, TransportState, UpdatesManager, UserStatusUpdate$2, UserTypingUpdate$1, defaultReconnectionStrategy } from "./chunks/es/
|
|
8
|
-
import { normalizeInputReaction } from "./chunks/es/
|
|
9
|
-
import { AllStories$2, Audio$2, Boost$2, BoostSlot$2, BoostStats$1, factories$1, factories, factories$2, BotKeyboardBuilder, BusinessAccount$2, BusinessChatLink$2, BusinessConnection$2, BusinessIntro$2, BusinessWorkHours$2, Chat$2, ChatEvent$2, ChatInviteLink$2, ChatInviteLinkMember$2, ChatLocation$2, ChatMember$2, ChatPermissions$1, ChatPhoto$2, ChatPhotoSize$2, ChatPreview$2, ChatlistPreview$2, CollectibleInfo$1, Contact$1, Dialog$2, Dice$1, Document$2, DraftMessage$2, ExtendedMediaPreview$2, FactCheck$2, FileLocation$1, ForumTopic$2, FullChat$2, Game$2, GameHighScore$2, Invoice$2, LiveLocation$1, Location$1, MASK_POSITION_POINT_TO_TL, MediaStory$1, Message$2, MessageEffect$2, MessageEntity$2, MessageForwardInfo$2, MessageReactions$2, MessageRepliesInfo$2, PaidMedia$2, PaidPeerReaction$2, PeerReaction$2, PeerStories$2, Photo$2, Poll$2, PollAnswer$2, RawDocument, RawLocation, RepliedMessageInfo$2, SearchFilters, SentCode$1, StarsStatus$2, StarsTransaction$2, Sticker$2, StickerSet$2, StoriesStealthMode$1, Story$2, StoryInteractions$2, StoryInteractiveChannelPost$2, StoryInteractiveLocation$2, StoryInteractiveReaction$1, StoryInteractiveUrl, StoryInteractiveVenue$2, StoryInteractiveWeather$1, StoryRepost, StoryViewer$2, StoryViewersList$2, TakeoutSession$1, Thumbnail$2, User$2, Venue$2, Video$2, Voice$2, WebDocument$1, WebPage$2, _actionFromTl, _callDiscardReasonFromTl, _callDiscardReasonToTl, _messageActionFromTl, _messageMediaFromTl, _storyInteractiveElementFromTl, businessWorkHoursDaysToRaw, inputTextToTl, isUploadedFile, normalizeInputMessageId, normalizeInputStickerSet, parsePeer, toReactionEmoji } from "./chunks/es/
|
|
6
|
+
import { TransportError, basic } from "./chunks/es/BJRm2PAH.js";
|
|
7
|
+
import { BotChatJoinRequestUpdate$2, BotReactionCountUpdate$2, BotReactionUpdate$2, BotStoppedUpdate$2, BusinessCallbackQuery$2, BusinessMessage, CallbackQuery$2, ChatJoinRequestUpdate$2, ChatMemberUpdate$2, ChosenInlineResult$2, Conversation, DeleteBusinessMessageUpdate$2, DeleteMessageUpdate$1, DeleteStoryUpdate$2, HistoryReadUpdate$1, InlineCallbackQuery$2, InlineQuery$2, MtClient, PollUpdate$2, PollVoteUpdate$2, PreCheckoutQuery$2, SessionConnection, StorageManager, StoryUpdate$2, TelegramStorageManager, TransportState, UpdatesManager, UserStatusUpdate$2, UserTypingUpdate$1, defaultReconnectionStrategy } from "./chunks/es/BJRm2PAH.js";
|
|
8
|
+
import { normalizeInputReaction } from "./chunks/es/DKzd1_Yg.js";
|
|
9
|
+
import { AllStories$2, Audio$2, Boost$2, BoostSlot$2, BoostStats$1, factories$1, factories, factories$2, BotKeyboardBuilder, BusinessAccount$2, BusinessChatLink$2, BusinessConnection$2, BusinessIntro$2, BusinessWorkHours$2, Chat$2, ChatEvent$2, ChatInviteLink$2, ChatInviteLinkMember$2, ChatLocation$2, ChatMember$2, ChatPermissions$1, ChatPhoto$2, ChatPhotoSize$2, ChatPreview$2, ChatlistPreview$2, CollectibleInfo$1, Contact$1, Dialog$2, Dice$1, Document$2, DraftMessage$2, ExtendedMediaPreview$2, FactCheck$2, FileLocation$1, ForumTopic$2, FullChat$2, Game$2, GameHighScore$2, Invoice$2, LiveLocation$1, Location$1, MASK_POSITION_POINT_TO_TL, MediaStory$1, Message$2, MessageEffect$2, MessageEntity$2, MessageForwardInfo$2, MessageReactions$2, MessageRepliesInfo$2, PaidMedia$2, PaidPeerReaction$2, PeerReaction$2, PeerStories$2, Photo$2, Poll$2, PollAnswer$2, RawDocument, RawLocation, RepliedMessageInfo$2, SearchFilters, SentCode$1, StarGift$2, StarsStatus$2, StarsTransaction$2, Sticker$2, StickerSet$2, StoriesStealthMode$1, Story$2, StoryInteractions$2, StoryInteractiveChannelPost$2, StoryInteractiveLocation$2, StoryInteractiveReaction$1, StoryInteractiveUrl, StoryInteractiveVenue$2, StoryInteractiveWeather$1, StoryRepost, StoryViewer$2, StoryViewersList$2, TakeoutSession$1, Thumbnail$2, User$2, UserStarGift$2, Venue$2, Video$2, Voice$2, WebDocument$1, WebPage$2, _actionFromTl, _callDiscardReasonFromTl, _callDiscardReasonToTl, _messageActionFromTl, _messageMediaFromTl, _storyInteractiveElementFromTl, businessWorkHoursDaysToRaw, inputTextToTl, isUploadedFile, normalizeInputMessageId, normalizeInputStickerSet, parsePeer, toReactionEmoji } from "./chunks/es/DKzd1_Yg.js";
|
|
10
10
|
import { isTlRpcError } from "./chunks/es/BN3qj7tU.js";
|
|
11
11
|
import { MtEmptyError, MtInvalidPeerTypeError, MtMessageNotFoundError, MtPeerNotFoundError } from "./chunks/es/BN3qj7tU.js";
|
|
12
12
|
import { PeersIndex } from "./chunks/es/N3PMYmCL.js";
|
|
13
13
|
import "@mtcute/tl-runtime";
|
|
14
|
-
import EventEmitter from "
|
|
14
|
+
import EventEmitter from "events";
|
|
15
15
|
import { getPlatform, MtcuteError } from "./chunks/es/DBMBgE7t.js";
|
|
16
16
|
import { MtArgumentError, MtSecurityError, MtTimeoutError, MtTypeAssertionError, MtUnsupportedError } from "./chunks/es/DBMBgE7t.js";
|
|
17
17
|
import { __tlReaderMap } from "@mtcute/tl/binary/reader.js";
|
|
@@ -1230,6 +1230,7 @@ export {
|
|
|
1230
1230
|
SearchFilters,
|
|
1231
1231
|
SentCode$1 as SentCode,
|
|
1232
1232
|
SessionConnection,
|
|
1233
|
+
StarGift$2 as StarGift,
|
|
1233
1234
|
StarsStatus$2 as StarsStatus,
|
|
1234
1235
|
StarsTransaction$2 as StarsTransaction,
|
|
1235
1236
|
Sticker$2 as Sticker,
|
|
@@ -1257,6 +1258,7 @@ export {
|
|
|
1257
1258
|
TransportState,
|
|
1258
1259
|
UpdatesManager,
|
|
1259
1260
|
User$2 as User,
|
|
1261
|
+
UserStarGift$2 as UserStarGift,
|
|
1260
1262
|
UserStatusUpdate$2 as UserStatusUpdate,
|
|
1261
1263
|
UserTypingUpdate$1 as UserTypingUpdate,
|
|
1262
1264
|
Venue$2 as Venue,
|
package/methods.cjs
CHANGED
|
@@ -5,9 +5,10 @@ if (typeof globalThis !== "undefined" && !globalThis._MTCUTE_CJS_DEPRECATION_WAR
|
|
|
5
5
|
}
|
|
6
6
|
"use strict";
|
|
7
7
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
8
|
-
const updateProfile = require("./chunks/cjs/
|
|
9
|
-
const storyViewer = require("./chunks/cjs/
|
|
8
|
+
const updateProfile = require("./chunks/cjs/BcdQkLTS.js");
|
|
9
|
+
const storyViewer = require("./chunks/cjs/CSfUPcui.js");
|
|
10
10
|
exports._normalizePrivacyRules = updateProfile._normalizePrivacyRules;
|
|
11
|
+
exports.acceptStarGift = updateProfile.acceptStarGift;
|
|
11
12
|
exports.addChatMembers = updateProfile.addChatMembers;
|
|
12
13
|
exports.addContact = updateProfile.addContact;
|
|
13
14
|
exports.addStickerToSet = updateProfile.addStickerToSet;
|
|
@@ -129,6 +130,8 @@ exports.getReactionUsers = updateProfile.getReactionUsers;
|
|
|
129
130
|
exports.getReplyTo = updateProfile.getReplyTo;
|
|
130
131
|
exports.getScheduledMessages = updateProfile.getScheduledMessages;
|
|
131
132
|
exports.getSimilarChannels = updateProfile.getSimilarChannels;
|
|
133
|
+
exports.getStarGiftOptions = updateProfile.getStarGiftOptions;
|
|
134
|
+
exports.getStarGifts = updateProfile.getStarGifts;
|
|
132
135
|
exports.getStarsTransactions = updateProfile.getStarsTransactions;
|
|
133
136
|
exports.getStickerSet = updateProfile.getStickerSet;
|
|
134
137
|
exports.getStoriesById = updateProfile.getStoriesById;
|
|
@@ -159,6 +162,7 @@ exports.iterReactionUsers = updateProfile.iterReactionUsers;
|
|
|
159
162
|
exports.iterSearchGlobal = updateProfile.iterSearchGlobal;
|
|
160
163
|
exports.iterSearchHashtag = updateProfile.iterSearchHashtag;
|
|
161
164
|
exports.iterSearchMessages = updateProfile.iterSearchMessages;
|
|
165
|
+
exports.iterStarGifts = updateProfile.iterStarGifts;
|
|
162
166
|
exports.iterStarsTransactions = updateProfile.iterStarsTransactions;
|
|
163
167
|
exports.iterStoryViewers = updateProfile.iterStoryViewers;
|
|
164
168
|
exports.joinChat = updateProfile.joinChat;
|
|
@@ -183,7 +187,6 @@ exports.replaceStickerInSet = updateProfile.replaceStickerInSet;
|
|
|
183
187
|
exports.replyMedia = updateProfile.replyMedia;
|
|
184
188
|
exports.replyMediaGroup = updateProfile.replyMediaGroup;
|
|
185
189
|
exports.replyText = updateProfile.replyText;
|
|
186
|
-
exports.reportStory = updateProfile.reportStory;
|
|
187
190
|
exports.resendCode = updateProfile.resendCode;
|
|
188
191
|
exports.resendPasswordEmail = updateProfile.resendPasswordEmail;
|
|
189
192
|
exports.restrictChatMember = updateProfile.restrictChatMember;
|
|
@@ -200,6 +203,7 @@ exports.sendPaidReaction = updateProfile.sendPaidReaction;
|
|
|
200
203
|
exports.sendReaction = updateProfile.sendReaction;
|
|
201
204
|
exports.sendRecoveryCode = updateProfile.sendRecoveryCode;
|
|
202
205
|
exports.sendScheduled = updateProfile.sendScheduled;
|
|
206
|
+
exports.sendStarGift = updateProfile.sendStarGift;
|
|
203
207
|
exports.sendStory = updateProfile.sendStory;
|
|
204
208
|
exports.sendStoryReaction = updateProfile.sendStoryReaction;
|
|
205
209
|
exports.sendTyping = updateProfile.sendTyping;
|
package/methods.js
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { _normalizePrivacyRules, addChatMembers, addContact, addStickerToSet, answerCallbackQuery, answerInlineQuery, answerMedia, answerMediaGroup, answerPreCheckoutQuery, answerText, applyBoost, archiveChats, banChatMember, blockUser, canApplyBoost, canSendStory, cancelPasswordEmail, changeCloudPassword, checkPassword, closeChat, closePoll, commentMedia, commentMediaGroup, commentText, createBusinessChatLink, createChannel, createFolder, createForumTopic, createGroup, createInviteLink, createStickerSet, createSupergroup, deleteBusinessChatLink, deleteChannel, deleteChatPhoto, deleteContacts, deleteFolder, deleteForumTopicHistory, deleteGroup, deleteHistory, deleteMessages, deleteMessagesById, deleteMyCommands, deleteProfilePhotos, deleteScheduledMessages, deleteStickerFromSet, deleteStories, deleteUserHistory, downloadAsBuffer, downloadAsIterable, downloadAsStream, editAdminRights, editBusinessChatLink, editCloseFriends, editCloseFriendsRaw, editFolder, editForumTopic, editInlineMessage, editInviteLink, editMessage, editStory, enableCloudPassword, exportInviteLink, findDialogs, findFolder, forwardMessages, forwardMessagesById, getAllScheduledMessages, getAllStories, getAvailableMessageEffects, getBoostStats, getBoosts, getBotInfo, getBotMenuButton, getBusinessChatLinks, getCallbackAnswer, getCallbackQueryMessage, getChat, getChatEventLog, getChatMember, getChatMembers, getChatPreview, getChatlistPreview, getCollectibleInfo, getCommonChats, getContacts, getCustomEmojis, getCustomEmojisFromMessages, getFactCheck, getFolders, getForumTopics, getForumTopicsById, getFullChat, getGameHighScores, getGlobalTtl, getHistory, getInlineGameHighScores, getInstalledStickers, getInviteLink, getInviteLinkMembers, getInviteLinks, getMe, getMessageByLink, getMessageGroup, getMessageReactions, getMessageReactionsById, getMessagesUnsafe, getMyBoostSlots, getMyCommands, getMyStickerSets, getMyUsername, getNearbyChats, getPasswordHint, getPeerStories, getPrimaryInviteLink, getProfilePhoto, getProfilePhotos, getProfileStories, getReactionUsers, getReplyTo, getScheduledMessages, getSimilarChannels, getStarsTransactions, getStickerSet, getStoriesById, getStoriesInteractions, getStoryLink, getStoryViewers, getUsers, hideAllJoinRequests, hideJoinRequest, hideMyStoriesViews, importContacts, incrementStoriesViews, initTakeoutSession, isPeerAvailable, isSelfPeer, iterAllStories, iterBoosters, iterChatEventLog, iterChatMembers, iterDialogs, iterForumTopics, iterHistory, iterInviteLinkMembers, iterInviteLinks, iterProfilePhotos, iterProfileStories, iterReactionUsers, iterSearchGlobal, iterSearchHashtag, iterSearchMessages, iterStarsTransactions, iterStoryViewers, joinChat, joinChatlist, kickChatMember, leaveChat, logOut, markChatUnread, moveStickerInSet, openChat, pinMessage, quoteWithMedia, quoteWithMediaGroup, quoteWithText, readReactions, readStories, recoverPassword, removeCloudPassword, reorderPinnedForumTopics, reorderUsernames, replaceStickerInSet, replyMedia, replyMediaGroup, replyText,
|
|
2
|
-
import { _normalizeInputFile, _normalizeInputMedia, getBusinessConnection, getDiscussionMessage, getMessages, getPeerDialogs, readHistory, resolveChannel, resolvePeer, resolvePeerMany, resolveUser, sendMedia, sendMediaGroup, sendText, uploadFile } from "./chunks/es/
|
|
1
|
+
import { _normalizePrivacyRules, acceptStarGift, addChatMembers, addContact, addStickerToSet, answerCallbackQuery, answerInlineQuery, answerMedia, answerMediaGroup, answerPreCheckoutQuery, answerText, applyBoost, archiveChats, banChatMember, blockUser, canApplyBoost, canSendStory, cancelPasswordEmail, changeCloudPassword, checkPassword, closeChat, closePoll, commentMedia, commentMediaGroup, commentText, createBusinessChatLink, createChannel, createFolder, createForumTopic, createGroup, createInviteLink, createStickerSet, createSupergroup, deleteBusinessChatLink, deleteChannel, deleteChatPhoto, deleteContacts, deleteFolder, deleteForumTopicHistory, deleteGroup, deleteHistory, deleteMessages, deleteMessagesById, deleteMyCommands, deleteProfilePhotos, deleteScheduledMessages, deleteStickerFromSet, deleteStories, deleteUserHistory, downloadAsBuffer, downloadAsIterable, downloadAsStream, editAdminRights, editBusinessChatLink, editCloseFriends, editCloseFriendsRaw, editFolder, editForumTopic, editInlineMessage, editInviteLink, editMessage, editStory, enableCloudPassword, exportInviteLink, findDialogs, findFolder, forwardMessages, forwardMessagesById, getAllScheduledMessages, getAllStories, getAvailableMessageEffects, getBoostStats, getBoosts, getBotInfo, getBotMenuButton, getBusinessChatLinks, getCallbackAnswer, getCallbackQueryMessage, getChat, getChatEventLog, getChatMember, getChatMembers, getChatPreview, getChatlistPreview, getCollectibleInfo, getCommonChats, getContacts, getCustomEmojis, getCustomEmojisFromMessages, getFactCheck, getFolders, getForumTopics, getForumTopicsById, getFullChat, getGameHighScores, getGlobalTtl, getHistory, getInlineGameHighScores, getInstalledStickers, getInviteLink, getInviteLinkMembers, getInviteLinks, getMe, getMessageByLink, getMessageGroup, getMessageReactions, getMessageReactionsById, getMessagesUnsafe, getMyBoostSlots, getMyCommands, getMyStickerSets, getMyUsername, getNearbyChats, getPasswordHint, getPeerStories, getPrimaryInviteLink, getProfilePhoto, getProfilePhotos, getProfileStories, getReactionUsers, getReplyTo, getScheduledMessages, getSimilarChannels, getStarGiftOptions, getStarGifts, getStarsTransactions, getStickerSet, getStoriesById, getStoriesInteractions, getStoryLink, getStoryViewers, getUsers, hideAllJoinRequests, hideJoinRequest, hideMyStoriesViews, importContacts, incrementStoriesViews, initTakeoutSession, isPeerAvailable, isSelfPeer, iterAllStories, iterBoosters, iterChatEventLog, iterChatMembers, iterDialogs, iterForumTopics, iterHistory, iterInviteLinkMembers, iterInviteLinks, iterProfilePhotos, iterProfileStories, iterReactionUsers, iterSearchGlobal, iterSearchHashtag, iterSearchMessages, iterStarGifts, iterStarsTransactions, iterStoryViewers, joinChat, joinChatlist, kickChatMember, leaveChat, logOut, markChatUnread, moveStickerInSet, openChat, pinMessage, quoteWithMedia, quoteWithMediaGroup, quoteWithText, readReactions, readStories, recoverPassword, removeCloudPassword, reorderPinnedForumTopics, reorderUsernames, replaceStickerInSet, replyMedia, replyMediaGroup, replyText, resendCode, resendPasswordEmail, restrictChatMember, revokeInviteLink, run, saveDraft, searchGlobal, searchHashtag, searchMessages, sendCode, sendCopy, sendCopyGroup, sendPaidReaction, sendReaction, sendRecoveryCode, sendScheduled, sendStarGift, sendStory, sendStoryReaction, sendTyping, sendVote, setBotInfo, setBotMenuButton, setBusinessIntro, setBusinessWorkHours, setChatColor, setChatDefaultPermissions, setChatDescription, setChatPhoto, setChatStickerSet, setChatTitle, setChatTtl, setChatUsername, setFoldersOrder, setGameScore, setGlobalTtl, setInlineGameScore, setMyBirthday, setMyCommands, setMyDefaultRights, setMyEmojiStatus, setMyProfilePhoto, setMyUsername, setOffline, setSlowMode, setStickerSetThumb, signIn, signInBot, signInQr, start, startTest, toggleContentProtection, toggleForum, toggleForumTopicClosed, toggleForumTopicPinned, toggleFragmentUsername, toggleGeneralTopicHidden, toggleJoinRequests, toggleJoinToSend, togglePeerStoriesArchived, toggleStoriesPinned, translateMessage, translateText, unarchiveChats, unbanChatMember, unblockUser, unpinAllMessages, unpinMessage, updateProfile, uploadMedia, verifyPasswordEmail } from "./chunks/es/CbXFWEiB.js";
|
|
2
|
+
import { _normalizeInputFile, _normalizeInputMedia, getBusinessConnection, getDiscussionMessage, getMessages, getPeerDialogs, readHistory, resolveChannel, resolvePeer, resolvePeerMany, resolveUser, sendMedia, sendMediaGroup, sendText, uploadFile } from "./chunks/es/DKzd1_Yg.js";
|
|
3
3
|
export {
|
|
4
4
|
_normalizeInputFile,
|
|
5
5
|
_normalizeInputMedia,
|
|
6
6
|
_normalizePrivacyRules,
|
|
7
|
+
acceptStarGift,
|
|
7
8
|
addChatMembers,
|
|
8
9
|
addContact,
|
|
9
10
|
addStickerToSet,
|
|
@@ -129,6 +130,8 @@ export {
|
|
|
129
130
|
getReplyTo,
|
|
130
131
|
getScheduledMessages,
|
|
131
132
|
getSimilarChannels,
|
|
133
|
+
getStarGiftOptions,
|
|
134
|
+
getStarGifts,
|
|
132
135
|
getStarsTransactions,
|
|
133
136
|
getStickerSet,
|
|
134
137
|
getStoriesById,
|
|
@@ -159,6 +162,7 @@ export {
|
|
|
159
162
|
iterSearchGlobal,
|
|
160
163
|
iterSearchHashtag,
|
|
161
164
|
iterSearchMessages,
|
|
165
|
+
iterStarGifts,
|
|
162
166
|
iterStarsTransactions,
|
|
163
167
|
iterStoryViewers,
|
|
164
168
|
joinChat,
|
|
@@ -184,7 +188,6 @@ export {
|
|
|
184
188
|
replyMedia,
|
|
185
189
|
replyMediaGroup,
|
|
186
190
|
replyText,
|
|
187
|
-
reportStory,
|
|
188
191
|
resendCode,
|
|
189
192
|
resendPasswordEmail,
|
|
190
193
|
resolveChannel,
|
|
@@ -207,6 +210,7 @@ export {
|
|
|
207
210
|
sendReaction,
|
|
208
211
|
sendRecoveryCode,
|
|
209
212
|
sendScheduled,
|
|
213
|
+
sendStarGift,
|
|
210
214
|
sendStory,
|
|
211
215
|
sendStoryReaction,
|
|
212
216
|
sendText,
|
package/network/client.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { default as EventEmitter } from '
|
|
1
|
+
import { default as EventEmitter } from 'events';
|
|
2
2
|
import { mtp, tl } from '@mtcute/tl';
|
|
3
3
|
import { TlReaderMap, TlWriterMap } from '@mtcute/tl-runtime';
|
|
4
4
|
import { IMtStorageProvider } from '../storage/provider.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { default as EventEmitter } from '
|
|
1
|
+
import { default as EventEmitter } from 'events';
|
|
2
2
|
import { BasicDcOption, ICryptoProvider, Logger } from '../utils/index.js';
|
|
3
3
|
import { ReconnectionStrategy } from './reconnection.js';
|
|
4
4
|
import { ITelegramTransport, TransportFactory } from './transports/index.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { default as EventEmitter } from '
|
|
1
|
+
import { default as EventEmitter } from 'events';
|
|
2
2
|
import { tl } from '@mtcute/tl';
|
|
3
3
|
import { MaybePromise } from '../../types/index.js';
|
|
4
4
|
import { BasicDcOption, ICryptoProvider, Logger } from '../../utils/index.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { default as EventEmitter } from '
|
|
1
|
+
import { default as EventEmitter } from 'events';
|
|
2
2
|
import { ICryptoProvider, Logger } from '../../utils/index.js';
|
|
3
3
|
import { IPacketCodec } from './abstract.js';
|
|
4
4
|
export declare abstract class WrappedCodec extends EventEmitter {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mtcute/core",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.17.0",
|
|
5
5
|
"description": "Type-safe library for MTProto (Telegram API)",
|
|
6
6
|
"author": "alina sireneva <alina@tei.su>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -70,9 +70,9 @@
|
|
|
70
70
|
},
|
|
71
71
|
"scripts": {},
|
|
72
72
|
"dependencies": {
|
|
73
|
-
"@mtcute/file-id": "^0.
|
|
74
|
-
"@mtcute/tl": "^
|
|
75
|
-
"@mtcute/tl-runtime": "^0.
|
|
73
|
+
"@mtcute/file-id": "^0.17.0",
|
|
74
|
+
"@mtcute/tl": "^189.0.0",
|
|
75
|
+
"@mtcute/tl-runtime": "^0.17.0",
|
|
76
76
|
"@types/events": "3.0.0",
|
|
77
77
|
"events": "3.2.0",
|
|
78
78
|
"long": "5.2.3"
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { tl } from '@mtcute/tl';
|
|
2
|
-
import { MaybeArray } from '../../../types/utils.js';
|
|
3
|
-
import { ITelegramClient } from '../../client.types.js';
|
|
4
|
-
import { InputPeerLike } from '../../types/index.js';
|
|
5
|
-
/**
|
|
6
|
-
* Report a story (or multiple stories) to the moderation team
|
|
7
|
-
*/
|
|
8
|
-
export declare function reportStory(client: ITelegramClient, peerId: InputPeerLike, storyIds: MaybeArray<number>, params?: {
|
|
9
|
-
/**
|
|
10
|
-
* Reason for reporting
|
|
11
|
-
*
|
|
12
|
-
* @default inputReportReasonSpam
|
|
13
|
-
*/
|
|
14
|
-
reason?: tl.TypeReportReason;
|
|
15
|
-
/**
|
|
16
|
-
* Additional comment to the report
|
|
17
|
-
*/
|
|
18
|
-
message?: string;
|
|
19
|
-
}): Promise<void>;
|