@mtcute/core 0.25.8 → 0.26.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/client.cjs +18 -12
- package/client.js +21 -15
- package/highlevel/client.d.cts +78 -72
- package/highlevel/client.d.ts +78 -72
- package/highlevel/methods/forums/toggle-forum.cjs +0 -10
- package/highlevel/methods/forums/toggle-forum.d.cts +0 -10
- package/highlevel/methods/forums/toggle-forum.d.ts +0 -10
- package/highlevel/methods/forums/toggle-forum.js +0 -10
- package/highlevel/methods/premium/get-resale-star-gifts.cjs +0 -4
- package/highlevel/methods/premium/get-resale-star-gifts.d.cts +0 -6
- package/highlevel/methods/premium/get-resale-star-gifts.d.ts +0 -6
- package/highlevel/methods/premium/get-resale-star-gifts.js +0 -4
- package/highlevel/methods/premium/get-saved-star-gifts.cjs +2 -1
- package/highlevel/methods/premium/get-saved-star-gifts.d.cts +4 -2
- package/highlevel/methods/premium/get-saved-star-gifts.d.ts +4 -2
- package/highlevel/methods/premium/get-saved-star-gifts.js +2 -1
- package/highlevel/methods/{auth/run.cjs → premium/get-star-gift-value.cjs} +8 -5
- package/highlevel/methods/premium/get-star-gift-value.d.cts +9 -0
- package/highlevel/methods/premium/get-star-gift-value.d.ts +9 -0
- package/highlevel/methods/premium/get-star-gift-value.js +11 -0
- package/highlevel/methods/premium/get-stars-transactions.cjs +3 -2
- package/highlevel/methods/premium/get-stars-transactions.d.cts +2 -0
- package/highlevel/methods/premium/get-stars-transactions.d.ts +2 -0
- package/highlevel/methods/premium/get-stars-transactions.js +3 -2
- package/highlevel/methods/premium/iter-saved-star-gifts.cjs +15 -10
- package/highlevel/methods/premium/iter-saved-star-gifts.d.cts +13 -19
- package/highlevel/methods/premium/iter-saved-star-gifts.d.ts +13 -19
- package/highlevel/methods/premium/iter-saved-star-gifts.js +15 -10
- package/highlevel/methods/premium/prepay-star-gift-upgrade.cjs +30 -0
- package/highlevel/methods/premium/prepay-star-gift-upgrade.d.cts +23 -0
- package/highlevel/methods/premium/prepay-star-gift-upgrade.d.ts +23 -0
- package/highlevel/methods/premium/prepay-star-gift-upgrade.js +25 -0
- package/highlevel/methods/stickers/delete-sticker-from-set.d.cts +2 -4
- package/highlevel/methods/stickers/delete-sticker-from-set.d.ts +2 -4
- package/highlevel/methods/stickers/move-sticker-in-set.d.cts +2 -4
- package/highlevel/methods/stickers/move-sticker-in-set.d.ts +2 -4
- package/highlevel/methods/stickers/replace-sticker-in-set.d.cts +2 -4
- package/highlevel/methods/stickers/replace-sticker-in-set.d.ts +2 -4
- package/highlevel/methods/users/get-saved-music.cjs +38 -0
- package/highlevel/methods/users/get-saved-music.d.cts +13 -0
- package/highlevel/methods/users/get-saved-music.d.ts +13 -0
- package/highlevel/methods/users/get-saved-music.js +33 -0
- package/highlevel/methods/users/save-music-to-profile.cjs +57 -0
- package/highlevel/methods/users/save-music-to-profile.d.cts +19 -0
- package/highlevel/methods/users/save-music-to-profile.d.ts +19 -0
- package/highlevel/methods/users/save-music-to-profile.js +52 -0
- package/highlevel/methods/users/set-emoji-status.cjs +0 -8
- package/highlevel/methods/users/set-emoji-status.d.cts +0 -11
- package/highlevel/methods/users/set-emoji-status.d.ts +0 -11
- package/highlevel/methods/users/set-emoji-status.js +1 -9
- package/highlevel/methods.d.cts +5 -4
- package/highlevel/methods.d.ts +5 -4
- package/highlevel/types/files/utils.d.cts +7 -0
- package/highlevel/types/files/utils.d.ts +7 -0
- package/highlevel/types/media/document.d.cts +1 -1
- package/highlevel/types/media/document.d.ts +1 -1
- package/highlevel/types/messages/message-action.cjs +43 -21
- package/highlevel/types/messages/message-action.d.cts +58 -17
- package/highlevel/types/messages/message-action.d.ts +58 -17
- package/highlevel/types/messages/message-action.js +43 -21
- package/highlevel/types/peers/full-user.cjs +10 -1
- 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 +10 -1
- package/highlevel/types/premium/index.d.cts +1 -0
- package/highlevel/types/premium/index.d.ts +1 -0
- package/highlevel/types/premium/saved-star-gift.cjs +6 -0
- package/highlevel/types/premium/saved-star-gift.d.cts +4 -0
- package/highlevel/types/premium/saved-star-gift.d.ts +4 -0
- package/highlevel/types/premium/saved-star-gift.js +6 -0
- package/highlevel/types/premium/star-gift-value.cjs +65 -0
- package/highlevel/types/premium/star-gift-value.d.cts +41 -0
- package/highlevel/types/premium/star-gift-value.d.ts +41 -0
- package/highlevel/types/premium/star-gift-value.js +60 -0
- package/highlevel/types/premium/stars-gift-unique.cjs +10 -3
- package/highlevel/types/premium/stars-gift-unique.d.cts +1 -1
- package/highlevel/types/premium/stars-gift-unique.d.ts +1 -1
- package/highlevel/types/premium/stars-gift-unique.js +10 -3
- package/highlevel/types/premium/stars-transaction.cjs +9 -0
- package/highlevel/types/premium/stars-transaction.d.cts +10 -0
- package/highlevel/types/premium/stars-transaction.d.ts +10 -0
- package/highlevel/types/premium/stars-transaction.js +9 -0
- package/index.cjs +2 -0
- package/index.js +2 -0
- package/methods.cjs +9 -5
- package/methods.js +12 -8
- package/network/network-manager.cjs +1 -1
- package/network/network-manager.js +1 -1
- package/package.json +2 -2
- package/utils/binary/compat.cjs +35 -4
- package/utils/binary/compat.js +35 -4
- package/highlevel/methods/auth/run.d.cts +0 -16
- package/highlevel/methods/auth/run.d.ts +0 -16
- package/highlevel/methods/auth/run.js +0 -8
package/methods.js
CHANGED
|
@@ -3,7 +3,6 @@ import { getPasswordHint } from "./highlevel/methods/auth/get-password-hint.js";
|
|
|
3
3
|
import { logOut } from "./highlevel/methods/auth/log-out.js";
|
|
4
4
|
import { recoverPassword } from "./highlevel/methods/auth/recover-password.js";
|
|
5
5
|
import { resendCode } from "./highlevel/methods/auth/resend-code.js";
|
|
6
|
-
import { run } from "./highlevel/methods/auth/run.js";
|
|
7
6
|
import { sendCode } from "./highlevel/methods/auth/send-code.js";
|
|
8
7
|
import { sendRecoveryCode } from "./highlevel/methods/auth/send-recovery-code.js";
|
|
9
8
|
import { signInBot } from "./highlevel/methods/auth/sign-in-bot.js";
|
|
@@ -108,7 +107,7 @@ import { iterForumTopics } from "./highlevel/methods/forums/iter-forum-topics.js
|
|
|
108
107
|
import { reorderPinnedForumTopics } from "./highlevel/methods/forums/reorder-pinned-forum-topics.js";
|
|
109
108
|
import { toggleForumTopicClosed } from "./highlevel/methods/forums/toggle-forum-topic-closed.js";
|
|
110
109
|
import { toggleForumTopicPinned } from "./highlevel/methods/forums/toggle-forum-topic-pinned.js";
|
|
111
|
-
import {
|
|
110
|
+
import { updateForumSettings } from "./highlevel/methods/forums/toggle-forum.js";
|
|
112
111
|
import { toggleGeneralTopicHidden } from "./highlevel/methods/forums/toggle-general-topic-hidden.js";
|
|
113
112
|
import { createInviteLink } from "./highlevel/methods/invite-links/create-invite-link.js";
|
|
114
113
|
import { editInviteLink } from "./highlevel/methods/invite-links/edit-invite-link.js";
|
|
@@ -194,10 +193,11 @@ import { getBoosts } from "./highlevel/methods/premium/get-boosts.js";
|
|
|
194
193
|
import { getBusinessChatLinks } from "./highlevel/methods/premium/get-business-chat-links.js";
|
|
195
194
|
import { getBusinessConnection } from "./highlevel/methods/premium/get-business-connection.js";
|
|
196
195
|
import { getMyBoostSlots } from "./highlevel/methods/premium/get-my-boost-slots.js";
|
|
197
|
-
import {
|
|
196
|
+
import { getStarGiftResaleOptions } from "./highlevel/methods/premium/get-resale-star-gifts.js";
|
|
198
197
|
import { getSavedStarGiftsById } from "./highlevel/methods/premium/get-saved-star-gifts-by-id.js";
|
|
199
198
|
import { getSavedStarGifts } from "./highlevel/methods/premium/get-saved-star-gifts.js";
|
|
200
199
|
import { getStarGiftOptions } from "./highlevel/methods/premium/get-star-gift-options.js";
|
|
200
|
+
import { getStarGiftValue } from "./highlevel/methods/premium/get-star-gift-value.js";
|
|
201
201
|
import { getStarGiftWithdrawalUrl } from "./highlevel/methods/premium/get-star-gift-withdrawal-url.js";
|
|
202
202
|
import { getStarsTransactions } from "./highlevel/methods/premium/get-stars-transactions.js";
|
|
203
203
|
import { getUniqueStarGift } from "./highlevel/methods/premium/get-unique-star-gift.js";
|
|
@@ -205,6 +205,7 @@ import { iterBoosters } from "./highlevel/methods/premium/iter-boosters.js";
|
|
|
205
205
|
import { iterSavedStarGifts } from "./highlevel/methods/premium/iter-saved-star-gifts.js";
|
|
206
206
|
import { iterStarsTransactions } from "./highlevel/methods/premium/iter-stars-transactions.js";
|
|
207
207
|
import { togglePinnedStarGifts } from "./highlevel/methods/premium/pin-star-gift.js";
|
|
208
|
+
import { prepayStarGiftUpgrade } from "./highlevel/methods/premium/prepay-star-gift-upgrade.js";
|
|
208
209
|
import { sendStarGift } from "./highlevel/methods/premium/send-star-gift.js";
|
|
209
210
|
import { setBusinessIntro } from "./highlevel/methods/premium/set-business-intro.js";
|
|
210
211
|
import { setBusinessWorkHours } from "./highlevel/methods/premium/set-business-work-hours.js";
|
|
@@ -252,13 +253,15 @@ import { getMyUsername } from "./highlevel/methods/users/get-my-username.js";
|
|
|
252
253
|
import { getPeerSettings } from "./highlevel/methods/users/get-peer-settings.js";
|
|
253
254
|
import { getProfilePhoto } from "./highlevel/methods/users/get-profile-photo.js";
|
|
254
255
|
import { getProfilePhotos } from "./highlevel/methods/users/get-profile-photos.js";
|
|
256
|
+
import { getSavedMusic } from "./highlevel/methods/users/get-saved-music.js";
|
|
255
257
|
import { getUsers } from "./highlevel/methods/users/get-users.js";
|
|
256
258
|
import { isPeerAvailable } from "./highlevel/methods/users/is-peer-available.js";
|
|
257
259
|
import { iterProfilePhotos } from "./highlevel/methods/users/iter-profile-photos.js";
|
|
258
260
|
import { resolvePeerMany } from "./highlevel/methods/users/resolve-peer-many.js";
|
|
259
261
|
import { resolveChannel, resolvePeer, resolveUser } from "./highlevel/methods/users/resolve-peer.js";
|
|
260
262
|
import { resolvePhoneNumber } from "./highlevel/methods/users/resolve-phone-number.js";
|
|
261
|
-
import {
|
|
263
|
+
import { saveMusicToProfile, unsaveMusicFromProfile } from "./highlevel/methods/users/save-music-to-profile.js";
|
|
264
|
+
import { setEmojiStatus } from "./highlevel/methods/users/set-emoji-status.js";
|
|
262
265
|
import { setGlobalTtl } from "./highlevel/methods/users/set-global-ttl.js";
|
|
263
266
|
import { setMyBirthday } from "./highlevel/methods/users/set-my-birthday.js";
|
|
264
267
|
import { setMyProfilePhoto } from "./highlevel/methods/users/set-my-profile-photo.js";
|
|
@@ -402,13 +405,14 @@ export {
|
|
|
402
405
|
getProfileStories,
|
|
403
406
|
getReactionUsers,
|
|
404
407
|
getReplyTo,
|
|
405
|
-
|
|
408
|
+
getSavedMusic,
|
|
406
409
|
getSavedStarGifts,
|
|
407
410
|
getSavedStarGiftsById,
|
|
408
411
|
getScheduledMessages,
|
|
409
412
|
getSimilarChannels,
|
|
410
413
|
getStarGiftOptions,
|
|
411
414
|
getStarGiftResaleOptions,
|
|
415
|
+
getStarGiftValue,
|
|
412
416
|
getStarGiftWithdrawalUrl,
|
|
413
417
|
getStarsTransactions,
|
|
414
418
|
getStickerSet,
|
|
@@ -457,6 +461,7 @@ export {
|
|
|
457
461
|
openWebview,
|
|
458
462
|
pinMessage,
|
|
459
463
|
prepareInlineMessage,
|
|
464
|
+
prepayStarGiftUpgrade,
|
|
460
465
|
quoteWithMedia,
|
|
461
466
|
quoteWithMediaGroup,
|
|
462
467
|
quoteWithText,
|
|
@@ -480,8 +485,8 @@ export {
|
|
|
480
485
|
resolveUser,
|
|
481
486
|
restrictChatMember,
|
|
482
487
|
revokeInviteLink,
|
|
483
|
-
run,
|
|
484
488
|
saveDraft,
|
|
489
|
+
saveMusicToProfile,
|
|
485
490
|
searchGlobal,
|
|
486
491
|
searchHashtag,
|
|
487
492
|
searchMessages,
|
|
@@ -522,7 +527,6 @@ export {
|
|
|
522
527
|
setMyBirthday,
|
|
523
528
|
setMyCommands,
|
|
524
529
|
setMyDefaultRights,
|
|
525
|
-
setMyEmojiStatus,
|
|
526
530
|
setMyProfilePhoto,
|
|
527
531
|
setMyUsername,
|
|
528
532
|
setOnline,
|
|
@@ -537,7 +541,6 @@ export {
|
|
|
537
541
|
startTest,
|
|
538
542
|
toggleContentProtection,
|
|
539
543
|
toggleEmojiStatusPermission,
|
|
540
|
-
toggleForum,
|
|
541
544
|
toggleForumTopicClosed,
|
|
542
545
|
toggleForumTopicPinned,
|
|
543
546
|
toggleFragmentUsername,
|
|
@@ -556,6 +559,7 @@ export {
|
|
|
556
559
|
unblockUser,
|
|
557
560
|
unpinAllMessages,
|
|
558
561
|
unpinMessage,
|
|
562
|
+
unsaveMusicFromProfile,
|
|
559
563
|
updateForumSettings,
|
|
560
564
|
updateProfile,
|
|
561
565
|
upgradeStarGift,
|
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.26.0",
|
|
5
5
|
"description": "Type-safe library for MTProto (Telegram API)",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"scripts": {},
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"@fuman/net": "0.0.15",
|
|
11
11
|
"@fuman/utils": "0.0.15",
|
|
12
12
|
"@mtcute/file-id": "^0.24.3",
|
|
13
|
-
"@mtcute/tl": "^
|
|
13
|
+
"@mtcute/tl": "^214.0.0",
|
|
14
14
|
"@mtcute/tl-runtime": "^0.24.3",
|
|
15
15
|
"@types/events": "3.0.0",
|
|
16
16
|
"long": "5.2.3"
|
package/utils/binary/compat.cjs
CHANGED
|
@@ -11,6 +11,7 @@ const tl = require("@mtcute/tl");
|
|
|
11
11
|
const tlRuntime = require("@mtcute/tl-runtime");
|
|
12
12
|
const reader_js = require("@mtcute/tl/binary/reader.js");
|
|
13
13
|
const reader_js$1 = require("@mtcute/tl/compat/reader.js");
|
|
14
|
+
const Long = require("long");
|
|
14
15
|
const peersIndex = require("../../highlevel/types/peers/peers-index.cjs");
|
|
15
16
|
function replaceType(obj, type) {
|
|
16
17
|
return Object.assign(obj, { _: type });
|
|
@@ -27,25 +28,38 @@ function mapCompatStarGift(obj) {
|
|
|
27
28
|
return {
|
|
28
29
|
...obj,
|
|
29
30
|
_: "starGiftUnique",
|
|
31
|
+
giftId: Long.ZERO,
|
|
30
32
|
ownerId: obj.ownerId ? { _: "peerUser", userId: obj.ownerId } : void 0
|
|
31
33
|
};
|
|
32
34
|
case "starGiftUnique_layer198":
|
|
33
35
|
case "starGiftUnique_layer202":
|
|
34
36
|
case "starGiftUnique_layer206":
|
|
35
|
-
return
|
|
37
|
+
return {
|
|
38
|
+
...obj,
|
|
39
|
+
_: "starGiftUnique",
|
|
40
|
+
giftId: Long.ZERO
|
|
41
|
+
};
|
|
36
42
|
case "starGiftUnique_layer210":
|
|
37
43
|
return {
|
|
38
44
|
...obj,
|
|
39
45
|
_: "starGiftUnique",
|
|
46
|
+
giftId: Long.ZERO,
|
|
40
47
|
resellAmount: obj.resellStars ? [{
|
|
41
48
|
_: "starsAmount",
|
|
42
49
|
amount: obj.resellStars,
|
|
43
50
|
nanos: 0
|
|
44
51
|
}] : void 0
|
|
45
52
|
};
|
|
53
|
+
case "starGiftUnique_layer211":
|
|
54
|
+
return {
|
|
55
|
+
...obj,
|
|
56
|
+
_: "starGiftUnique",
|
|
57
|
+
giftId: Long.ZERO
|
|
58
|
+
};
|
|
46
59
|
case "starGift_layer202":
|
|
47
60
|
case "starGift_layer206":
|
|
48
61
|
case "starGift_layer209":
|
|
62
|
+
case "starGift_layer211":
|
|
49
63
|
return replaceType(obj, "starGift");
|
|
50
64
|
default:
|
|
51
65
|
return obj;
|
|
@@ -92,6 +106,7 @@ function mapCompatMessageAction(obj) {
|
|
|
92
106
|
} : void 0
|
|
93
107
|
};
|
|
94
108
|
case "messageActionStarGift_layer197":
|
|
109
|
+
case "messageActionStarGift_layer211":
|
|
95
110
|
return {
|
|
96
111
|
...obj,
|
|
97
112
|
_: "messageActionStarGift",
|
|
@@ -99,6 +114,14 @@ function mapCompatMessageAction(obj) {
|
|
|
99
114
|
};
|
|
100
115
|
case "messageActionPaidMessagesPrice_layer203":
|
|
101
116
|
return replaceType(obj, "messageActionPaidMessagesPrice");
|
|
117
|
+
case "messageActionSetChatTheme_layer211":
|
|
118
|
+
return {
|
|
119
|
+
_: "messageActionSetChatTheme",
|
|
120
|
+
theme: {
|
|
121
|
+
_: "chatTheme",
|
|
122
|
+
emoticon: obj.emoticon
|
|
123
|
+
}
|
|
124
|
+
};
|
|
102
125
|
default:
|
|
103
126
|
return obj;
|
|
104
127
|
}
|
|
@@ -142,10 +165,12 @@ function mapCompatObject(obj) {
|
|
|
142
165
|
case "starGiftUnique_layer198":
|
|
143
166
|
case "starGiftUnique_layer202":
|
|
144
167
|
case "starGiftUnique_layer206":
|
|
168
|
+
case "starGiftUnique_layer210":
|
|
169
|
+
case "starGiftUnique_layer211":
|
|
145
170
|
case "starGift_layer202":
|
|
146
171
|
case "starGift_layer206":
|
|
147
172
|
case "starGift_layer209":
|
|
148
|
-
case "
|
|
173
|
+
case "starGift_layer211":
|
|
149
174
|
return mapCompatStarGift(obj);
|
|
150
175
|
case "emojiStatus_layer197":
|
|
151
176
|
return mapCompatEmojiStatus(obj);
|
|
@@ -154,14 +179,18 @@ function mapCompatObject(obj) {
|
|
|
154
179
|
case "channelFull_layer197":
|
|
155
180
|
case "channelFull_layer204":
|
|
156
181
|
return replaceType(obj, "channelFull");
|
|
157
|
-
case "messageActionStarGiftUnique_layer197":
|
|
158
182
|
case "messageActionStarGift_layer197":
|
|
183
|
+
case "messageActionStarGift_layer211":
|
|
184
|
+
case "messageActionStarGiftUnique_layer197":
|
|
159
185
|
case "messageActionStarGiftUnique_layer202":
|
|
160
|
-
case "messageActionPaidMessagesPrice_layer203":
|
|
161
186
|
case "messageActionStarGiftUnique_layer210":
|
|
187
|
+
case "messageActionPaidMessagesPrice_layer203":
|
|
188
|
+
case "messageActionSetChatTheme_layer211":
|
|
162
189
|
return mapCompatMessageAction(obj);
|
|
163
190
|
case "userFull_layer199":
|
|
164
191
|
return replaceType(dropFields(obj, ["premiumGifts"]), "userFull");
|
|
192
|
+
case "userFull_layer211":
|
|
193
|
+
return replaceType(obj, "userFull");
|
|
165
194
|
case "userFull_layer200":
|
|
166
195
|
case "userFull_layer209":
|
|
167
196
|
case "userFull_layer210":
|
|
@@ -179,6 +208,8 @@ function mapCompatObject(obj) {
|
|
|
179
208
|
_: "channel",
|
|
180
209
|
emojiStatus: obj.emojiStatus ? mapCompatEmojiStatus(obj.emojiStatus) : void 0
|
|
181
210
|
};
|
|
211
|
+
case "channelFull_layer211":
|
|
212
|
+
return replaceType(obj, "channelFull");
|
|
182
213
|
case "phoneCallDiscardReasonAllowGroupCall_layer202":
|
|
183
214
|
return { _: "phoneCallDiscardReasonMissed" };
|
|
184
215
|
case "message_layer199":
|
package/utils/binary/compat.js
CHANGED
|
@@ -4,6 +4,7 @@ import { tl } from "@mtcute/tl";
|
|
|
4
4
|
import { TlBinaryReader } from "@mtcute/tl-runtime";
|
|
5
5
|
import { __tlReaderMap } from "@mtcute/tl/binary/reader.js";
|
|
6
6
|
import { __tlReaderMapCompat } from "@mtcute/tl/compat/reader.js";
|
|
7
|
+
import Long from "long";
|
|
7
8
|
import { PeersIndex } from "../../highlevel/types/peers/peers-index.js";
|
|
8
9
|
function replaceType(obj, type) {
|
|
9
10
|
return Object.assign(obj, { _: type });
|
|
@@ -20,25 +21,38 @@ function mapCompatStarGift(obj) {
|
|
|
20
21
|
return {
|
|
21
22
|
...obj,
|
|
22
23
|
_: "starGiftUnique",
|
|
24
|
+
giftId: Long.ZERO,
|
|
23
25
|
ownerId: obj.ownerId ? { _: "peerUser", userId: obj.ownerId } : void 0
|
|
24
26
|
};
|
|
25
27
|
case "starGiftUnique_layer198":
|
|
26
28
|
case "starGiftUnique_layer202":
|
|
27
29
|
case "starGiftUnique_layer206":
|
|
28
|
-
return
|
|
30
|
+
return {
|
|
31
|
+
...obj,
|
|
32
|
+
_: "starGiftUnique",
|
|
33
|
+
giftId: Long.ZERO
|
|
34
|
+
};
|
|
29
35
|
case "starGiftUnique_layer210":
|
|
30
36
|
return {
|
|
31
37
|
...obj,
|
|
32
38
|
_: "starGiftUnique",
|
|
39
|
+
giftId: Long.ZERO,
|
|
33
40
|
resellAmount: obj.resellStars ? [{
|
|
34
41
|
_: "starsAmount",
|
|
35
42
|
amount: obj.resellStars,
|
|
36
43
|
nanos: 0
|
|
37
44
|
}] : void 0
|
|
38
45
|
};
|
|
46
|
+
case "starGiftUnique_layer211":
|
|
47
|
+
return {
|
|
48
|
+
...obj,
|
|
49
|
+
_: "starGiftUnique",
|
|
50
|
+
giftId: Long.ZERO
|
|
51
|
+
};
|
|
39
52
|
case "starGift_layer202":
|
|
40
53
|
case "starGift_layer206":
|
|
41
54
|
case "starGift_layer209":
|
|
55
|
+
case "starGift_layer211":
|
|
42
56
|
return replaceType(obj, "starGift");
|
|
43
57
|
default:
|
|
44
58
|
return obj;
|
|
@@ -85,6 +99,7 @@ function mapCompatMessageAction(obj) {
|
|
|
85
99
|
} : void 0
|
|
86
100
|
};
|
|
87
101
|
case "messageActionStarGift_layer197":
|
|
102
|
+
case "messageActionStarGift_layer211":
|
|
88
103
|
return {
|
|
89
104
|
...obj,
|
|
90
105
|
_: "messageActionStarGift",
|
|
@@ -92,6 +107,14 @@ function mapCompatMessageAction(obj) {
|
|
|
92
107
|
};
|
|
93
108
|
case "messageActionPaidMessagesPrice_layer203":
|
|
94
109
|
return replaceType(obj, "messageActionPaidMessagesPrice");
|
|
110
|
+
case "messageActionSetChatTheme_layer211":
|
|
111
|
+
return {
|
|
112
|
+
_: "messageActionSetChatTheme",
|
|
113
|
+
theme: {
|
|
114
|
+
_: "chatTheme",
|
|
115
|
+
emoticon: obj.emoticon
|
|
116
|
+
}
|
|
117
|
+
};
|
|
95
118
|
default:
|
|
96
119
|
return obj;
|
|
97
120
|
}
|
|
@@ -135,10 +158,12 @@ function mapCompatObject(obj) {
|
|
|
135
158
|
case "starGiftUnique_layer198":
|
|
136
159
|
case "starGiftUnique_layer202":
|
|
137
160
|
case "starGiftUnique_layer206":
|
|
161
|
+
case "starGiftUnique_layer210":
|
|
162
|
+
case "starGiftUnique_layer211":
|
|
138
163
|
case "starGift_layer202":
|
|
139
164
|
case "starGift_layer206":
|
|
140
165
|
case "starGift_layer209":
|
|
141
|
-
case "
|
|
166
|
+
case "starGift_layer211":
|
|
142
167
|
return mapCompatStarGift(obj);
|
|
143
168
|
case "emojiStatus_layer197":
|
|
144
169
|
return mapCompatEmojiStatus(obj);
|
|
@@ -147,14 +172,18 @@ function mapCompatObject(obj) {
|
|
|
147
172
|
case "channelFull_layer197":
|
|
148
173
|
case "channelFull_layer204":
|
|
149
174
|
return replaceType(obj, "channelFull");
|
|
150
|
-
case "messageActionStarGiftUnique_layer197":
|
|
151
175
|
case "messageActionStarGift_layer197":
|
|
176
|
+
case "messageActionStarGift_layer211":
|
|
177
|
+
case "messageActionStarGiftUnique_layer197":
|
|
152
178
|
case "messageActionStarGiftUnique_layer202":
|
|
153
|
-
case "messageActionPaidMessagesPrice_layer203":
|
|
154
179
|
case "messageActionStarGiftUnique_layer210":
|
|
180
|
+
case "messageActionPaidMessagesPrice_layer203":
|
|
181
|
+
case "messageActionSetChatTheme_layer211":
|
|
155
182
|
return mapCompatMessageAction(obj);
|
|
156
183
|
case "userFull_layer199":
|
|
157
184
|
return replaceType(dropFields(obj, ["premiumGifts"]), "userFull");
|
|
185
|
+
case "userFull_layer211":
|
|
186
|
+
return replaceType(obj, "userFull");
|
|
158
187
|
case "userFull_layer200":
|
|
159
188
|
case "userFull_layer209":
|
|
160
189
|
case "userFull_layer210":
|
|
@@ -172,6 +201,8 @@ function mapCompatObject(obj) {
|
|
|
172
201
|
_: "channel",
|
|
173
202
|
emojiStatus: obj.emojiStatus ? mapCompatEmojiStatus(obj.emojiStatus) : void 0
|
|
174
203
|
};
|
|
204
|
+
case "channelFull_layer211":
|
|
205
|
+
return replaceType(obj, "channelFull");
|
|
175
206
|
case "phoneCallDiscardReasonAllowGroupCall_layer202":
|
|
176
207
|
return { _: "phoneCallDiscardReasonMissed" };
|
|
177
208
|
case "message_layer199":
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { ITelegramClient } from '../../client.types.js';
|
|
2
|
-
import { User } from '../../types/index.js';
|
|
3
|
-
import { start } from './start.js';
|
|
4
|
-
/**
|
|
5
|
-
* Simple wrapper that calls {@link start} and then
|
|
6
|
-
* provided callback function (if any) without the
|
|
7
|
-
* need to introduce a `main()` function manually.
|
|
8
|
-
*
|
|
9
|
-
* Errors that were encountered while calling {@link start}
|
|
10
|
-
* and `then` will be emitted as usual, and can be caught with {@link onError}
|
|
11
|
-
*
|
|
12
|
-
* @param params Parameters to be passed to {@link start}
|
|
13
|
-
* @param then Function to be called after {@link start} returns
|
|
14
|
-
* @deprecated This method provides no real value over {@link start}, please use it instead
|
|
15
|
-
*/
|
|
16
|
-
export declare function run(client: ITelegramClient, params: Parameters<typeof start>[1], then?: (user: User) => void | Promise<void>): void;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { ITelegramClient } from '../../client.types.js';
|
|
2
|
-
import { User } from '../../types/index.js';
|
|
3
|
-
import { start } from './start.js';
|
|
4
|
-
/**
|
|
5
|
-
* Simple wrapper that calls {@link start} and then
|
|
6
|
-
* provided callback function (if any) without the
|
|
7
|
-
* need to introduce a `main()` function manually.
|
|
8
|
-
*
|
|
9
|
-
* Errors that were encountered while calling {@link start}
|
|
10
|
-
* and `then` will be emitted as usual, and can be caught with {@link onError}
|
|
11
|
-
*
|
|
12
|
-
* @param params Parameters to be passed to {@link start}
|
|
13
|
-
* @param then Function to be called after {@link start} returns
|
|
14
|
-
* @deprecated This method provides no real value over {@link start}, please use it instead
|
|
15
|
-
*/
|
|
16
|
-
export declare function run(client: ITelegramClient, params: Parameters<typeof start>[1], then?: (user: User) => void | Promise<void>): void;
|