@mtcute/core 0.27.2 → 0.27.3
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 +80 -68
- package/client.js +80 -68
- package/highlevel/base.cjs +4 -0
- package/highlevel/base.d.cts +1 -0
- package/highlevel/base.d.ts +1 -0
- package/highlevel/base.js +4 -0
- package/highlevel/client.d.cts +322 -278
- package/highlevel/client.d.ts +322 -278
- package/highlevel/methods/gifts/get-star-gift-upgrade-options.cjs +30 -0
- package/highlevel/methods/gifts/get-star-gift-upgrade-options.d.cts +12 -0
- package/highlevel/methods/gifts/get-star-gift-upgrade-options.d.ts +12 -0
- package/highlevel/methods/gifts/get-star-gift-upgrade-options.js +25 -0
- package/highlevel/methods/gifts/resolve-star-gift-offer.cjs +17 -0
- package/highlevel/methods/gifts/resolve-star-gift-offer.d.cts +18 -0
- package/highlevel/methods/gifts/resolve-star-gift-offer.d.ts +18 -0
- package/highlevel/methods/gifts/resolve-star-gift-offer.js +12 -0
- package/highlevel/methods/gifts/send-star-gift-offer.cjs +26 -0
- package/highlevel/methods/gifts/send-star-gift-offer.d.cts +26 -0
- package/highlevel/methods/gifts/send-star-gift-offer.d.ts +26 -0
- package/highlevel/methods/gifts/send-star-gift-offer.js +21 -0
- package/highlevel/methods/{premium → gifts}/set-gift-resale-price.cjs +2 -5
- package/highlevel/methods/{premium → gifts}/set-gift-resale-price.d.cts +2 -2
- package/highlevel/methods/{premium → gifts}/set-gift-resale-price.d.ts +2 -2
- package/highlevel/methods/{premium → gifts}/set-gift-resale-price.js +2 -5
- package/highlevel/methods/premium/_normalize-stars-amount.cjs +18 -0
- package/highlevel/methods/premium/_normalize-stars-amount.d.cts +12 -0
- package/highlevel/methods/premium/_normalize-stars-amount.d.ts +12 -0
- package/highlevel/methods/premium/_normalize-stars-amount.js +13 -0
- package/highlevel/methods.d.cts +23 -18
- package/highlevel/methods.d.ts +23 -18
- package/highlevel/types/messages/message-action.cjs +27 -4
- package/highlevel/types/messages/message-action.d.cts +28 -1
- package/highlevel/types/messages/message-action.d.ts +28 -1
- package/highlevel/types/messages/message-action.js +27 -4
- package/highlevel/types/premium/saved-star-gift.cjs +4 -0
- package/highlevel/types/premium/saved-star-gift.d.cts +2 -0
- package/highlevel/types/premium/saved-star-gift.d.ts +2 -0
- package/highlevel/types/premium/saved-star-gift.js +4 -0
- package/highlevel/types/premium/star-gift-unique.cjs +8 -0
- package/highlevel/types/premium/star-gift-unique.d.cts +4 -0
- package/highlevel/types/premium/star-gift-unique.d.ts +4 -0
- package/highlevel/types/premium/star-gift-unique.js +8 -0
- package/highlevel/types/premium/star-gift.cjs +12 -3
- package/highlevel/types/premium/star-gift.d.cts +5 -0
- package/highlevel/types/premium/star-gift.d.ts +5 -0
- package/highlevel/types/premium/star-gift.js +12 -3
- package/highlevel/types/premium/stars-transaction.cjs +6 -0
- package/highlevel/types/premium/stars-transaction.d.cts +6 -0
- package/highlevel/types/premium/stars-transaction.d.ts +6 -0
- package/highlevel/types/premium/stars-transaction.js +6 -0
- package/highlevel/updates/manager.cjs +7 -0
- package/highlevel/updates/manager.js +7 -0
- package/methods.cjs +40 -34
- package/methods.js +23 -17
- package/network/middlewares/internal-errors.cjs +5 -0
- package/network/middlewares/internal-errors.js +5 -0
- package/network/network-manager.cjs +1 -1
- package/network/network-manager.js +1 -1
- package/package.json +2 -2
- package/utils/binary/compat.cjs +12 -0
- package/utils/binary/compat.js +12 -0
- /package/highlevel/methods/{premium → gifts}/_normalize-input-star-gift.cjs +0 -0
- /package/highlevel/methods/{premium → gifts}/_normalize-input-star-gift.d.cts +0 -0
- /package/highlevel/methods/{premium → gifts}/_normalize-input-star-gift.d.ts +0 -0
- /package/highlevel/methods/{premium → gifts}/_normalize-input-star-gift.js +0 -0
- /package/highlevel/methods/{premium → gifts}/accept-star-gift.cjs +0 -0
- /package/highlevel/methods/{premium → gifts}/accept-star-gift.d.cts +0 -0
- /package/highlevel/methods/{premium → gifts}/accept-star-gift.d.ts +0 -0
- /package/highlevel/methods/{premium → gifts}/accept-star-gift.js +0 -0
- /package/highlevel/methods/{premium → gifts}/buy-resale-gift.cjs +0 -0
- /package/highlevel/methods/{premium → gifts}/buy-resale-gift.d.cts +0 -0
- /package/highlevel/methods/{premium → gifts}/buy-resale-gift.d.ts +0 -0
- /package/highlevel/methods/{premium → gifts}/buy-resale-gift.js +0 -0
- /package/highlevel/methods/{premium → gifts}/get-resale-star-gifts.cjs +0 -0
- /package/highlevel/methods/{premium → gifts}/get-resale-star-gifts.d.cts +0 -0
- /package/highlevel/methods/{premium → gifts}/get-resale-star-gifts.d.ts +0 -0
- /package/highlevel/methods/{premium → gifts}/get-resale-star-gifts.js +0 -0
- /package/highlevel/methods/{premium → gifts}/get-saved-star-gifts-by-id.cjs +0 -0
- /package/highlevel/methods/{premium → gifts}/get-saved-star-gifts-by-id.d.cts +0 -0
- /package/highlevel/methods/{premium → gifts}/get-saved-star-gifts-by-id.d.ts +0 -0
- /package/highlevel/methods/{premium → gifts}/get-saved-star-gifts-by-id.js +0 -0
- /package/highlevel/methods/{premium → gifts}/get-saved-star-gifts.cjs +0 -0
- /package/highlevel/methods/{premium → gifts}/get-saved-star-gifts.d.cts +0 -0
- /package/highlevel/methods/{premium → gifts}/get-saved-star-gifts.d.ts +0 -0
- /package/highlevel/methods/{premium → gifts}/get-saved-star-gifts.js +0 -0
- /package/highlevel/methods/{premium → gifts}/get-star-gift-options.cjs +0 -0
- /package/highlevel/methods/{premium → gifts}/get-star-gift-options.d.cts +0 -0
- /package/highlevel/methods/{premium → gifts}/get-star-gift-options.d.ts +0 -0
- /package/highlevel/methods/{premium → gifts}/get-star-gift-options.js +0 -0
- /package/highlevel/methods/{premium → gifts}/get-star-gift-value.cjs +0 -0
- /package/highlevel/methods/{premium → gifts}/get-star-gift-value.d.cts +0 -0
- /package/highlevel/methods/{premium → gifts}/get-star-gift-value.d.ts +0 -0
- /package/highlevel/methods/{premium → gifts}/get-star-gift-value.js +0 -0
- /package/highlevel/methods/{premium → gifts}/get-star-gift-withdrawal-url.cjs +0 -0
- /package/highlevel/methods/{premium → gifts}/get-star-gift-withdrawal-url.d.cts +0 -0
- /package/highlevel/methods/{premium → gifts}/get-star-gift-withdrawal-url.d.ts +0 -0
- /package/highlevel/methods/{premium → gifts}/get-star-gift-withdrawal-url.js +0 -0
- /package/highlevel/methods/{premium → gifts}/get-unique-star-gift.cjs +0 -0
- /package/highlevel/methods/{premium → gifts}/get-unique-star-gift.d.cts +0 -0
- /package/highlevel/methods/{premium → gifts}/get-unique-star-gift.d.ts +0 -0
- /package/highlevel/methods/{premium → gifts}/get-unique-star-gift.js +0 -0
- /package/highlevel/methods/{premium → gifts}/iter-saved-star-gifts.cjs +0 -0
- /package/highlevel/methods/{premium → gifts}/iter-saved-star-gifts.d.cts +0 -0
- /package/highlevel/methods/{premium → gifts}/iter-saved-star-gifts.d.ts +0 -0
- /package/highlevel/methods/{premium → gifts}/iter-saved-star-gifts.js +0 -0
- /package/highlevel/methods/{premium → gifts}/pin-star-gift.cjs +0 -0
- /package/highlevel/methods/{premium → gifts}/pin-star-gift.d.cts +0 -0
- /package/highlevel/methods/{premium → gifts}/pin-star-gift.d.ts +0 -0
- /package/highlevel/methods/{premium → gifts}/pin-star-gift.js +0 -0
- /package/highlevel/methods/{premium → gifts}/prepay-star-gift-upgrade.cjs +0 -0
- /package/highlevel/methods/{premium → gifts}/prepay-star-gift-upgrade.d.cts +0 -0
- /package/highlevel/methods/{premium → gifts}/prepay-star-gift-upgrade.d.ts +0 -0
- /package/highlevel/methods/{premium → gifts}/prepay-star-gift-upgrade.js +0 -0
- /package/highlevel/methods/{premium → gifts}/send-star-gift.cjs +0 -0
- /package/highlevel/methods/{premium → gifts}/send-star-gift.d.cts +0 -0
- /package/highlevel/methods/{premium → gifts}/send-star-gift.d.ts +0 -0
- /package/highlevel/methods/{premium → gifts}/send-star-gift.js +0 -0
- /package/highlevel/methods/{premium → gifts}/transfer-star-gift.cjs +0 -0
- /package/highlevel/methods/{premium → gifts}/transfer-star-gift.d.cts +0 -0
- /package/highlevel/methods/{premium → gifts}/transfer-star-gift.d.ts +0 -0
- /package/highlevel/methods/{premium → gifts}/transfer-star-gift.js +0 -0
- /package/highlevel/methods/{premium → gifts}/upgrade-star-gift.cjs +0 -0
- /package/highlevel/methods/{premium → gifts}/upgrade-star-gift.d.cts +0 -0
- /package/highlevel/methods/{premium → gifts}/upgrade-star-gift.d.ts +0 -0
- /package/highlevel/methods/{premium → gifts}/upgrade-star-gift.js +0 -0
package/methods.js
CHANGED
|
@@ -111,6 +111,26 @@ import { toggleForumTopicClosed } from "./highlevel/methods/forums/toggle-forum-
|
|
|
111
111
|
import { toggleForumTopicPinned } from "./highlevel/methods/forums/toggle-forum-topic-pinned.js";
|
|
112
112
|
import { updateForumSettings } from "./highlevel/methods/forums/toggle-forum.js";
|
|
113
113
|
import { toggleGeneralTopicHidden } from "./highlevel/methods/forums/toggle-general-topic-hidden.js";
|
|
114
|
+
import { _normalizeInputStarGift } from "./highlevel/methods/gifts/_normalize-input-star-gift.js";
|
|
115
|
+
import { acceptStarGift } from "./highlevel/methods/gifts/accept-star-gift.js";
|
|
116
|
+
import { buyResaleGift } from "./highlevel/methods/gifts/buy-resale-gift.js";
|
|
117
|
+
import { getStarGiftResaleOptions } from "./highlevel/methods/gifts/get-resale-star-gifts.js";
|
|
118
|
+
import { getSavedStarGiftsById } from "./highlevel/methods/gifts/get-saved-star-gifts-by-id.js";
|
|
119
|
+
import { getSavedStarGifts } from "./highlevel/methods/gifts/get-saved-star-gifts.js";
|
|
120
|
+
import { getStarGiftOptions } from "./highlevel/methods/gifts/get-star-gift-options.js";
|
|
121
|
+
import { getStarGiftUpgradeOptions } from "./highlevel/methods/gifts/get-star-gift-upgrade-options.js";
|
|
122
|
+
import { getStarGiftValue } from "./highlevel/methods/gifts/get-star-gift-value.js";
|
|
123
|
+
import { getStarGiftWithdrawalUrl } from "./highlevel/methods/gifts/get-star-gift-withdrawal-url.js";
|
|
124
|
+
import { getUniqueStarGift } from "./highlevel/methods/gifts/get-unique-star-gift.js";
|
|
125
|
+
import { iterSavedStarGifts } from "./highlevel/methods/gifts/iter-saved-star-gifts.js";
|
|
126
|
+
import { togglePinnedStarGifts } from "./highlevel/methods/gifts/pin-star-gift.js";
|
|
127
|
+
import { prepayStarGiftUpgrade } from "./highlevel/methods/gifts/prepay-star-gift-upgrade.js";
|
|
128
|
+
import { resolveStarGiftOffer } from "./highlevel/methods/gifts/resolve-star-gift-offer.js";
|
|
129
|
+
import { sendStarGiftOffer } from "./highlevel/methods/gifts/send-star-gift-offer.js";
|
|
130
|
+
import { sendStarGift } from "./highlevel/methods/gifts/send-star-gift.js";
|
|
131
|
+
import { setResaleStarGiftPrice } from "./highlevel/methods/gifts/set-gift-resale-price.js";
|
|
132
|
+
import { transferStarGift } from "./highlevel/methods/gifts/transfer-star-gift.js";
|
|
133
|
+
import { upgradeStarGift } from "./highlevel/methods/gifts/upgrade-star-gift.js";
|
|
114
134
|
import { createInviteLink } from "./highlevel/methods/invite-links/create-invite-link.js";
|
|
115
135
|
import { editInviteLink } from "./highlevel/methods/invite-links/edit-invite-link.js";
|
|
116
136
|
import { exportInviteLink } from "./highlevel/methods/invite-links/export-invite-link.js";
|
|
@@ -183,10 +203,7 @@ import { changeCloudPassword } from "./highlevel/methods/password/change-cloud-p
|
|
|
183
203
|
import { enableCloudPassword } from "./highlevel/methods/password/enable-cloud-password.js";
|
|
184
204
|
import { cancelPasswordEmail, resendPasswordEmail, verifyPasswordEmail } from "./highlevel/methods/password/password-email.js";
|
|
185
205
|
import { removeCloudPassword } from "./highlevel/methods/password/remove-cloud-password.js";
|
|
186
|
-
import { _normalizeInputStarGift } from "./highlevel/methods/premium/_normalize-input-star-gift.js";
|
|
187
|
-
import { acceptStarGift } from "./highlevel/methods/premium/accept-star-gift.js";
|
|
188
206
|
import { applyBoost } from "./highlevel/methods/premium/apply-boost.js";
|
|
189
|
-
import { buyResaleGift } from "./highlevel/methods/premium/buy-resale-gift.js";
|
|
190
207
|
import { canApplyBoost } from "./highlevel/methods/premium/can-apply-boost.js";
|
|
191
208
|
import { createBusinessChatLink } from "./highlevel/methods/premium/create-business-chat-link.js";
|
|
192
209
|
import { deleteBusinessChatLink, editBusinessChatLink } from "./highlevel/methods/premium/edit-business-chat-link.js";
|
|
@@ -195,25 +212,11 @@ import { getBoosts } from "./highlevel/methods/premium/get-boosts.js";
|
|
|
195
212
|
import { getBusinessChatLinks } from "./highlevel/methods/premium/get-business-chat-links.js";
|
|
196
213
|
import { getBusinessConnection } from "./highlevel/methods/premium/get-business-connection.js";
|
|
197
214
|
import { getMyBoostSlots } from "./highlevel/methods/premium/get-my-boost-slots.js";
|
|
198
|
-
import { getStarGiftResaleOptions } from "./highlevel/methods/premium/get-resale-star-gifts.js";
|
|
199
|
-
import { getSavedStarGiftsById } from "./highlevel/methods/premium/get-saved-star-gifts-by-id.js";
|
|
200
|
-
import { getSavedStarGifts } from "./highlevel/methods/premium/get-saved-star-gifts.js";
|
|
201
|
-
import { getStarGiftOptions } from "./highlevel/methods/premium/get-star-gift-options.js";
|
|
202
|
-
import { getStarGiftValue } from "./highlevel/methods/premium/get-star-gift-value.js";
|
|
203
|
-
import { getStarGiftWithdrawalUrl } from "./highlevel/methods/premium/get-star-gift-withdrawal-url.js";
|
|
204
215
|
import { getStarsTransactions } from "./highlevel/methods/premium/get-stars-transactions.js";
|
|
205
|
-
import { getUniqueStarGift } from "./highlevel/methods/premium/get-unique-star-gift.js";
|
|
206
216
|
import { iterBoosters } from "./highlevel/methods/premium/iter-boosters.js";
|
|
207
|
-
import { iterSavedStarGifts } from "./highlevel/methods/premium/iter-saved-star-gifts.js";
|
|
208
217
|
import { iterStarsTransactions } from "./highlevel/methods/premium/iter-stars-transactions.js";
|
|
209
|
-
import { togglePinnedStarGifts } from "./highlevel/methods/premium/pin-star-gift.js";
|
|
210
|
-
import { prepayStarGiftUpgrade } from "./highlevel/methods/premium/prepay-star-gift-upgrade.js";
|
|
211
|
-
import { sendStarGift } from "./highlevel/methods/premium/send-star-gift.js";
|
|
212
218
|
import { setBusinessIntro } from "./highlevel/methods/premium/set-business-intro.js";
|
|
213
219
|
import { setBusinessWorkHours } from "./highlevel/methods/premium/set-business-work-hours.js";
|
|
214
|
-
import { setResaleStarGiftPrice } from "./highlevel/methods/premium/set-gift-resale-price.js";
|
|
215
|
-
import { transferStarGift } from "./highlevel/methods/premium/transfer-star-gift.js";
|
|
216
|
-
import { upgradeStarGift } from "./highlevel/methods/premium/upgrade-star-gift.js";
|
|
217
220
|
import { addStickerToSet } from "./highlevel/methods/stickers/add-sticker-to-set.js";
|
|
218
221
|
import { createStickerSet } from "./highlevel/methods/stickers/create-sticker-set.js";
|
|
219
222
|
import { deleteStickerFromSet } from "./highlevel/methods/stickers/delete-sticker-from-set.js";
|
|
@@ -416,6 +419,7 @@ export {
|
|
|
416
419
|
getSimilarChannels,
|
|
417
420
|
getStarGiftOptions,
|
|
418
421
|
getStarGiftResaleOptions,
|
|
422
|
+
getStarGiftUpgradeOptions,
|
|
419
423
|
getStarGiftValue,
|
|
420
424
|
getStarGiftWithdrawalUrl,
|
|
421
425
|
getStarsTransactions,
|
|
@@ -486,6 +490,7 @@ export {
|
|
|
486
490
|
resolvePeer,
|
|
487
491
|
resolvePeerMany,
|
|
488
492
|
resolvePhoneNumber,
|
|
493
|
+
resolveStarGiftOffer,
|
|
489
494
|
resolveUser,
|
|
490
495
|
restrictChatMember,
|
|
491
496
|
revokeInviteLink,
|
|
@@ -506,6 +511,7 @@ export {
|
|
|
506
511
|
sendRecoveryCode,
|
|
507
512
|
sendScheduled,
|
|
508
513
|
sendStarGift,
|
|
514
|
+
sendStarGiftOffer,
|
|
509
515
|
sendStory,
|
|
510
516
|
sendStoryReaction,
|
|
511
517
|
sendText,
|
|
@@ -19,6 +19,10 @@ const CLIENT_ERRORS = /* @__PURE__ */ new Set([
|
|
|
19
19
|
tl.tl.RpcError.SEE_OTHER,
|
|
20
20
|
tl.tl.RpcError.NOT_ACCEPTABLE
|
|
21
21
|
]);
|
|
22
|
+
const PTS_ERRORS = /* @__PURE__ */ new Set([
|
|
23
|
+
"PERSISTENT_TIMESTAMP_INVALID",
|
|
24
|
+
"PERSISTENT_TIMESTAMP_OUTDATED"
|
|
25
|
+
]);
|
|
22
26
|
function internalErrorsHandler(params) {
|
|
23
27
|
const { maxRetries = Infinity, waitTime = 1, exceptErrors } = params;
|
|
24
28
|
const exceptErrorsSet = exceptErrors ? new Set(exceptErrors) : void 0;
|
|
@@ -29,6 +33,7 @@ function internalErrorsHandler(params) {
|
|
|
29
33
|
const res = await next(ctx);
|
|
30
34
|
if (!typeAssertions.isTlRpcError(res)) return res;
|
|
31
35
|
if (!CLIENT_ERRORS.has(res.errorCode)) {
|
|
36
|
+
if (PTS_ERRORS.has(res.errorMessage)) return res;
|
|
32
37
|
if (exceptErrorsSet?.has(res.errorMessage)) return res;
|
|
33
38
|
lastError = res;
|
|
34
39
|
if (ctx.params?.throw503 && res.errorCode === -503) {
|
|
@@ -12,6 +12,10 @@ const CLIENT_ERRORS = /* @__PURE__ */ new Set([
|
|
|
12
12
|
tl.RpcError.SEE_OTHER,
|
|
13
13
|
tl.RpcError.NOT_ACCEPTABLE
|
|
14
14
|
]);
|
|
15
|
+
const PTS_ERRORS = /* @__PURE__ */ new Set([
|
|
16
|
+
"PERSISTENT_TIMESTAMP_INVALID",
|
|
17
|
+
"PERSISTENT_TIMESTAMP_OUTDATED"
|
|
18
|
+
]);
|
|
15
19
|
function internalErrorsHandler(params) {
|
|
16
20
|
const { maxRetries = Infinity, waitTime = 1, exceptErrors } = params;
|
|
17
21
|
const exceptErrorsSet = exceptErrors ? new Set(exceptErrors) : void 0;
|
|
@@ -22,6 +26,7 @@ function internalErrorsHandler(params) {
|
|
|
22
26
|
const res = await next(ctx);
|
|
23
27
|
if (!isTlRpcError(res)) return res;
|
|
24
28
|
if (!CLIENT_ERRORS.has(res.errorCode)) {
|
|
29
|
+
if (PTS_ERRORS.has(res.errorMessage)) return res;
|
|
25
30
|
if (exceptErrorsSet?.has(res.errorMessage)) return res;
|
|
26
31
|
lastError = res;
|
|
27
32
|
if (ctx.params?.throw503 && res.errorCode === -503) {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mtcute/core",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.27.
|
|
4
|
+
"version": "0.27.3",
|
|
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.17",
|
|
11
11
|
"@fuman/utils": "0.0.17",
|
|
12
12
|
"@mtcute/file-id": "^0.27.0",
|
|
13
|
-
"@mtcute/tl": "^
|
|
13
|
+
"@mtcute/tl": "^220.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
|
@@ -57,12 +57,14 @@ function mapCompatStarGift(obj) {
|
|
|
57
57
|
giftId: Long.ZERO
|
|
58
58
|
};
|
|
59
59
|
case "starGiftUnique_layer214":
|
|
60
|
+
case "starGiftUnique_layer218":
|
|
60
61
|
return replaceType(obj, "starGiftUnique");
|
|
61
62
|
case "starGift_layer202":
|
|
62
63
|
case "starGift_layer206":
|
|
63
64
|
case "starGift_layer209":
|
|
64
65
|
case "starGift_layer211":
|
|
65
66
|
case "starGift_layer216":
|
|
67
|
+
case "starGift_layer218":
|
|
66
68
|
return replaceType(obj, "starGift");
|
|
67
69
|
default:
|
|
68
70
|
return obj;
|
|
@@ -118,6 +120,7 @@ function mapCompatMessageAction(obj) {
|
|
|
118
120
|
case "messageActionStarGift_layer197":
|
|
119
121
|
case "messageActionStarGift_layer211":
|
|
120
122
|
case "messageActionStarGift_layer216":
|
|
123
|
+
case "messageActionStarGift_layer218":
|
|
121
124
|
return {
|
|
122
125
|
...obj,
|
|
123
126
|
_: "messageActionStarGift",
|
|
@@ -192,11 +195,13 @@ function mapCompatObject(obj) {
|
|
|
192
195
|
case "starGiftUnique_layer210":
|
|
193
196
|
case "starGiftUnique_layer211":
|
|
194
197
|
case "starGiftUnique_layer214":
|
|
198
|
+
case "starGiftUnique_layer218":
|
|
195
199
|
case "starGift_layer202":
|
|
196
200
|
case "starGift_layer206":
|
|
197
201
|
case "starGift_layer209":
|
|
198
202
|
case "starGift_layer211":
|
|
199
203
|
case "starGift_layer216":
|
|
204
|
+
case "starGift_layer218":
|
|
200
205
|
return mapCompatStarGift(obj);
|
|
201
206
|
case "emojiStatus_layer197":
|
|
202
207
|
case "emojiStatusUntil_layer214":
|
|
@@ -217,6 +222,7 @@ function mapCompatObject(obj) {
|
|
|
217
222
|
case "messageActionGiftCode_layer216":
|
|
218
223
|
case "messageActionGiftPremium_layer216":
|
|
219
224
|
case "messageActionStarGift_layer216":
|
|
225
|
+
case "messageActionStarGift_layer218":
|
|
220
226
|
return mapCompatMessageAction(obj);
|
|
221
227
|
case "userFull_layer199":
|
|
222
228
|
return replaceType(dropFields(obj, ["premiumGifts"]), "userFull");
|
|
@@ -269,6 +275,12 @@ function mapCompatObject(obj) {
|
|
|
269
275
|
};
|
|
270
276
|
case "premiumGiftOption_layer199":
|
|
271
277
|
return null;
|
|
278
|
+
case "webPageAttributeStarGiftAuction_layer218":
|
|
279
|
+
return {
|
|
280
|
+
_: "webPageAttributeStarGiftAuction",
|
|
281
|
+
gift: mapCompatStarGift(obj.gift),
|
|
282
|
+
endDate: obj.endDate
|
|
283
|
+
};
|
|
272
284
|
default:
|
|
273
285
|
return obj;
|
|
274
286
|
}
|
package/utils/binary/compat.js
CHANGED
|
@@ -50,12 +50,14 @@ function mapCompatStarGift(obj) {
|
|
|
50
50
|
giftId: Long.ZERO
|
|
51
51
|
};
|
|
52
52
|
case "starGiftUnique_layer214":
|
|
53
|
+
case "starGiftUnique_layer218":
|
|
53
54
|
return replaceType(obj, "starGiftUnique");
|
|
54
55
|
case "starGift_layer202":
|
|
55
56
|
case "starGift_layer206":
|
|
56
57
|
case "starGift_layer209":
|
|
57
58
|
case "starGift_layer211":
|
|
58
59
|
case "starGift_layer216":
|
|
60
|
+
case "starGift_layer218":
|
|
59
61
|
return replaceType(obj, "starGift");
|
|
60
62
|
default:
|
|
61
63
|
return obj;
|
|
@@ -111,6 +113,7 @@ function mapCompatMessageAction(obj) {
|
|
|
111
113
|
case "messageActionStarGift_layer197":
|
|
112
114
|
case "messageActionStarGift_layer211":
|
|
113
115
|
case "messageActionStarGift_layer216":
|
|
116
|
+
case "messageActionStarGift_layer218":
|
|
114
117
|
return {
|
|
115
118
|
...obj,
|
|
116
119
|
_: "messageActionStarGift",
|
|
@@ -185,11 +188,13 @@ function mapCompatObject(obj) {
|
|
|
185
188
|
case "starGiftUnique_layer210":
|
|
186
189
|
case "starGiftUnique_layer211":
|
|
187
190
|
case "starGiftUnique_layer214":
|
|
191
|
+
case "starGiftUnique_layer218":
|
|
188
192
|
case "starGift_layer202":
|
|
189
193
|
case "starGift_layer206":
|
|
190
194
|
case "starGift_layer209":
|
|
191
195
|
case "starGift_layer211":
|
|
192
196
|
case "starGift_layer216":
|
|
197
|
+
case "starGift_layer218":
|
|
193
198
|
return mapCompatStarGift(obj);
|
|
194
199
|
case "emojiStatus_layer197":
|
|
195
200
|
case "emojiStatusUntil_layer214":
|
|
@@ -210,6 +215,7 @@ function mapCompatObject(obj) {
|
|
|
210
215
|
case "messageActionGiftCode_layer216":
|
|
211
216
|
case "messageActionGiftPremium_layer216":
|
|
212
217
|
case "messageActionStarGift_layer216":
|
|
218
|
+
case "messageActionStarGift_layer218":
|
|
213
219
|
return mapCompatMessageAction(obj);
|
|
214
220
|
case "userFull_layer199":
|
|
215
221
|
return replaceType(dropFields(obj, ["premiumGifts"]), "userFull");
|
|
@@ -262,6 +268,12 @@ function mapCompatObject(obj) {
|
|
|
262
268
|
};
|
|
263
269
|
case "premiumGiftOption_layer199":
|
|
264
270
|
return null;
|
|
271
|
+
case "webPageAttributeStarGiftAuction_layer218":
|
|
272
|
+
return {
|
|
273
|
+
_: "webPageAttributeStarGiftAuction",
|
|
274
|
+
gift: mapCompatStarGift(obj.gift),
|
|
275
|
+
endDate: obj.endDate
|
|
276
|
+
};
|
|
265
277
|
default:
|
|
266
278
|
return obj;
|
|
267
279
|
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|