@mtcute/tl 208.0.0 → 210.0.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/README.md +1 -1
- package/api-schema.json +1 -1
- package/binary/reader.js +8 -4
- package/binary/writer.js +15 -5
- package/compat/index.d.ts +103 -2
- package/compat/reader.js +2 -0
- package/index.d.ts +102 -1
- package/index.js +5 -2
- package/package.json +1 -1
package/binary/reader.js
CHANGED
|
@@ -209,7 +209,7 @@ var m={
|
|
|
209
209
|
4124956391:function(r){return{_:'inputReportReasonFake'}},
|
|
210
210
|
177124030:function(r){return{_:'inputReportReasonIllegalDrugs'}},
|
|
211
211
|
2663876157:function(r){return{_:'inputReportReasonPersonalDetails'}},
|
|
212
|
-
|
|
212
|
+
702447806:function(r){var flags=r.uint(),flags2=r.uint();return{_:'userFull',blocked:!!(flags&1),phoneCallsAvailable:!!(flags&16),phoneCallsPrivate:!!(flags&32),canPinMessage:!!(flags&128),hasScheduled:!!(flags&4096),videoCallsAvailable:!!(flags&8192),voiceMessagesForbidden:!!(flags&1048576),translationsDisabled:!!(flags&8388608),storiesPinnedAvailable:!!(flags&67108864),blockedMyStoriesFrom:!!(flags&134217728),wallpaperOverridden:!!(flags&268435456),contactRequirePremium:!!(flags&536870912),readDatesPrivate:!!(flags&1073741824),sponsoredEnabled:!!(flags2&128),canViewRevenue:!!(flags2&512),botCanManageEmojiStatus:!!(flags2&1024),displayGiftsButton:!!(flags2&65536),id:r.int53(),about:flags&2?r.string():void 0,settings:r.object(),personalPhoto:flags&2097152?r.object():void 0,profilePhoto:flags&4?r.object():void 0,fallbackPhoto:flags&4194304?r.object():void 0,notifySettings:r.object(),botInfo:flags&8?r.object():void 0,pinnedMsgId:flags&64?r.int():void 0,commonChatsCount:r.int(),folderId:flags&2048?r.int():void 0,ttlPeriod:flags&16384?r.int():void 0,themeEmoticon:flags&32768?r.string():void 0,privateForwardName:flags&65536?r.string():void 0,botGroupAdminRights:flags&131072?r.object():void 0,botBroadcastAdminRights:flags&262144?r.object():void 0,wallpaper:flags&16777216?r.object():void 0,stories:flags&33554432?r.object():void 0,businessWorkHours:flags2&1?r.object():void 0,businessLocation:flags2&2?r.object():void 0,businessGreetingMessage:flags2&4?r.object():void 0,businessAwayMessage:flags2&8?r.object():void 0,businessIntro:flags2&16?r.object():void 0,birthday:flags2&32?r.object():void 0,personalChannelId:flags2&64?r.int53():void 0,personalChannelMessage:flags2&64?r.int():void 0,stargiftsCount:flags2&256?r.int():void 0,starrefProgram:flags2&2048?r.object():void 0,botVerification:flags2&4096?r.object():void 0,sendPaidMessagesStars:flags2&16384?r.long():void 0,disallowedGifts:flags2&32768?r.object():void 0,starsRating:flags2&131072?r.object():void 0,}},
|
|
213
213
|
341499403:function(r){return{_:'contact',userId:r.int53(),mutual:r.boolean(),}},
|
|
214
214
|
3242081360:function(r){return{_:'importedContact',userId:r.int53(),clientId:r.long(),}},
|
|
215
215
|
383348795:function(r){return{_:'contactStatus',userId:r.int53(),status:r.object(),}},
|
|
@@ -1394,8 +1394,8 @@ var m={
|
|
|
1394
1394
|
1269016922:function(r){var flags=r.uint();return{_:'messageReactor',top:!!(flags&1),my:!!(flags&2),anonymous:!!(flags&4),peerId:flags&8?r.object():void 0,count:r.int(),}},
|
|
1395
1395
|
2496562474:function(r){var flags=r.uint();return{_:'starsGiveawayOption',extended:!!(flags&1),default:!!(flags&2),stars:r.long(),yearlyBoosts:r.int(),storeProduct:flags&4?r.string():void 0,currency:r.string(),amount:r.long(),winners:r.vector(r.object),}},
|
|
1396
1396
|
1411605001:function(r){var flags=r.uint();return{_:'starsGiveawayWinnersOption',default:!!(flags&1),users:r.int(),perUserStars:r.long(),}},
|
|
1397
|
-
|
|
1398
|
-
4130830510:function(r){var flags=r.uint();return{_:'starGiftUnique',id:r.long(),title:r.string(),slug:r.string(),num:r.int(),ownerId:flags&1?r.object():void 0,ownerName:flags&2?r.string():void 0,ownerAddress:flags&4?r.string():void 0,attributes:r.vector(r.object),availabilityIssued:r.int(),availabilityTotal:r.int(),giftAddress:flags&8?r.string():void 0,resellStars:flags&16?r.long():void 0,releasedBy:flags&32?r.object():void 0,}},
|
|
1397
|
+
12386139:function(r){var flags=r.uint();return{_:'starGift',limited:!!(flags&1),soldOut:!!(flags&2),birthday:!!(flags&4),requirePremium:!!(flags&128),limitedPerUser:!!(flags&256),id:r.long(),sticker:r.object(),stars:r.long(),availabilityRemains:flags&1?r.int():void 0,availabilityTotal:flags&1?r.int():void 0,availabilityResale:flags&16?r.long():void 0,convertStars:r.long(),firstSaleDate:flags&2?r.int():void 0,lastSaleDate:flags&2?r.int():void 0,upgradeStars:flags&8?r.long():void 0,resellMinStars:flags&16?r.long():void 0,title:flags&32?r.string():void 0,releasedBy:flags&64?r.object():void 0,perUserTotal:flags&256?r.int():void 0,perUserRemains:flags&256?r.int():void 0,}},
|
|
1398
|
+
4130830510:function(r){var flags=r.uint();return{_:'starGiftUnique',requirePremium:!!(flags&64),id:r.long(),title:r.string(),slug:r.string(),num:r.int(),ownerId:flags&1?r.object():void 0,ownerName:flags&2?r.string():void 0,ownerAddress:flags&4?r.string():void 0,attributes:r.vector(r.object),availabilityIssued:r.int(),availabilityTotal:r.int(),giftAddress:flags&8?r.string():void 0,resellStars:flags&16?r.long():void 0,releasedBy:flags&32?r.object():void 0,}},
|
|
1399
1399
|
2743640936:function(r){return{_:'payments.starGiftsNotModified'}},
|
|
1400
1400
|
785918357:function(r){return{_:'payments.starGifts',hash:r.int(),gifts:r.vector(r.object),chats:r.vector(r.object),users:r.vector(r.object),}},
|
|
1401
1401
|
2030298073:function(r){return{_:'messageReportOption',text:r.string(),option:r.bytes(),}},
|
|
@@ -1423,7 +1423,7 @@ var m={
|
|
|
1423
1423
|
828000628:function(r){return{_:'users.usersSlice',count:r.int(),users:r.vector(r.object),}},
|
|
1424
1424
|
3399677451:function(r){return{_:'payments.uniqueStarGift',gift:r.object(),users:r.vector(r.object),}},
|
|
1425
1425
|
3040774945:function(r){return{_:'messages.webPagePreview',media:r.object(),users:r.vector(r.object),}},
|
|
1426
|
-
|
|
1426
|
+
514213599:function(r){var flags=r.uint();return{_:'savedStarGift',nameHidden:!!(flags&1),unsaved:!!(flags&32),refunded:!!(flags&512),canUpgrade:!!(flags&1024),pinnedToTop:!!(flags&4096),fromId:flags&2?r.object():void 0,date:r.int(),gift:r.object(),message:flags&4?r.object():void 0,msgId:flags&8?r.int():void 0,savedId:flags&2048?r.long():void 0,convertStars:flags&16?r.long():void 0,upgradeStars:flags&64?r.long():void 0,canExportAt:flags&128?r.int():void 0,transferStars:flags&256?r.long():void 0,canTransferAt:flags&8192?r.int():void 0,canResellAt:flags&16384?r.int():void 0,collectionId:flags&32768?r.vector(r.int):void 0,}},
|
|
1427
1427
|
2515765681:function(r){var flags=r.uint();return{_:'payments.savedStarGifts',count:r.int(),chatNotificationsEnabled:flags&2?r.boolean():void 0,gifts:r.vector(r.object),nextOffset:flags&1?r.string():void 0,chats:r.vector(r.object),users:r.vector(r.object),}},
|
|
1428
1428
|
1764202389:function(r){return{_:'inputSavedStarGiftUser',msgId:r.int(),}},
|
|
1429
1429
|
4043418239:function(r){return{_:'inputSavedStarGiftChat',peer:r.object(),savedId:r.long(),}},
|
|
@@ -1458,6 +1458,10 @@ var m={
|
|
|
1458
1458
|
485912992:function(r){return{_:'inputStickerSetTonGifts'}},
|
|
1459
1459
|
1957618656:function(r){return{_:'starsTonAmount',amount:r.long(),}},
|
|
1460
1460
|
244201445:function(r){var flags=r.uint();return{_:'suggestedPost',accepted:!!(flags&2),rejected:!!(flags&4),price:flags&8?r.object():void 0,scheduleDate:flags&1?r.int():void 0,}},
|
|
1461
|
+
453922567:function(r){var flags=r.uint();return{_:'starsRating',level:r.int(),currentLevelStars:r.long(),stars:r.long(),nextLevelStars:flags&1?r.long():void 0,}},
|
|
1462
|
+
2641040304:function(r){var flags=r.uint();return{_:'starGiftCollection',collectionId:r.int(),title:r.string(),icon:flags&1?r.object():void 0,giftsCount:r.int(),hash:r.long(),}},
|
|
1463
|
+
2696564503:function(r){return{_:'payments.starGiftCollectionsNotModified'}},
|
|
1464
|
+
2317955827:function(r){return{_:'payments.starGiftCollections',collections:r.vector(r.object),}},
|
|
1461
1465
|
1958953753:function(r){var flags=r.uint();return{_:'premiumGiftOption',months:r.int(),currency:r.string(),amount:r.long(),botUrl:r.string(),storeProduct:flags&1?r.string():void 0,}},
|
|
1462
1466
|
4197492935:function(r){return{_:'emojiStatusUntil',documentId:r.long(),until:r.int(),}},
|
|
1463
1467
|
4003764846:function(r){var flags=r.uint();return{_:'userStarGift',nameHidden:!!(flags&1),unsaved:!!(flags&32),fromId:flags&2?r.int53():void 0,date:r.int(),gift:r.object(),message:flags&4?r.object():void 0,msgId:flags&8?r.int():void 0,convertStars:flags&16?r.long():void 0,}},
|
package/binary/writer.js
CHANGED
|
@@ -210,7 +210,7 @@ var m={
|
|
|
210
210
|
'inputReportReasonFake':function(w){w.uint(4124956391);},
|
|
211
211
|
'inputReportReasonIllegalDrugs':function(w){w.uint(177124030);},
|
|
212
212
|
'inputReportReasonPersonalDetails':function(w){w.uint(2663876157);},
|
|
213
|
-
'userFull':function(w,v){w.uint(
|
|
213
|
+
'userFull':function(w,v){w.uint(702447806);var flags=0;if(v.blocked===true)flags|=1;var _about=v.about!==undefined;if(_about)flags|=2;var _profilePhoto=v.profilePhoto!==undefined;if(_profilePhoto)flags|=4;var _botInfo=v.botInfo!==undefined;if(_botInfo)flags|=8;if(v.phoneCallsAvailable===true)flags|=16;if(v.phoneCallsPrivate===true)flags|=32;var _pinnedMsgId=v.pinnedMsgId!==undefined;if(_pinnedMsgId)flags|=64;if(v.canPinMessage===true)flags|=128;var _folderId=v.folderId!==undefined;if(_folderId)flags|=2048;if(v.hasScheduled===true)flags|=4096;if(v.videoCallsAvailable===true)flags|=8192;var _ttlPeriod=v.ttlPeriod!==undefined;if(_ttlPeriod)flags|=16384;var _themeEmoticon=v.themeEmoticon!==undefined;if(_themeEmoticon)flags|=32768;var _privateForwardName=v.privateForwardName!==undefined;if(_privateForwardName)flags|=65536;var _botGroupAdminRights=v.botGroupAdminRights!==undefined;if(_botGroupAdminRights)flags|=131072;var _botBroadcastAdminRights=v.botBroadcastAdminRights!==undefined;if(_botBroadcastAdminRights)flags|=262144;if(v.voiceMessagesForbidden===true)flags|=1048576;var _personalPhoto=v.personalPhoto!==undefined;if(_personalPhoto)flags|=2097152;var _fallbackPhoto=v.fallbackPhoto!==undefined;if(_fallbackPhoto)flags|=4194304;if(v.translationsDisabled===true)flags|=8388608;var _wallpaper=v.wallpaper!==undefined;if(_wallpaper)flags|=16777216;var _stories=v.stories!==undefined;if(_stories)flags|=33554432;if(v.storiesPinnedAvailable===true)flags|=67108864;if(v.blockedMyStoriesFrom===true)flags|=134217728;if(v.wallpaperOverridden===true)flags|=268435456;if(v.contactRequirePremium===true)flags|=536870912;if(v.readDatesPrivate===true)flags|=1073741824;w.uint(flags);var flags2=0;var _businessWorkHours=v.businessWorkHours!==undefined;if(_businessWorkHours)flags2|=1;var _businessLocation=v.businessLocation!==undefined;if(_businessLocation)flags2|=2;var _businessGreetingMessage=v.businessGreetingMessage!==undefined;if(_businessGreetingMessage)flags2|=4;var _businessAwayMessage=v.businessAwayMessage!==undefined;if(_businessAwayMessage)flags2|=8;var _businessIntro=v.businessIntro!==undefined;if(_businessIntro)flags2|=16;var _birthday=v.birthday!==undefined;if(_birthday)flags2|=32;var _personalChannelId=v.personalChannelId!==undefined;var _personalChannelMessage=v.personalChannelMessage!==undefined;var _flags2_6=_personalChannelId||_personalChannelMessage;if(_flags2_6)flags2|=64;if(v.sponsoredEnabled===true)flags2|=128;var _stargiftsCount=v.stargiftsCount!==undefined;if(_stargiftsCount)flags2|=256;if(v.canViewRevenue===true)flags2|=512;if(v.botCanManageEmojiStatus===true)flags2|=1024;var _starrefProgram=v.starrefProgram!==undefined;if(_starrefProgram)flags2|=2048;var _botVerification=v.botVerification!==undefined;if(_botVerification)flags2|=4096;var _sendPaidMessagesStars=v.sendPaidMessagesStars!==undefined;if(_sendPaidMessagesStars)flags2|=16384;var _disallowedGifts=v.disallowedGifts!==undefined;if(_disallowedGifts)flags2|=32768;if(v.displayGiftsButton===true)flags2|=65536;var _starsRating=v.starsRating!==undefined;if(_starsRating)flags2|=131072;w.uint(flags2);w.int53(h(v,'id'));if(_about)w.string(v.about);w.object(h(v,'settings'));if(_personalPhoto)w.object(v.personalPhoto);if(_profilePhoto)w.object(v.profilePhoto);if(_fallbackPhoto)w.object(v.fallbackPhoto);w.object(h(v,'notifySettings'));if(_botInfo)w.object(v.botInfo);if(_pinnedMsgId)w.int(v.pinnedMsgId);w.int(h(v,'commonChatsCount'));if(_folderId)w.int(v.folderId);if(_ttlPeriod)w.int(v.ttlPeriod);if(_themeEmoticon)w.string(v.themeEmoticon);if(_privateForwardName)w.string(v.privateForwardName);if(_botGroupAdminRights)w.object(v.botGroupAdminRights);if(_botBroadcastAdminRights)w.object(v.botBroadcastAdminRights);if(_wallpaper)w.object(v.wallpaper);if(_stories)w.object(v.stories);if(_businessWorkHours)w.object(v.businessWorkHours);if(_businessLocation)w.object(v.businessLocation);if(_businessGreetingMessage)w.object(v.businessGreetingMessage);if(_businessAwayMessage)w.object(v.businessAwayMessage);if(_businessIntro)w.object(v.businessIntro);if(_birthday)w.object(v.birthday);if(_flags2_6)w.int53(v.personalChannelId);if(_flags2_6)w.int(v.personalChannelMessage);if(_stargiftsCount)w.int(v.stargiftsCount);if(_starrefProgram)w.object(v.starrefProgram);if(_botVerification)w.object(v.botVerification);if(_sendPaidMessagesStars)w.long(v.sendPaidMessagesStars);if(_disallowedGifts)w.object(v.disallowedGifts);if(_starsRating)w.object(v.starsRating);},
|
|
214
214
|
'contact':function(w,v){w.uint(341499403);w.int53(h(v,'userId'));w.boolean(h(v,'mutual'));},
|
|
215
215
|
'importedContact':function(w,v){w.uint(3242081360);w.int53(h(v,'userId'));w.long(h(v,'clientId'));},
|
|
216
216
|
'contactStatus':function(w,v){w.uint(383348795);w.int53(h(v,'userId'));w.object(h(v,'status'));},
|
|
@@ -1395,8 +1395,8 @@ var m={
|
|
|
1395
1395
|
'messageReactor':function(w,v){w.uint(1269016922);var flags=0;if(v.top===true)flags|=1;if(v.my===true)flags|=2;if(v.anonymous===true)flags|=4;var _peerId=v.peerId!==undefined;if(_peerId)flags|=8;w.uint(flags);if(_peerId)w.object(v.peerId);w.int(h(v,'count'));},
|
|
1396
1396
|
'starsGiveawayOption':function(w,v){w.uint(2496562474);var flags=0;if(v.extended===true)flags|=1;if(v.default===true)flags|=2;var _storeProduct=v.storeProduct!==undefined;if(_storeProduct)flags|=4;w.uint(flags);w.long(h(v,'stars'));w.int(h(v,'yearlyBoosts'));if(_storeProduct)w.string(v.storeProduct);w.string(h(v,'currency'));w.long(h(v,'amount'));w.vector(w.object,h(v,'winners'));},
|
|
1397
1397
|
'starsGiveawayWinnersOption':function(w,v){w.uint(1411605001);var flags=0;if(v.default===true)flags|=1;w.uint(flags);w.int(h(v,'users'));w.long(h(v,'perUserStars'));},
|
|
1398
|
-
'starGift':function(w,v){w.uint(
|
|
1399
|
-
'starGiftUnique':function(w,v){w.uint(4130830510);var flags=0;var _ownerId=v.ownerId!==undefined;if(_ownerId)flags|=1;var _ownerName=v.ownerName!==undefined;if(_ownerName)flags|=2;var _ownerAddress=v.ownerAddress!==undefined;if(_ownerAddress)flags|=4;var _giftAddress=v.giftAddress!==undefined;if(_giftAddress)flags|=8;var _resellStars=v.resellStars!==undefined;if(_resellStars)flags|=16;var _releasedBy=v.releasedBy!==undefined;if(_releasedBy)flags|=32;w.uint(flags);w.long(h(v,'id'));w.string(h(v,'title'));w.string(h(v,'slug'));w.int(h(v,'num'));if(_ownerId)w.object(v.ownerId);if(_ownerName)w.string(v.ownerName);if(_ownerAddress)w.string(v.ownerAddress);w.vector(w.object,h(v,'attributes'));w.int(h(v,'availabilityIssued'));w.int(h(v,'availabilityTotal'));if(_giftAddress)w.string(v.giftAddress);if(_resellStars)w.long(v.resellStars);if(_releasedBy)w.object(v.releasedBy);},
|
|
1398
|
+
'starGift':function(w,v){w.uint(12386139);var flags=0;var _availabilityRemains=v.availabilityRemains!==undefined;var _availabilityTotal=v.availabilityTotal!==undefined;var _flags_0=v.limited===true||_availabilityRemains||_availabilityTotal;if(_flags_0)flags|=1;var _firstSaleDate=v.firstSaleDate!==undefined;var _lastSaleDate=v.lastSaleDate!==undefined;var _flags_1=v.soldOut===true||_firstSaleDate||_lastSaleDate;if(_flags_1)flags|=2;if(v.birthday===true)flags|=4;var _upgradeStars=v.upgradeStars!==undefined;if(_upgradeStars)flags|=8;var _availabilityResale=v.availabilityResale!==undefined;var _resellMinStars=v.resellMinStars!==undefined;var _flags_4=_availabilityResale||_resellMinStars;if(_flags_4)flags|=16;var _title=v.title!==undefined;if(_title)flags|=32;var _releasedBy=v.releasedBy!==undefined;if(_releasedBy)flags|=64;if(v.requirePremium===true)flags|=128;var _perUserTotal=v.perUserTotal!==undefined;var _perUserRemains=v.perUserRemains!==undefined;var _flags_8=v.limitedPerUser===true||_perUserTotal||_perUserRemains;if(_flags_8)flags|=256;w.uint(flags);w.long(h(v,'id'));w.object(h(v,'sticker'));w.long(h(v,'stars'));if(_flags_0)w.int(v.availabilityRemains);if(_flags_0)w.int(v.availabilityTotal);if(_flags_4)w.long(v.availabilityResale);w.long(h(v,'convertStars'));if(_flags_1)w.int(v.firstSaleDate);if(_flags_1)w.int(v.lastSaleDate);if(_upgradeStars)w.long(v.upgradeStars);if(_flags_4)w.long(v.resellMinStars);if(_title)w.string(v.title);if(_releasedBy)w.object(v.releasedBy);if(_flags_8)w.int(v.perUserTotal);if(_flags_8)w.int(v.perUserRemains);},
|
|
1399
|
+
'starGiftUnique':function(w,v){w.uint(4130830510);var flags=0;var _ownerId=v.ownerId!==undefined;if(_ownerId)flags|=1;var _ownerName=v.ownerName!==undefined;if(_ownerName)flags|=2;var _ownerAddress=v.ownerAddress!==undefined;if(_ownerAddress)flags|=4;var _giftAddress=v.giftAddress!==undefined;if(_giftAddress)flags|=8;var _resellStars=v.resellStars!==undefined;if(_resellStars)flags|=16;var _releasedBy=v.releasedBy!==undefined;if(_releasedBy)flags|=32;if(v.requirePremium===true)flags|=64;w.uint(flags);w.long(h(v,'id'));w.string(h(v,'title'));w.string(h(v,'slug'));w.int(h(v,'num'));if(_ownerId)w.object(v.ownerId);if(_ownerName)w.string(v.ownerName);if(_ownerAddress)w.string(v.ownerAddress);w.vector(w.object,h(v,'attributes'));w.int(h(v,'availabilityIssued'));w.int(h(v,'availabilityTotal'));if(_giftAddress)w.string(v.giftAddress);if(_resellStars)w.long(v.resellStars);if(_releasedBy)w.object(v.releasedBy);},
|
|
1400
1400
|
'payments.starGiftsNotModified':function(w){w.uint(2743640936);},
|
|
1401
1401
|
'payments.starGifts':function(w,v){w.uint(785918357);w.int(h(v,'hash'));w.vector(w.object,h(v,'gifts'));w.vector(w.object,h(v,'chats'));w.vector(w.object,h(v,'users'));},
|
|
1402
1402
|
'messageReportOption':function(w,v){w.uint(2030298073);w.string(h(v,'text'));w.bytes(h(v,'option'));},
|
|
@@ -1424,7 +1424,7 @@ var m={
|
|
|
1424
1424
|
'users.usersSlice':function(w,v){w.uint(828000628);w.int(h(v,'count'));w.vector(w.object,h(v,'users'));},
|
|
1425
1425
|
'payments.uniqueStarGift':function(w,v){w.uint(3399677451);w.object(h(v,'gift'));w.vector(w.object,h(v,'users'));},
|
|
1426
1426
|
'messages.webPagePreview':function(w,v){w.uint(3040774945);w.object(h(v,'media'));w.vector(w.object,h(v,'users'));},
|
|
1427
|
-
'savedStarGift':function(w,v){w.uint(
|
|
1427
|
+
'savedStarGift':function(w,v){w.uint(514213599);var flags=0;if(v.nameHidden===true)flags|=1;var _fromId=v.fromId!==undefined;if(_fromId)flags|=2;var _message=v.message!==undefined;if(_message)flags|=4;var _msgId=v.msgId!==undefined;if(_msgId)flags|=8;var _convertStars=v.convertStars!==undefined;if(_convertStars)flags|=16;if(v.unsaved===true)flags|=32;var _upgradeStars=v.upgradeStars!==undefined;if(_upgradeStars)flags|=64;var _canExportAt=v.canExportAt!==undefined;if(_canExportAt)flags|=128;var _transferStars=v.transferStars!==undefined;if(_transferStars)flags|=256;if(v.refunded===true)flags|=512;if(v.canUpgrade===true)flags|=1024;var _savedId=v.savedId!==undefined;if(_savedId)flags|=2048;if(v.pinnedToTop===true)flags|=4096;var _canTransferAt=v.canTransferAt!==undefined;if(_canTransferAt)flags|=8192;var _canResellAt=v.canResellAt!==undefined;if(_canResellAt)flags|=16384;var _collectionId=v.collectionId&&v.collectionId.length;if(_collectionId)flags|=32768;w.uint(flags);if(_fromId)w.object(v.fromId);w.int(h(v,'date'));w.object(h(v,'gift'));if(_message)w.object(v.message);if(_msgId)w.int(v.msgId);if(_savedId)w.long(v.savedId);if(_convertStars)w.long(v.convertStars);if(_upgradeStars)w.long(v.upgradeStars);if(_canExportAt)w.int(v.canExportAt);if(_transferStars)w.long(v.transferStars);if(_canTransferAt)w.int(v.canTransferAt);if(_canResellAt)w.int(v.canResellAt);if(_collectionId)w.vector(w.int,v.collectionId);},
|
|
1428
1428
|
'payments.savedStarGifts':function(w,v){w.uint(2515765681);var flags=0;var _nextOffset=v.nextOffset!==undefined;if(_nextOffset)flags|=1;var _chatNotificationsEnabled=v.chatNotificationsEnabled!==undefined;if(_chatNotificationsEnabled)flags|=2;w.uint(flags);w.int(h(v,'count'));if(_chatNotificationsEnabled)w.boolean(v.chatNotificationsEnabled);w.vector(w.object,h(v,'gifts'));if(_nextOffset)w.string(v.nextOffset);w.vector(w.object,h(v,'chats'));w.vector(w.object,h(v,'users'));},
|
|
1429
1429
|
'inputSavedStarGiftUser':function(w,v){w.uint(1764202389);w.int(h(v,'msgId'));},
|
|
1430
1430
|
'inputSavedStarGiftChat':function(w,v){w.uint(4043418239);w.object(h(v,'peer'));w.long(h(v,'savedId'));},
|
|
@@ -1459,6 +1459,10 @@ var m={
|
|
|
1459
1459
|
'inputStickerSetTonGifts':function(w){w.uint(485912992);},
|
|
1460
1460
|
'starsTonAmount':function(w,v){w.uint(1957618656);w.long(h(v,'amount'));},
|
|
1461
1461
|
'suggestedPost':function(w,v){w.uint(244201445);var flags=0;var _scheduleDate=v.scheduleDate!==undefined;if(_scheduleDate)flags|=1;if(v.accepted===true)flags|=2;if(v.rejected===true)flags|=4;var _price=v.price!==undefined;if(_price)flags|=8;w.uint(flags);if(_price)w.object(v.price);if(_scheduleDate)w.int(v.scheduleDate);},
|
|
1462
|
+
'starsRating':function(w,v){w.uint(453922567);var flags=0;var _nextLevelStars=v.nextLevelStars!==undefined;if(_nextLevelStars)flags|=1;w.uint(flags);w.int(h(v,'level'));w.long(h(v,'currentLevelStars'));w.long(h(v,'stars'));if(_nextLevelStars)w.long(v.nextLevelStars);},
|
|
1463
|
+
'starGiftCollection':function(w,v){w.uint(2641040304);var flags=0;var _icon=v.icon!==undefined;if(_icon)flags|=1;w.uint(flags);w.int(h(v,'collectionId'));w.string(h(v,'title'));if(_icon)w.object(v.icon);w.int(h(v,'giftsCount'));w.long(h(v,'hash'));},
|
|
1464
|
+
'payments.starGiftCollectionsNotModified':function(w){w.uint(2696564503);},
|
|
1465
|
+
'payments.starGiftCollections':function(w,v){w.uint(2317955827);w.vector(w.object,h(v,'collections'));},
|
|
1462
1466
|
'premiumGiftOption':function(w,v){w.uint(1958953753);var flags=0;var _storeProduct=v.storeProduct!==undefined;if(_storeProduct)flags|=1;w.uint(flags);w.int(h(v,'months'));w.string(h(v,'currency'));w.long(h(v,'amount'));w.string(h(v,'botUrl'));if(_storeProduct)w.string(v.storeProduct);},
|
|
1463
1467
|
'emojiStatusUntil':function(w,v){w.uint(4197492935);w.long(h(v,'documentId'));w.int(h(v,'until'));},
|
|
1464
1468
|
'userStarGift':function(w,v){w.uint(4003764846);var flags=0;if(v.nameHidden===true)flags|=1;var _fromId=v.fromId!==undefined;if(_fromId)flags|=2;var _message=v.message!==undefined;if(_message)flags|=4;var _msgId=v.msgId!==undefined;if(_msgId)flags|=8;var _convertStars=v.convertStars!==undefined;if(_convertStars)flags|=16;if(v.unsaved===true)flags|=32;w.uint(flags);if(_fromId)w.int53(v.fromId);w.int(h(v,'date'));w.object(h(v,'gift'));if(_message)w.object(v.message);if(_msgId)w.int(v.msgId);if(_convertStars)w.long(v.convertStars);},
|
|
@@ -2055,7 +2059,7 @@ var m={
|
|
|
2055
2059
|
'payments.upgradeStarGift':function(w,v){w.uint(2933318901);var flags=0;if(v.keepOriginalDetails===true)flags|=1;w.uint(flags);w.object(h(v,'stargift'));},
|
|
2056
2060
|
'payments.transferStarGift':function(w,v){w.uint(2132285290);w.object(h(v,'stargift'));w.object(h(v,'toId'));},
|
|
2057
2061
|
'payments.getUniqueStarGift':function(w,v){w.uint(2711047538);w.string(h(v,'slug'));},
|
|
2058
|
-
'payments.getSavedStarGifts':function(w,v){w.uint(
|
|
2062
|
+
'payments.getSavedStarGifts':function(w,v){w.uint(2736383337);var flags=0;if(v.excludeUnsaved===true)flags|=1;if(v.excludeSaved===true)flags|=2;if(v.excludeUnlimited===true)flags|=4;if(v.excludeLimited===true)flags|=8;if(v.excludeUnique===true)flags|=16;if(v.sortByValue===true)flags|=32;var _collectionId=v.collectionId!==undefined;if(_collectionId)flags|=64;w.uint(flags);w.object(h(v,'peer'));if(_collectionId)w.int(v.collectionId);w.string(h(v,'offset'));w.int(h(v,'limit'));},
|
|
2059
2063
|
'payments.getSavedStarGift':function(w,v){w.uint(3025510662);w.vector(w.object,h(v,'stargift'));},
|
|
2060
2064
|
'payments.getStarGiftWithdrawalUrl':function(w,v){w.uint(3496907688);w.object(h(v,'stargift'));w.object(h(v,'password'));},
|
|
2061
2065
|
'payments.toggleChatStarGiftNotifications':function(w,v){w.uint(1626009505);var flags=0;if(v.enabled===true)flags|=1;w.uint(flags);w.object(h(v,'peer'));},
|
|
@@ -2178,6 +2182,11 @@ var m={
|
|
|
2178
2182
|
'smsjobs.finishJob':function(w,v){w.uint(1327415076);var flags=0;var _error=v.error!==undefined;if(_error)flags|=1;w.uint(flags);w.string(h(v,'jobId'));if(_error)w.string(v.error);},
|
|
2179
2183
|
'fragment.getCollectibleInfo':function(w,v){w.uint(3189671354);w.object(h(v,'collectible'));},
|
|
2180
2184
|
'messages.toggleSuggestedPostApproval':function(w,v){w.uint(2164737372);var flags=0;var _scheduleDate=v.scheduleDate!==undefined;if(_scheduleDate)flags|=1;if(v.reject===true)flags|=2;var _rejectComment=v.rejectComment!==undefined;if(_rejectComment)flags|=4;w.uint(flags);w.object(h(v,'peer'));w.int(h(v,'msgId'));if(_scheduleDate)w.int(v.scheduleDate);if(_rejectComment)w.string(v.rejectComment);},
|
|
2185
|
+
'payments.createStarGiftCollection':function(w,v){w.uint(524947079);w.object(h(v,'peer'));w.string(h(v,'title'));w.vector(w.object,h(v,'stargift'));},
|
|
2186
|
+
'payments.updateStarGiftCollection':function(w,v){w.uint(1339932391);var flags=0;var _title=v.title!==undefined;if(_title)flags|=1;var _deleteStargift=v.deleteStargift&&v.deleteStargift.length;if(_deleteStargift)flags|=2;var _addStargift=v.addStargift&&v.addStargift.length;if(_addStargift)flags|=4;var _order=v.order&&v.order.length;if(_order)flags|=8;w.uint(flags);w.object(h(v,'peer'));w.int(h(v,'collectionId'));if(_title)w.string(v.title);if(_deleteStargift)w.vector(w.object,v.deleteStargift);if(_addStargift)w.vector(w.object,v.addStargift);if(_order)w.vector(w.object,v.order);},
|
|
2187
|
+
'payments.reorderStarGiftCollections':function(w,v){w.uint(3274372300);w.object(h(v,'peer'));w.vector(w.int,h(v,'order'));},
|
|
2188
|
+
'payments.deleteStarGiftCollection':function(w,v){w.uint(2908113128);w.object(h(v,'peer'));w.int(h(v,'collectionId'));},
|
|
2189
|
+
'payments.getStarGiftCollections':function(w,v){w.uint(2551943645);w.object(h(v,'peer'));w.long(h(v,'hash'));},
|
|
2181
2190
|
'users.getIsPremiumRequiredToContact':function(w,v){w.uint(2787289616);w.vector(w.object,h(v,'id'));},
|
|
2182
2191
|
'payments.canPurchasePremium':function(w,v){w.uint(2680266422);w.object(h(v,'purpose'));},
|
|
2183
2192
|
'payments.getUserStarGifts':function(w,v){w.uint(1584580577);w.object(h(v,'userId'));w.string(h(v,'offset'));w.int(h(v,'limit'));},
|
|
@@ -2740,6 +2749,7 @@ _staticSize:{
|
|
|
2740
2749
|
'messageActionSuggestedPostRefund':8,
|
|
2741
2750
|
'inputStickerSetTonGifts':4,
|
|
2742
2751
|
'starsTonAmount':12,
|
|
2752
|
+
'payments.starGiftCollectionsNotModified':4,
|
|
2743
2753
|
'emojiStatusUntil':16,
|
|
2744
2754
|
'test.useConfigSimple':4,
|
|
2745
2755
|
'test.parseInputAppEvent':4,
|
package/compat/index.d.ts
CHANGED
|
@@ -21,6 +21,7 @@ export declare namespace tlCompat {
|
|
|
21
21
|
* Compared to the current schema, changes from this entry:
|
|
22
22
|
*
|
|
23
23
|
* Added arguments:
|
|
24
|
+
* require_premium: flags.6?true
|
|
24
25
|
* owner_address: flags.2?string
|
|
25
26
|
* gift_address: flags.3?string
|
|
26
27
|
* resell_stars: flags.4?long
|
|
@@ -189,6 +190,7 @@ export declare namespace tlCompat {
|
|
|
189
190
|
* Compared to the current schema, changes from this entry:
|
|
190
191
|
*
|
|
191
192
|
* Added arguments:
|
|
193
|
+
* require_premium: flags.6?true
|
|
192
194
|
* gift_address: flags.3?string
|
|
193
195
|
* resell_stars: flags.4?long
|
|
194
196
|
* released_by: flags.5?Peer
|
|
@@ -213,6 +215,7 @@ export declare namespace tlCompat {
|
|
|
213
215
|
* display_gifts_button: flags2.16?true
|
|
214
216
|
* send_paid_messages_stars: flags2.14?long
|
|
215
217
|
* disallowed_gifts: flags2.15?DisallowedGiftsSettings
|
|
218
|
+
* stars_rating: flags2.17?StarsRating
|
|
216
219
|
* Removed arguments: premium_gifts
|
|
217
220
|
*/
|
|
218
221
|
interface RawUserFull_layer199 {
|
|
@@ -432,6 +435,7 @@ export declare namespace tlCompat {
|
|
|
432
435
|
* Added arguments:
|
|
433
436
|
* display_gifts_button: flags2.16?true
|
|
434
437
|
* disallowed_gifts: flags2.15?DisallowedGiftsSettings
|
|
438
|
+
* stars_rating: flags2.17?StarsRating
|
|
435
439
|
*/
|
|
436
440
|
interface RawUserFull_layer200 {
|
|
437
441
|
_: 'userFull_layer200';
|
|
@@ -486,6 +490,7 @@ export declare namespace tlCompat {
|
|
|
486
490
|
* Compared to the current schema, changes from this entry:
|
|
487
491
|
*
|
|
488
492
|
* Added arguments:
|
|
493
|
+
* require_premium: flags.6?true
|
|
489
494
|
* resell_stars: flags.4?long
|
|
490
495
|
* released_by: flags.5?Peer
|
|
491
496
|
*/
|
|
@@ -507,10 +512,14 @@ export declare namespace tlCompat {
|
|
|
507
512
|
* Compared to the current schema, changes from this entry:
|
|
508
513
|
*
|
|
509
514
|
* Added arguments:
|
|
515
|
+
* require_premium: flags.7?true
|
|
516
|
+
* limited_per_user: flags.8?true
|
|
510
517
|
* availability_resale: flags.4?long
|
|
511
518
|
* resell_min_stars: flags.4?long
|
|
512
519
|
* title: flags.5?string
|
|
513
520
|
* released_by: flags.6?Peer
|
|
521
|
+
* per_user_total: flags.8?int
|
|
522
|
+
* per_user_remains: flags.8?int
|
|
514
523
|
*/
|
|
515
524
|
interface RawStarGift_layer202 {
|
|
516
525
|
_: 'starGift_layer202';
|
|
@@ -776,6 +785,7 @@ export declare namespace tlCompat {
|
|
|
776
785
|
* Compared to the current schema, changes from this entry:
|
|
777
786
|
*
|
|
778
787
|
* Added arguments:
|
|
788
|
+
* require_premium: flags.6?true
|
|
779
789
|
* released_by: flags.5?Peer
|
|
780
790
|
*/
|
|
781
791
|
interface RawStarGiftUnique_layer206 {
|
|
@@ -797,7 +807,11 @@ export declare namespace tlCompat {
|
|
|
797
807
|
* Compared to the current schema, changes from this entry:
|
|
798
808
|
*
|
|
799
809
|
* Added arguments:
|
|
810
|
+
* require_premium: flags.7?true
|
|
811
|
+
* limited_per_user: flags.8?true
|
|
800
812
|
* released_by: flags.6?Peer
|
|
813
|
+
* per_user_total: flags.8?int
|
|
814
|
+
* per_user_remains: flags.8?int
|
|
801
815
|
*/
|
|
802
816
|
interface RawStarGift_layer206 {
|
|
803
817
|
_: 'starGift_layer206';
|
|
@@ -837,14 +851,99 @@ export declare namespace tlCompat {
|
|
|
837
851
|
quoteEntities?: tl.TypeMessageEntity[];
|
|
838
852
|
quoteOffset?: number;
|
|
839
853
|
}
|
|
854
|
+
/**
|
|
855
|
+
* Compared to the current schema, changes from this entry:
|
|
856
|
+
*
|
|
857
|
+
* Added arguments:
|
|
858
|
+
* stars_rating: flags2.17?StarsRating
|
|
859
|
+
*/
|
|
860
|
+
interface RawUserFull_layer209 {
|
|
861
|
+
_: 'userFull_layer209';
|
|
862
|
+
blocked?: boolean;
|
|
863
|
+
phoneCallsAvailable?: boolean;
|
|
864
|
+
phoneCallsPrivate?: boolean;
|
|
865
|
+
canPinMessage?: boolean;
|
|
866
|
+
hasScheduled?: boolean;
|
|
867
|
+
videoCallsAvailable?: boolean;
|
|
868
|
+
voiceMessagesForbidden?: boolean;
|
|
869
|
+
translationsDisabled?: boolean;
|
|
870
|
+
storiesPinnedAvailable?: boolean;
|
|
871
|
+
blockedMyStoriesFrom?: boolean;
|
|
872
|
+
wallpaperOverridden?: boolean;
|
|
873
|
+
contactRequirePremium?: boolean;
|
|
874
|
+
readDatesPrivate?: boolean;
|
|
875
|
+
sponsoredEnabled?: boolean;
|
|
876
|
+
canViewRevenue?: boolean;
|
|
877
|
+
botCanManageEmojiStatus?: boolean;
|
|
878
|
+
displayGiftsButton?: boolean;
|
|
879
|
+
id: number;
|
|
880
|
+
about?: string;
|
|
881
|
+
settings: tl.TypePeerSettings;
|
|
882
|
+
personalPhoto?: tl.TypePhoto;
|
|
883
|
+
profilePhoto?: tl.TypePhoto;
|
|
884
|
+
fallbackPhoto?: tl.TypePhoto;
|
|
885
|
+
notifySettings: tl.TypePeerNotifySettings;
|
|
886
|
+
botInfo?: tl.TypeBotInfo;
|
|
887
|
+
pinnedMsgId?: number;
|
|
888
|
+
commonChatsCount: number;
|
|
889
|
+
folderId?: number;
|
|
890
|
+
ttlPeriod?: number;
|
|
891
|
+
themeEmoticon?: string;
|
|
892
|
+
privateForwardName?: string;
|
|
893
|
+
botGroupAdminRights?: tl.TypeChatAdminRights;
|
|
894
|
+
botBroadcastAdminRights?: tl.TypeChatAdminRights;
|
|
895
|
+
wallpaper?: tl.TypeWallPaper;
|
|
896
|
+
stories?: tl.TypePeerStories;
|
|
897
|
+
businessWorkHours?: tl.TypeBusinessWorkHours;
|
|
898
|
+
businessLocation?: tl.TypeBusinessLocation;
|
|
899
|
+
businessGreetingMessage?: tl.TypeBusinessGreetingMessage;
|
|
900
|
+
businessAwayMessage?: tl.TypeBusinessAwayMessage;
|
|
901
|
+
businessIntro?: tl.TypeBusinessIntro;
|
|
902
|
+
birthday?: tl.TypeBirthday;
|
|
903
|
+
personalChannelId?: number;
|
|
904
|
+
personalChannelMessage?: number;
|
|
905
|
+
stargiftsCount?: number;
|
|
906
|
+
starrefProgram?: tl.TypeStarRefProgram;
|
|
907
|
+
botVerification?: tl.TypeBotVerification;
|
|
908
|
+
sendPaidMessagesStars?: Long;
|
|
909
|
+
disallowedGifts?: tl.TypeDisallowedGiftsSettings;
|
|
910
|
+
}
|
|
911
|
+
/**
|
|
912
|
+
* Compared to the current schema, changes from this entry:
|
|
913
|
+
*
|
|
914
|
+
* Added arguments:
|
|
915
|
+
* require_premium: flags.7?true
|
|
916
|
+
* limited_per_user: flags.8?true
|
|
917
|
+
* per_user_total: flags.8?int
|
|
918
|
+
* per_user_remains: flags.8?int
|
|
919
|
+
*/
|
|
920
|
+
interface RawStarGift_layer209 {
|
|
921
|
+
_: 'starGift_layer209';
|
|
922
|
+
limited?: boolean;
|
|
923
|
+
soldOut?: boolean;
|
|
924
|
+
birthday?: boolean;
|
|
925
|
+
id: Long;
|
|
926
|
+
sticker: tl.TypeDocument;
|
|
927
|
+
stars: Long;
|
|
928
|
+
availabilityRemains?: number;
|
|
929
|
+
availabilityTotal?: number;
|
|
930
|
+
availabilityResale?: Long;
|
|
931
|
+
convertStars: Long;
|
|
932
|
+
firstSaleDate?: number;
|
|
933
|
+
lastSaleDate?: number;
|
|
934
|
+
upgradeStars?: Long;
|
|
935
|
+
resellMinStars?: Long;
|
|
936
|
+
title?: string;
|
|
937
|
+
releasedBy?: tl.TypePeer;
|
|
938
|
+
}
|
|
840
939
|
interface RpcCallReturn {
|
|
841
940
|
}
|
|
842
|
-
type TypeStarGift = tlCompat.RawStarGiftUnique_layer197 | tlCompat.RawStarGiftUnique_layer198 | tlCompat.RawStarGiftUnique_layer202 | tlCompat.RawStarGift_layer202 | tlCompat.RawStarGiftUnique_layer206 | tlCompat.RawStarGift_layer206 | AnyToNever<tl.TypeStarGift>
|
|
941
|
+
type TypeStarGift = tlCompat.RawStarGiftUnique_layer197 | tlCompat.RawStarGiftUnique_layer198 | tlCompat.RawStarGiftUnique_layer202 | tlCompat.RawStarGift_layer202 | tlCompat.RawStarGiftUnique_layer206 | tlCompat.RawStarGift_layer206 | tlCompat.RawStarGift_layer209 | AnyToNever<tl.TypeStarGift>
|
|
843
942
|
type TypeEmojiStatus = tlCompat.RawEmojiStatus_layer197 | AnyToNever<tl.TypeEmojiStatus>
|
|
844
943
|
type TypeMessageMedia = tlCompat.RawMessageMediaDocument_layer197 | AnyToNever<tl.TypeMessageMedia>
|
|
845
944
|
type TypeChatFull = tlCompat.RawChannelFull_layer197 | tlCompat.RawChannelFull_layer204 | AnyToNever<tl.TypeChatFull>
|
|
846
945
|
type TypeMessageAction = tlCompat.RawMessageActionStarGiftUnique_layer197 | tlCompat.RawMessageActionStarGift_layer197 | tlCompat.RawMessageActionStarGiftUnique_layer202 | tlCompat.RawMessageActionPaidMessagesPrice_layer203 | AnyToNever<tl.TypeMessageAction>
|
|
847
|
-
type TypeUserFull = tlCompat.RawUserFull_layer199 | tlCompat.RawUserFull_layer200 | AnyToNever<tl.TypeUserFull>
|
|
946
|
+
type TypeUserFull = tlCompat.RawUserFull_layer199 | tlCompat.RawUserFull_layer200 | tlCompat.RawUserFull_layer209 | AnyToNever<tl.TypeUserFull>
|
|
848
947
|
type TypeUser = tlCompat.RawUser_layer199 | AnyToNever<tl.TypeUser>
|
|
849
948
|
type TypeChat = tlCompat.RawChannel_layer199 | tlCompat.RawChannel_layer203 | AnyToNever<tl.TypeChat>
|
|
850
949
|
type TypeMessage = tlCompat.RawMessage_layer199 | tlCompat.RawMessageService_layer204 | tlCompat.RawMessage_layer204 | AnyToNever<tl.TypeMessage>
|
|
@@ -876,5 +975,7 @@ export declare namespace tlCompat {
|
|
|
876
975
|
| tlCompat.RawStarGiftUnique_layer206
|
|
877
976
|
| tlCompat.RawStarGift_layer206
|
|
878
977
|
| tlCompat.RawMessageReplyHeader_layer206
|
|
978
|
+
| tlCompat.RawUserFull_layer209
|
|
979
|
+
| tlCompat.RawStarGift_layer209
|
|
879
980
|
| tl.TlObject
|
|
880
981
|
}
|
package/compat/reader.js
CHANGED
|
@@ -26,5 +26,7 @@ var m={
|
|
|
26
26
|
1678891913:function(r){var flags=r.uint();return{_:'starGiftUnique_layer206',id:r.long(),title:r.string(),slug:r.string(),num:r.int(),ownerId:flags&1?r.object():void 0,ownerName:flags&2?r.string():void 0,ownerAddress:flags&4?r.string():void 0,attributes:r.vector(r.object),availabilityIssued:r.int(),availabilityTotal:r.int(),giftAddress:flags&8?r.string():void 0,resellStars:flags&16?r.long():void 0,}},
|
|
27
27
|
3324693032:function(r){var flags=r.uint();return{_:'starGift_layer206',limited:!!(flags&1),soldOut:!!(flags&2),birthday:!!(flags&4),id:r.long(),sticker:r.object(),stars:r.long(),availabilityRemains:flags&1?r.int():void 0,availabilityTotal:flags&1?r.int():void 0,availabilityResale:flags&16?r.long():void 0,convertStars:r.long(),firstSaleDate:flags&2?r.int():void 0,lastSaleDate:flags&2?r.int():void 0,upgradeStars:flags&8?r.long():void 0,resellMinStars:flags&16?r.long():void 0,title:flags&32?r.string():void 0,}},
|
|
28
28
|
2948336091:function(r){var flags=r.uint();return{_:'messageReplyHeader_layer206',replyToScheduled:!!(flags&4),forumTopic:!!(flags&8),quote:!!(flags&512),replyToMsgId:flags&16?r.int():void 0,replyToPeerId:flags&1?r.object():void 0,replyFrom:flags&32?r.object():void 0,replyMedia:flags&256?r.object():void 0,replyToTopId:flags&2?r.int():void 0,quoteText:flags&64?r.string():void 0,quoteEntities:flags&128?r.vector(r.object):void 0,quoteOffset:flags&1024?r.int():void 0,}},
|
|
29
|
+
2582085701:function(r){var flags=r.uint(),flags2=r.uint();return{_:'userFull_layer209',blocked:!!(flags&1),phoneCallsAvailable:!!(flags&16),phoneCallsPrivate:!!(flags&32),canPinMessage:!!(flags&128),hasScheduled:!!(flags&4096),videoCallsAvailable:!!(flags&8192),voiceMessagesForbidden:!!(flags&1048576),translationsDisabled:!!(flags&8388608),storiesPinnedAvailable:!!(flags&67108864),blockedMyStoriesFrom:!!(flags&134217728),wallpaperOverridden:!!(flags&268435456),contactRequirePremium:!!(flags&536870912),readDatesPrivate:!!(flags&1073741824),sponsoredEnabled:!!(flags2&128),canViewRevenue:!!(flags2&512),botCanManageEmojiStatus:!!(flags2&1024),displayGiftsButton:!!(flags2&65536),id:r.int53(),about:flags&2?r.string():void 0,settings:r.object(),personalPhoto:flags&2097152?r.object():void 0,profilePhoto:flags&4?r.object():void 0,fallbackPhoto:flags&4194304?r.object():void 0,notifySettings:r.object(),botInfo:flags&8?r.object():void 0,pinnedMsgId:flags&64?r.int():void 0,commonChatsCount:r.int(),folderId:flags&2048?r.int():void 0,ttlPeriod:flags&16384?r.int():void 0,themeEmoticon:flags&32768?r.string():void 0,privateForwardName:flags&65536?r.string():void 0,botGroupAdminRights:flags&131072?r.object():void 0,botBroadcastAdminRights:flags&262144?r.object():void 0,wallpaper:flags&16777216?r.object():void 0,stories:flags&33554432?r.object():void 0,businessWorkHours:flags2&1?r.object():void 0,businessLocation:flags2&2?r.object():void 0,businessGreetingMessage:flags2&4?r.object():void 0,businessAwayMessage:flags2&8?r.object():void 0,businessIntro:flags2&16?r.object():void 0,birthday:flags2&32?r.object():void 0,personalChannelId:flags2&64?r.int53():void 0,personalChannelMessage:flags2&64?r.int():void 0,stargiftsCount:flags2&256?r.int():void 0,starrefProgram:flags2&2048?r.object():void 0,botVerification:flags2&4096?r.object():void 0,sendPaidMessagesStars:flags2&16384?r.long():void 0,disallowedGifts:flags2&32768?r.object():void 0,}},
|
|
30
|
+
2139438098:function(r){var flags=r.uint();return{_:'starGift_layer209',limited:!!(flags&1),soldOut:!!(flags&2),birthday:!!(flags&4),id:r.long(),sticker:r.object(),stars:r.long(),availabilityRemains:flags&1?r.int():void 0,availabilityTotal:flags&1?r.int():void 0,availabilityResale:flags&16?r.long():void 0,convertStars:r.long(),firstSaleDate:flags&2?r.int():void 0,lastSaleDate:flags&2?r.int():void 0,upgradeStars:flags&8?r.long():void 0,resellMinStars:flags&16?r.long():void 0,title:flags&32?r.string():void 0,releasedBy:flags&64?r.object():void 0,}},
|
|
29
31
|
}
|
|
30
32
|
exports.__tlReaderMapCompat = m;
|
package/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _Long from 'long';
|
|
2
2
|
export declare namespace tl {
|
|
3
|
-
const LAYER =
|
|
3
|
+
const LAYER = 210;
|
|
4
4
|
|
|
5
5
|
function $extendTypes(types: Record<string, string>): void
|
|
6
6
|
|
|
@@ -6042,6 +6042,7 @@ export class RpcError extends Error {
|
|
|
6042
6042
|
botVerification?: tl.TypeBotVerification;
|
|
6043
6043
|
sendPaidMessagesStars?: Long;
|
|
6044
6044
|
disallowedGifts?: tl.TypeDisallowedGiftsSettings;
|
|
6045
|
+
starsRating?: tl.TypeStarsRating;
|
|
6045
6046
|
}
|
|
6046
6047
|
/**
|
|
6047
6048
|
* A contact of the current user that is registered in the
|
|
@@ -24590,6 +24591,8 @@ export class RpcError extends Error {
|
|
|
24590
24591
|
* Whether this is a birthday-themed gift
|
|
24591
24592
|
*/
|
|
24592
24593
|
birthday?: boolean;
|
|
24594
|
+
requirePremium?: boolean;
|
|
24595
|
+
limitedPerUser?: boolean;
|
|
24593
24596
|
/**
|
|
24594
24597
|
* Identifier of the gift
|
|
24595
24598
|
*/
|
|
@@ -24639,9 +24642,12 @@ export class RpcError extends Error {
|
|
|
24639
24642
|
resellMinStars?: Long;
|
|
24640
24643
|
title?: string;
|
|
24641
24644
|
releasedBy?: tl.TypePeer;
|
|
24645
|
+
perUserTotal?: number;
|
|
24646
|
+
perUserRemains?: number;
|
|
24642
24647
|
}
|
|
24643
24648
|
interface RawStarGiftUnique {
|
|
24644
24649
|
_: 'starGiftUnique';
|
|
24650
|
+
requirePremium?: boolean;
|
|
24645
24651
|
id: Long;
|
|
24646
24652
|
title: string;
|
|
24647
24653
|
slug: string;
|
|
@@ -24918,6 +24924,7 @@ export class RpcError extends Error {
|
|
|
24918
24924
|
transferStars?: Long;
|
|
24919
24925
|
canTransferAt?: number;
|
|
24920
24926
|
canResellAt?: number;
|
|
24927
|
+
collectionId?: number[];
|
|
24921
24928
|
}
|
|
24922
24929
|
interface RawInputSavedStarGiftUser {
|
|
24923
24930
|
_: 'inputSavedStarGiftUser';
|
|
@@ -25063,6 +25070,21 @@ export class RpcError extends Error {
|
|
|
25063
25070
|
price?: tl.TypeStarsAmount;
|
|
25064
25071
|
scheduleDate?: number;
|
|
25065
25072
|
}
|
|
25073
|
+
interface RawStarsRating {
|
|
25074
|
+
_: 'starsRating';
|
|
25075
|
+
level: number;
|
|
25076
|
+
currentLevelStars: Long;
|
|
25077
|
+
stars: Long;
|
|
25078
|
+
nextLevelStars?: Long;
|
|
25079
|
+
}
|
|
25080
|
+
interface RawStarGiftCollection {
|
|
25081
|
+
_: 'starGiftCollection';
|
|
25082
|
+
collectionId: number;
|
|
25083
|
+
title: string;
|
|
25084
|
+
icon?: tl.TypeDocument;
|
|
25085
|
+
giftsCount: number;
|
|
25086
|
+
hash: Long;
|
|
25087
|
+
}
|
|
25066
25088
|
/**
|
|
25067
25089
|
* Telegram Premium gift option
|
|
25068
25090
|
*/
|
|
@@ -27374,6 +27396,10 @@ export class RpcError extends Error {
|
|
|
27374
27396
|
function isAnyTodoCompletion(o: object): o is TypeTodoCompletion
|
|
27375
27397
|
type TypeSuggestedPost = tl.RawSuggestedPost
|
|
27376
27398
|
function isAnySuggestedPost(o: object): o is TypeSuggestedPost
|
|
27399
|
+
type TypeStarsRating = tl.RawStarsRating
|
|
27400
|
+
function isAnyStarsRating(o: object): o is TypeStarsRating
|
|
27401
|
+
type TypeStarGiftCollection = tl.RawStarGiftCollection
|
|
27402
|
+
function isAnyStarGiftCollection(o: object): o is TypeStarGiftCollection
|
|
27377
27403
|
/**
|
|
27378
27404
|
* Telegram Premium gift option
|
|
27379
27405
|
*/
|
|
@@ -44154,6 +44180,13 @@ export class RpcError extends Error {
|
|
|
44154
44180
|
counters?: tl.TypeStarGiftAttributeCounter[];
|
|
44155
44181
|
users: tl.TypeUser[];
|
|
44156
44182
|
}
|
|
44183
|
+
interface RawStarGiftCollectionsNotModified {
|
|
44184
|
+
_: 'payments.starGiftCollectionsNotModified';
|
|
44185
|
+
}
|
|
44186
|
+
interface RawStarGiftCollections {
|
|
44187
|
+
_: 'payments.starGiftCollections';
|
|
44188
|
+
collections: tl.TypeStarGiftCollection[];
|
|
44189
|
+
}
|
|
44157
44190
|
/**
|
|
44158
44191
|
* <a href="https://corefork.telegram.org/api/gifts">Gifts</a>
|
|
44159
44192
|
* displayed on a user's profile.
|
|
@@ -44981,6 +45014,7 @@ export class RpcError extends Error {
|
|
|
44981
45014
|
excludeUnique?: boolean;
|
|
44982
45015
|
sortByValue?: boolean;
|
|
44983
45016
|
peer: tl.TypeInputPeer;
|
|
45017
|
+
collectionId?: number;
|
|
44984
45018
|
offset: string;
|
|
44985
45019
|
/**
|
|
44986
45020
|
* Maximum number of results to return,
|
|
@@ -45054,6 +45088,52 @@ export class RpcError extends Error {
|
|
|
45054
45088
|
stargift: tl.TypeInputSavedStarGift;
|
|
45055
45089
|
resellStars: Long;
|
|
45056
45090
|
}
|
|
45091
|
+
/**
|
|
45092
|
+
* RPC method returns {@link tl.TypeStarGiftCollection}
|
|
45093
|
+
*/
|
|
45094
|
+
interface RawCreateStarGiftCollectionRequest {
|
|
45095
|
+
_: 'payments.createStarGiftCollection';
|
|
45096
|
+
peer: tl.TypeInputPeer;
|
|
45097
|
+
title: string;
|
|
45098
|
+
stargift: tl.TypeInputSavedStarGift[];
|
|
45099
|
+
}
|
|
45100
|
+
/**
|
|
45101
|
+
* RPC method returns {@link tl.TypeStarGiftCollection}
|
|
45102
|
+
*/
|
|
45103
|
+
interface RawUpdateStarGiftCollectionRequest {
|
|
45104
|
+
_: 'payments.updateStarGiftCollection';
|
|
45105
|
+
peer: tl.TypeInputPeer;
|
|
45106
|
+
collectionId: number;
|
|
45107
|
+
title?: string;
|
|
45108
|
+
deleteStargift?: tl.TypeInputSavedStarGift[];
|
|
45109
|
+
addStargift?: tl.TypeInputSavedStarGift[];
|
|
45110
|
+
order?: tl.TypeInputSavedStarGift[];
|
|
45111
|
+
}
|
|
45112
|
+
/**
|
|
45113
|
+
* RPC method returns boolean
|
|
45114
|
+
*/
|
|
45115
|
+
interface RawReorderStarGiftCollectionsRequest {
|
|
45116
|
+
_: 'payments.reorderStarGiftCollections';
|
|
45117
|
+
peer: tl.TypeInputPeer;
|
|
45118
|
+
order: number[];
|
|
45119
|
+
}
|
|
45120
|
+
/**
|
|
45121
|
+
* RPC method returns boolean
|
|
45122
|
+
*/
|
|
45123
|
+
interface RawDeleteStarGiftCollectionRequest {
|
|
45124
|
+
_: 'payments.deleteStarGiftCollection';
|
|
45125
|
+
peer: tl.TypeInputPeer;
|
|
45126
|
+
collectionId: number;
|
|
45127
|
+
}
|
|
45128
|
+
/**
|
|
45129
|
+
* RPC method returns
|
|
45130
|
+
* {@link tl.payments.TypeStarGiftCollections}
|
|
45131
|
+
*/
|
|
45132
|
+
interface RawGetStarGiftCollectionsRequest {
|
|
45133
|
+
_: 'payments.getStarGiftCollections';
|
|
45134
|
+
peer: tl.TypeInputPeer;
|
|
45135
|
+
hash: Long;
|
|
45136
|
+
}
|
|
45057
45137
|
/**
|
|
45058
45138
|
* Checks whether Telegram Premium purchase is possible. Must
|
|
45059
45139
|
* be called before in-store Premium purchase, official apps
|
|
@@ -45132,6 +45212,11 @@ export class RpcError extends Error {
|
|
|
45132
45212
|
'payments.canPurchaseStore': boolean
|
|
45133
45213
|
'payments.getResaleStarGifts': tl.payments.TypeResaleStarGifts
|
|
45134
45214
|
'payments.updateStarGiftPrice': tl.TypeUpdates
|
|
45215
|
+
'payments.createStarGiftCollection': tl.TypeStarGiftCollection
|
|
45216
|
+
'payments.updateStarGiftCollection': tl.TypeStarGiftCollection
|
|
45217
|
+
'payments.reorderStarGiftCollections': boolean
|
|
45218
|
+
'payments.deleteStarGiftCollection': boolean
|
|
45219
|
+
'payments.getStarGiftCollections': tl.payments.TypeStarGiftCollections
|
|
45135
45220
|
'payments.canPurchasePremium': boolean
|
|
45136
45221
|
'payments.getUserStarGifts': tl.payments.TypeUserStarGifts
|
|
45137
45222
|
}
|
|
@@ -45247,6 +45332,8 @@ export class RpcError extends Error {
|
|
|
45247
45332
|
function isAnyStarGiftWithdrawalUrl(o: object): o is TypeStarGiftWithdrawalUrl
|
|
45248
45333
|
type TypeResaleStarGifts = tl.payments.RawResaleStarGifts
|
|
45249
45334
|
function isAnyResaleStarGifts(o: object): o is TypeResaleStarGifts
|
|
45335
|
+
type TypeStarGiftCollections = tl.payments.RawStarGiftCollectionsNotModified | tl.payments.RawStarGiftCollections
|
|
45336
|
+
function isAnyStarGiftCollections(o: object): o is TypeStarGiftCollections
|
|
45250
45337
|
/**
|
|
45251
45338
|
* <a href="https://corefork.telegram.org/api/gifts">Gifts</a>
|
|
45252
45339
|
* displayed on a user's profile.
|
|
@@ -50610,6 +50697,11 @@ export class RpcError extends Error {
|
|
|
50610
50697
|
| tl.smsjobs.RawFinishJobRequest
|
|
50611
50698
|
| tl.fragment.RawGetCollectibleInfoRequest
|
|
50612
50699
|
| tl.messages.RawToggleSuggestedPostApprovalRequest
|
|
50700
|
+
| tl.payments.RawCreateStarGiftCollectionRequest
|
|
50701
|
+
| tl.payments.RawUpdateStarGiftCollectionRequest
|
|
50702
|
+
| tl.payments.RawReorderStarGiftCollectionsRequest
|
|
50703
|
+
| tl.payments.RawDeleteStarGiftCollectionRequest
|
|
50704
|
+
| tl.payments.RawGetStarGiftCollectionsRequest
|
|
50613
50705
|
| tl.users.RawGetIsPremiumRequiredToContactRequest
|
|
50614
50706
|
| tl.payments.RawCanPurchasePremiumRequest
|
|
50615
50707
|
| tl.payments.RawGetUserStarGiftsRequest
|
|
@@ -52073,6 +52165,10 @@ export class RpcError extends Error {
|
|
|
52073
52165
|
| tl.RawInputStickerSetTonGifts
|
|
52074
52166
|
| tl.RawStarsTonAmount
|
|
52075
52167
|
| tl.RawSuggestedPost
|
|
52168
|
+
| tl.RawStarsRating
|
|
52169
|
+
| tl.RawStarGiftCollection
|
|
52170
|
+
| tl.payments.RawStarGiftCollectionsNotModified
|
|
52171
|
+
| tl.payments.RawStarGiftCollections
|
|
52076
52172
|
| tl.RawPremiumGiftOption
|
|
52077
52173
|
| tl.RawEmojiStatusUntil
|
|
52078
52174
|
| tl.RawUserStarGift
|
|
@@ -52795,6 +52891,11 @@ export class RpcError extends Error {
|
|
|
52795
52891
|
| tl.smsjobs.RawFinishJobRequest
|
|
52796
52892
|
| tl.fragment.RawGetCollectibleInfoRequest
|
|
52797
52893
|
| tl.messages.RawToggleSuggestedPostApprovalRequest
|
|
52894
|
+
| tl.payments.RawCreateStarGiftCollectionRequest
|
|
52895
|
+
| tl.payments.RawUpdateStarGiftCollectionRequest
|
|
52896
|
+
| tl.payments.RawReorderStarGiftCollectionsRequest
|
|
52897
|
+
| tl.payments.RawDeleteStarGiftCollectionRequest
|
|
52898
|
+
| tl.payments.RawGetStarGiftCollectionsRequest
|
|
52798
52899
|
| tl.users.RawGetIsPremiumRequiredToContactRequest
|
|
52799
52900
|
| tl.payments.RawCanPurchasePremiumRequest
|
|
52800
52901
|
| tl.payments.RawGetUserStarGiftsRequest
|