@mtkruto/node 0.2.37 → 0.2.41

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.
Files changed (95) hide show
  1. package/esm/3_types.d.ts +1 -0
  2. package/esm/3_types.d.ts.map +1 -1
  3. package/esm/3_types.js +1 -0
  4. package/esm/4_constants.d.ts +1 -1
  5. package/esm/4_constants.js +1 -1
  6. package/esm/client/0_params.d.ts +17 -3
  7. package/esm/client/0_params.d.ts.map +1 -1
  8. package/esm/client/0_password.js +2 -2
  9. package/esm/client/0_utilities.d.ts +1 -0
  10. package/esm/client/0_utilities.d.ts.map +1 -1
  11. package/esm/client/0_utilities.js +13 -0
  12. package/esm/client/1_client_encrypted.d.ts.map +1 -1
  13. package/esm/client/1_client_encrypted.js +3 -0
  14. package/esm/client/2_update_manager.js +5 -5
  15. package/esm/client/3_message_manager.js +8 -8
  16. package/esm/client/5_client.d.ts +4 -0
  17. package/esm/client/5_client.d.ts.map +1 -1
  18. package/esm/client/5_client.js +56 -33
  19. package/esm/tl/0_api.d.ts +173 -16
  20. package/esm/tl/0_api.d.ts.map +1 -1
  21. package/esm/tl/0_api.js +279 -34
  22. package/esm/tl/1_utilities.d.ts +1 -1
  23. package/esm/tl/1_utilities.d.ts.map +1 -1
  24. package/esm/tl/1_utilities.js +13 -1
  25. package/esm/types/0_reaction.d.ts +15 -6
  26. package/esm/types/0_reaction.d.ts.map +1 -1
  27. package/esm/types/0_reaction.js +4 -4
  28. package/esm/types/0_refunded_payment.d.ts +6 -0
  29. package/esm/types/0_refunded_payment.d.ts.map +1 -1
  30. package/esm/types/0_switch_inline_query_chosen_chats.d.ts +13 -0
  31. package/esm/types/0_switch_inline_query_chosen_chats.d.ts.map +1 -0
  32. package/esm/types/0_switch_inline_query_chosen_chats.js +1 -0
  33. package/esm/types/1_giveaway.d.ts +3 -1
  34. package/esm/types/1_giveaway.d.ts.map +1 -1
  35. package/esm/types/1_giveaway.js +4 -2
  36. package/esm/types/2_chat.d.ts +1 -0
  37. package/esm/types/2_chat.d.ts.map +1 -1
  38. package/esm/types/2_forward_header.d.ts +40 -0
  39. package/esm/types/2_forward_header.d.ts.map +1 -0
  40. package/esm/types/2_forward_header.js +55 -0
  41. package/esm/types/2_inline_keyboard_button.d.ts +61 -14
  42. package/esm/types/2_inline_keyboard_button.d.ts.map +1 -1
  43. package/esm/types/4_message.d.ts +9 -14
  44. package/esm/types/4_message.d.ts.map +1 -1
  45. package/esm/types/4_message.js +5 -25
  46. package/esm/types/6_update.d.ts +29 -2
  47. package/esm/types/6_update.d.ts.map +1 -1
  48. package/package.json +1 -1
  49. package/script/3_types.d.ts +1 -0
  50. package/script/3_types.d.ts.map +1 -1
  51. package/script/3_types.js +1 -0
  52. package/script/4_constants.d.ts +1 -1
  53. package/script/4_constants.js +1 -1
  54. package/script/client/0_params.d.ts +17 -3
  55. package/script/client/0_params.d.ts.map +1 -1
  56. package/script/client/0_password.js +2 -2
  57. package/script/client/0_utilities.d.ts +1 -0
  58. package/script/client/0_utilities.d.ts.map +1 -1
  59. package/script/client/0_utilities.js +15 -1
  60. package/script/client/1_client_encrypted.d.ts.map +1 -1
  61. package/script/client/1_client_encrypted.js +3 -0
  62. package/script/client/2_update_manager.js +5 -5
  63. package/script/client/3_message_manager.js +8 -8
  64. package/script/client/5_client.d.ts +4 -0
  65. package/script/client/5_client.d.ts.map +1 -1
  66. package/script/client/5_client.js +55 -32
  67. package/script/tl/0_api.d.ts +173 -16
  68. package/script/tl/0_api.d.ts.map +1 -1
  69. package/script/tl/0_api.js +279 -34
  70. package/script/tl/1_utilities.d.ts +1 -1
  71. package/script/tl/1_utilities.d.ts.map +1 -1
  72. package/script/tl/1_utilities.js +13 -1
  73. package/script/types/0_reaction.d.ts +15 -6
  74. package/script/types/0_reaction.d.ts.map +1 -1
  75. package/script/types/0_reaction.js +4 -4
  76. package/script/types/0_refunded_payment.d.ts +6 -0
  77. package/script/types/0_refunded_payment.d.ts.map +1 -1
  78. package/script/types/0_switch_inline_query_chosen_chats.d.ts +13 -0
  79. package/script/types/0_switch_inline_query_chosen_chats.d.ts.map +1 -0
  80. package/script/types/0_switch_inline_query_chosen_chats.js +2 -0
  81. package/script/types/1_giveaway.d.ts +3 -1
  82. package/script/types/1_giveaway.d.ts.map +1 -1
  83. package/script/types/1_giveaway.js +4 -2
  84. package/script/types/2_chat.d.ts +1 -0
  85. package/script/types/2_chat.d.ts.map +1 -1
  86. package/script/types/2_forward_header.d.ts +40 -0
  87. package/script/types/2_forward_header.d.ts.map +1 -0
  88. package/script/types/2_forward_header.js +59 -0
  89. package/script/types/2_inline_keyboard_button.d.ts +61 -14
  90. package/script/types/2_inline_keyboard_button.d.ts.map +1 -1
  91. package/script/types/4_message.d.ts +9 -14
  92. package/script/types/4_message.d.ts.map +1 -1
  93. package/script/types/4_message.js +5 -25
  94. package/script/types/6_update.d.ts +29 -2
  95. package/script/types/6_update.d.ts.map +1 -1
package/esm/tl/0_api.js CHANGED
@@ -55,7 +55,12 @@ const map = new Map([
55
55
  [0x9299359F, "http_wait"],
56
56
  [0x3FEDD339, "true"],
57
57
  [0xC4B9F9BB, "error"],
58
- [0x56730BCC, "null"],
58
+ [0xD433AD73, "ipPort"],
59
+ [0x37982646, "ipPortSecret"],
60
+ [0x4679B65F, "accessPointRule"],
61
+ [0x5A592A6C, "help.configSimple"],
62
+ [0x27D69997, "inputPeerPhotoFileLocationLegacy"],
63
+ [0x0DBAEAE9, "inputStickerSetThumbLegacy"],
59
64
  [0x7F3B18EA, "inputPeerEmpty"],
60
65
  [0x7DA07EC9, "inputPeerSelf"],
61
66
  [0x35A95CB9, "inputPeerChat"],
@@ -88,7 +93,7 @@ const map = new Map([
88
93
  [0xE66FBF7B, "inputMediaDice"],
89
94
  [0x89FDD778, "inputMediaStory"],
90
95
  [0xC21B8849, "inputMediaWebPage"],
91
- [0xAA661FC3, "inputMediaPaidMedia"],
96
+ [0xC4103386, "inputMediaPaidMedia"],
92
97
  [0x1CA48F57, "inputChatPhotoEmpty"],
93
98
  [0xBDCDAEC0, "inputChatUploadedPhoto"],
94
99
  [0x8953AD37, "inputChatPhoto"],
@@ -160,8 +165,8 @@ const map = new Map([
160
165
  [0x4BD6E798, "messageMediaPoll"],
161
166
  [0x3F7EE58B, "messageMediaDice"],
162
167
  [0x68CB6283, "messageMediaStory"],
163
- [0xDAAD85B0, "messageMediaGiveaway"],
164
- [0xC6991068, "messageMediaGiveawayResults"],
168
+ [0xAA073BEB, "messageMediaGiveaway"],
169
+ [0xCEAA3EA1, "messageMediaGiveawayResults"],
165
170
  [0xA8852491, "messageMediaPaidMedia"],
166
171
  [0xB6AEF7B0, "messageActionEmpty"],
167
172
  [0xBD47CBAD, "messageActionChatCreate"],
@@ -202,12 +207,13 @@ const map = new Map([
202
207
  [0x31518E9B, "messageActionRequestedPeer"],
203
208
  [0x5060A3F4, "messageActionSetChatWallPaper"],
204
209
  [0x678C2E09, "messageActionGiftCode"],
205
- [0x332BA9ED, "messageActionGiveawayLaunch"],
206
- [0x2A9FADC5, "messageActionGiveawayResults"],
210
+ [0xA80F51E4, "messageActionGiveawayLaunch"],
211
+ [0x87E2F155, "messageActionGiveawayResults"],
207
212
  [0xCC02AA6D, "messageActionBoostApply"],
208
213
  [0x93B31848, "messageActionRequestedPeerSentMe"],
209
214
  [0x41B3E202, "messageActionPaymentRefunded"],
210
215
  [0x45D5B021, "messageActionGiftStars"],
216
+ [0xB00C47A2, "messageActionPrizeStars"],
211
217
  [0xD58A08C6, "dialog"],
212
218
  [0x71BD134C, "dialogFolder"],
213
219
  [0x2331B22D, "photoEmpty"],
@@ -421,6 +427,8 @@ const map = new Map([
421
427
  [0x0FB85198, "updateStarsBalance"],
422
428
  [0x1EA2FDA7, "updateBusinessBotCallbackQuery"],
423
429
  [0xA584B019, "updateStarsRevenueStatus"],
430
+ [0x283BD312, "updateBotPurchasedPaidMedia"],
431
+ [0x51CA7AEC, "updatePaidReactionPrivacy"],
424
432
  [0xA56C2A3E, "updates.state"],
425
433
  [0x5D75A138, "updates.differenceEmpty"],
426
434
  [0x00F49CA0, "updates.difference"],
@@ -882,6 +890,7 @@ const map = new Map([
882
890
  [0x3EA9FEB1, "channelAdminLogEventActionChangeEmojiStatus"],
883
891
  [0x46D840AB, "channelAdminLogEventActionChangeEmojiStickerSet"],
884
892
  [0x60A79C79, "channelAdminLogEventActionToggleSignatureProfiles"],
893
+ [0x64642DB3, "channelAdminLogEventActionParticipantSubExtend"],
885
894
  [0x1FAD68CD, "channelAdminLogEvent"],
886
895
  [0xED8AF74D, "channels.adminLogResults"],
887
896
  [0xEA107AE4, "channelAdminLogEventsFilter"],
@@ -1169,6 +1178,7 @@ const map = new Map([
1169
1178
  [0x160544CA, "inputStorePaymentPremiumGiveaway"],
1170
1179
  [0xDDDD0F56, "inputStorePaymentStarsTopup"],
1171
1180
  [0x1D741EF7, "inputStorePaymentStarsGift"],
1181
+ [0x751F08FA, "inputStorePaymentStarsGiveaway"],
1172
1182
  [0x74C34319, "premiumGiftOption"],
1173
1183
  [0x88F8F21B, "paymentFormMethod"],
1174
1184
  [0x2DE11AAE, "emojiStatusEmpty"],
@@ -1270,9 +1280,10 @@ const map = new Map([
1270
1280
  [0x257E962B, "premiumGiftCodeOption"],
1271
1281
  [0x284A1096, "payments.checkedGiftCode"],
1272
1282
  [0x4367DAA0, "payments.giveawayInfo"],
1273
- [0x00CD5570, "payments.giveawayInfoResults"],
1283
+ [0xE175E66F, "payments.giveawayInfoResults"],
1274
1284
  [0xB2539D54, "prepaidGiveaway"],
1275
- [0x2A1C8C71, "boost"],
1285
+ [0x9A9D77E0, "prepaidStarsGiveaway"],
1286
+ [0x4B3E14D6, "boost"],
1276
1287
  [0x86F8613C, "premium.boostsList"],
1277
1288
  [0xC448415C, "myBoost"],
1278
1289
  [0x9AE228E2, "premium.myBoosts"],
@@ -1362,7 +1373,7 @@ const map = new Map([
1362
1373
  [0xBAC3A61A, "reactionNotificationsFromContacts"],
1363
1374
  [0x4B9E22A0, "reactionNotificationsFromAll"],
1364
1375
  [0x56E34970, "reactionsNotifySettings"],
1365
- [0x8438F1C6, "broadcastRevenueBalances"],
1376
+ [0xC3FF71E7, "broadcastRevenueBalances"],
1366
1377
  [0x93C3E27E, "availableEffect"],
1367
1378
  [0xD1ED9A5B, "messages.availableEffectsNotModified"],
1368
1379
  [0xBDDB616E, "messages.availableEffects"],
@@ -1375,7 +1386,7 @@ const map = new Map([
1375
1386
  [0xD80DA15D, "starsTransactionPeer"],
1376
1387
  [0x60682812, "starsTransactionPeerAds"],
1377
1388
  [0x0BD915C0, "starsTopupOption"],
1378
- [0x433AEB2B, "starsTransaction"],
1389
+ [0xEE7522D5, "starsTransaction"],
1379
1390
  [0xBBFA316C, "payments.starsStatus"],
1380
1391
  [0xE87ACBC0, "foundStory"],
1381
1392
  [0xE2DE7737, "stories.foundStories"],
@@ -1392,6 +1403,8 @@ const map = new Map([
1392
1403
  [0x05416D58, "starsSubscriptionPricing"],
1393
1404
  [0x538ECF18, "starsSubscription"],
1394
1405
  [0x4BA3A95A, "messageReactor"],
1406
+ [0x94CE852A, "starsGiveawayOption"],
1407
+ [0x54236209, "starsGiveawayWinnersOption"],
1395
1408
  ]);
1396
1409
  export const getTypeName = map.get.bind(map);
1397
1410
  export const flags = Symbol();
@@ -1422,7 +1435,10 @@ const enums = new Map([
1422
1435
  ["HttpWait", ["http_wait"]],
1423
1436
  ["True", ["true"]],
1424
1437
  ["Error", ["error"]],
1425
- ["Null", ["null"]],
1438
+ ["IpPort", ["ipPort", "ipPortSecret"]],
1439
+ ["AccessPointRule", ["accessPointRule"]],
1440
+ ["help.ConfigSimple", ["help.configSimple"]],
1441
+ ["InputFileLocation", ["inputPeerPhotoFileLocationLegacy", "inputStickerSetThumbLegacy", "inputFileLocation", "inputEncryptedFileLocation", "inputDocumentFileLocation", "inputSecureFileLocation", "inputTakeoutFileLocation", "inputPhotoFileLocation", "inputPhotoLegacyFileLocation", "inputPeerPhotoFileLocation", "inputStickerSetThumb", "inputGroupCallStream"]],
1426
1442
  ["InputPeer", ["inputPeerEmpty", "inputPeerSelf", "inputPeerChat", "inputPeerUser", "inputPeerChannel", "inputPeerUserFromMessage", "inputPeerChannelFromMessage"]],
1427
1443
  ["InputUser", ["inputUserEmpty", "inputUserSelf", "inputUser", "inputUserFromMessage"]],
1428
1444
  ["InputContact", ["inputPhoneContact"]],
@@ -1431,7 +1447,6 @@ const enums = new Map([
1431
1447
  ["InputChatPhoto", ["inputChatPhotoEmpty", "inputChatUploadedPhoto", "inputChatPhoto"]],
1432
1448
  ["InputGeoPoint", ["inputGeoPointEmpty", "inputGeoPoint"]],
1433
1449
  ["InputPhoto", ["inputPhotoEmpty", "inputPhoto"]],
1434
- ["InputFileLocation", ["inputFileLocation", "inputEncryptedFileLocation", "inputDocumentFileLocation", "inputSecureFileLocation", "inputTakeoutFileLocation", "inputPhotoFileLocation", "inputPhotoLegacyFileLocation", "inputPeerPhotoFileLocation", "inputStickerSetThumb", "inputGroupCallStream"]],
1435
1450
  ["Peer", ["peerUser", "peerChat", "peerChannel"]],
1436
1451
  ["storage.FileType", ["storage.fileUnknown", "storage.filePartial", "storage.fileJpeg", "storage.fileGif", "storage.filePng", "storage.filePdf", "storage.fileMp3", "storage.fileMov", "storage.fileMp4", "storage.fileWebp"]],
1437
1452
  ["User", ["userEmpty", "user"]],
@@ -1444,7 +1459,7 @@ const enums = new Map([
1444
1459
  ["ChatPhoto", ["chatPhotoEmpty", "chatPhoto"]],
1445
1460
  ["Message", ["messageEmpty", "message", "messageService"]],
1446
1461
  ["MessageMedia", ["messageMediaEmpty", "messageMediaPhoto", "messageMediaGeo", "messageMediaContact", "messageMediaUnsupported", "messageMediaDocument", "messageMediaWebPage", "messageMediaVenue", "messageMediaGame", "messageMediaInvoice", "messageMediaGeoLive", "messageMediaPoll", "messageMediaDice", "messageMediaStory", "messageMediaGiveaway", "messageMediaGiveawayResults", "messageMediaPaidMedia"]],
1447
- ["MessageAction", ["messageActionEmpty", "messageActionChatCreate", "messageActionChatEditTitle", "messageActionChatEditPhoto", "messageActionChatDeletePhoto", "messageActionChatAddUser", "messageActionChatDeleteUser", "messageActionChatJoinedByLink", "messageActionChannelCreate", "messageActionChatMigrateTo", "messageActionChannelMigrateFrom", "messageActionPinMessage", "messageActionHistoryClear", "messageActionGameScore", "messageActionPaymentSentMe", "messageActionPaymentSent", "messageActionPhoneCall", "messageActionScreenshotTaken", "messageActionCustomAction", "messageActionBotAllowed", "messageActionSecureValuesSentMe", "messageActionSecureValuesSent", "messageActionContactSignUp", "messageActionGeoProximityReached", "messageActionGroupCall", "messageActionInviteToGroupCall", "messageActionSetMessagesTTL", "messageActionGroupCallScheduled", "messageActionSetChatTheme", "messageActionChatJoinedByRequest", "messageActionWebViewDataSentMe", "messageActionWebViewDataSent", "messageActionGiftPremium", "messageActionTopicCreate", "messageActionTopicEdit", "messageActionSuggestProfilePhoto", "messageActionRequestedPeer", "messageActionSetChatWallPaper", "messageActionGiftCode", "messageActionGiveawayLaunch", "messageActionGiveawayResults", "messageActionBoostApply", "messageActionRequestedPeerSentMe", "messageActionPaymentRefunded", "messageActionGiftStars"]],
1462
+ ["MessageAction", ["messageActionEmpty", "messageActionChatCreate", "messageActionChatEditTitle", "messageActionChatEditPhoto", "messageActionChatDeletePhoto", "messageActionChatAddUser", "messageActionChatDeleteUser", "messageActionChatJoinedByLink", "messageActionChannelCreate", "messageActionChatMigrateTo", "messageActionChannelMigrateFrom", "messageActionPinMessage", "messageActionHistoryClear", "messageActionGameScore", "messageActionPaymentSentMe", "messageActionPaymentSent", "messageActionPhoneCall", "messageActionScreenshotTaken", "messageActionCustomAction", "messageActionBotAllowed", "messageActionSecureValuesSentMe", "messageActionSecureValuesSent", "messageActionContactSignUp", "messageActionGeoProximityReached", "messageActionGroupCall", "messageActionInviteToGroupCall", "messageActionSetMessagesTTL", "messageActionGroupCallScheduled", "messageActionSetChatTheme", "messageActionChatJoinedByRequest", "messageActionWebViewDataSentMe", "messageActionWebViewDataSent", "messageActionGiftPremium", "messageActionTopicCreate", "messageActionTopicEdit", "messageActionSuggestProfilePhoto", "messageActionRequestedPeer", "messageActionSetChatWallPaper", "messageActionGiftCode", "messageActionGiveawayLaunch", "messageActionGiveawayResults", "messageActionBoostApply", "messageActionRequestedPeerSentMe", "messageActionPaymentRefunded", "messageActionGiftStars", "messageActionPrizeStars"]],
1448
1463
  ["Dialog", ["dialog", "dialogFolder"]],
1449
1464
  ["Photo", ["photoEmpty", "photo"]],
1450
1465
  ["PhotoSize", ["photoSizeEmpty", "photoSize", "photoCachedSize", "photoStrippedSize", "photoSizeProgressive", "photoPathSize"]],
@@ -1611,6 +1626,8 @@ const enums = new Map([
1611
1626
  "updateStarsBalance",
1612
1627
  "updateBusinessBotCallbackQuery",
1613
1628
  "updateStarsRevenueStatus",
1629
+ "updateBotPurchasedPaidMedia",
1630
+ "updatePaidReactionPrivacy",
1614
1631
  ]],
1615
1632
  ["updates.State", ["updates.state"]],
1616
1633
  ["updates.Difference", ["updates.differenceEmpty", "updates.difference", "updates.differenceSlice", "updates.differenceTooLong"]],
@@ -1791,6 +1808,7 @@ const enums = new Map([
1791
1808
  "channelAdminLogEventActionChangeEmojiStatus",
1792
1809
  "channelAdminLogEventActionChangeEmojiStickerSet",
1793
1810
  "channelAdminLogEventActionToggleSignatureProfiles",
1811
+ "channelAdminLogEventActionParticipantSubExtend",
1794
1812
  ]],
1795
1813
  ["ChannelAdminLogEvent", ["channelAdminLogEvent"]],
1796
1814
  ["channels.AdminLogResults", ["channels.adminLogResults"]],
@@ -1963,7 +1981,7 @@ const enums = new Map([
1963
1981
  ["payments.ExportedInvoice", ["payments.exportedInvoice"]],
1964
1982
  ["messages.TranscribedAudio", ["messages.transcribedAudio"]],
1965
1983
  ["help.PremiumPromo", ["help.premiumPromo"]],
1966
- ["InputStorePaymentPurpose", ["inputStorePaymentPremiumSubscription", "inputStorePaymentGiftPremium", "inputStorePaymentPremiumGiftCode", "inputStorePaymentPremiumGiveaway", "inputStorePaymentStarsTopup", "inputStorePaymentStarsGift"]],
1984
+ ["InputStorePaymentPurpose", ["inputStorePaymentPremiumSubscription", "inputStorePaymentGiftPremium", "inputStorePaymentPremiumGiftCode", "inputStorePaymentPremiumGiveaway", "inputStorePaymentStarsTopup", "inputStorePaymentStarsGift", "inputStorePaymentStarsGiveaway"]],
1967
1985
  ["PremiumGiftOption", ["premiumGiftOption"]],
1968
1986
  ["PaymentFormMethod", ["paymentFormMethod"]],
1969
1987
  ["EmojiStatus", ["emojiStatusEmpty", "emojiStatus", "emojiStatusUntil"]],
@@ -2024,7 +2042,7 @@ const enums = new Map([
2024
2042
  ["PremiumGiftCodeOption", ["premiumGiftCodeOption"]],
2025
2043
  ["payments.CheckedGiftCode", ["payments.checkedGiftCode"]],
2026
2044
  ["payments.GiveawayInfo", ["payments.giveawayInfo", "payments.giveawayInfoResults"]],
2027
- ["PrepaidGiveaway", ["prepaidGiveaway"]],
2045
+ ["PrepaidGiveaway", ["prepaidGiveaway", "prepaidStarsGiveaway"]],
2028
2046
  ["Boost", ["boost"]],
2029
2047
  ["premium.BoostsList", ["premium.boostsList"]],
2030
2048
  ["MyBoost", ["myBoost"]],
@@ -2116,6 +2134,8 @@ const enums = new Map([
2116
2134
  ["StarsSubscriptionPricing", ["starsSubscriptionPricing"]],
2117
2135
  ["StarsSubscription", ["starsSubscription"]],
2118
2136
  ["MessageReactor", ["messageReactor"]],
2137
+ ["StarsGiveawayOption", ["starsGiveawayOption"]],
2138
+ ["StarsGiveawayWinnersOption", ["starsGiveawayWinnersOption"]],
2119
2139
  ]);
2120
2140
  const types = new Map([
2121
2141
  [
@@ -2492,10 +2512,70 @@ const types = new Map([
2492
2512
  ],
2493
2513
  ],
2494
2514
  [
2495
- "null",
2515
+ "ipPort",
2496
2516
  [
2497
- 0x56730BCC,
2498
- [],
2517
+ 0xD433AD73,
2518
+ [
2519
+ ["ipv4", "number", "int"],
2520
+ ["port", "number", "int"],
2521
+ ],
2522
+ ],
2523
+ ],
2524
+ [
2525
+ "ipPortSecret",
2526
+ [
2527
+ 0x37982646,
2528
+ [
2529
+ ["ipv4", "number", "int"],
2530
+ ["port", "number", "int"],
2531
+ ["secret", Uint8Array, "bytes"],
2532
+ ],
2533
+ ],
2534
+ ],
2535
+ [
2536
+ "accessPointRule",
2537
+ [
2538
+ 0x4679B65F,
2539
+ [
2540
+ ["phone_prefix_rules", "string", "string"],
2541
+ ["dc_id", "number", "int"],
2542
+ ["ips", ["IpPort"], "vector<IpPort>"],
2543
+ ],
2544
+ ],
2545
+ ],
2546
+ [
2547
+ "help.configSimple",
2548
+ [
2549
+ 0x5A592A6C,
2550
+ [
2551
+ ["date", "number", "int"],
2552
+ ["expires", "number", "int"],
2553
+ ["rules", ["AccessPointRule"], "vector<AccessPointRule>"],
2554
+ ],
2555
+ ],
2556
+ ],
2557
+ [
2558
+ "inputPeerPhotoFileLocationLegacy",
2559
+ [
2560
+ 0x27D69997,
2561
+ [
2562
+ ["flags", flags, "#"],
2563
+ ["big", "true", "flags.0?true"],
2564
+ ["peer", "InputPeer", "InputPeer"],
2565
+ ["volume_id", "bigint", "long"],
2566
+ ["local_id", "number", "int"],
2567
+ ],
2568
+ ],
2569
+ ],
2570
+ [
2571
+ "inputStickerSetThumbLegacy",
2572
+ [
2573
+ 0x0DBAEAE9,
2574
+ [
2575
+ ["stickerset", "InputStickerSet", "InputStickerSet"],
2576
+ ["volume_id", "bigint", "long"],
2577
+ ["local_id", "number", "int"],
2578
+ ],
2499
2579
  ],
2500
2580
  ],
2501
2581
  [
@@ -2853,10 +2933,12 @@ const types = new Map([
2853
2933
  [
2854
2934
  "inputMediaPaidMedia",
2855
2935
  [
2856
- 0xAA661FC3,
2936
+ 0xC4103386,
2857
2937
  [
2938
+ ["flags", flags, "#"],
2858
2939
  ["stars_amount", "bigint", "long"],
2859
2940
  ["extended_media", ["InputMedia"], "Vector<InputMedia>"],
2941
+ ["payload", "string", "flags.0?string"],
2860
2942
  ],
2861
2943
  ],
2862
2944
  ],
@@ -3807,7 +3889,7 @@ const types = new Map([
3807
3889
  [
3808
3890
  "messageMediaGiveaway",
3809
3891
  [
3810
- 0xDAAD85B0,
3892
+ 0xAA073BEB,
3811
3893
  [
3812
3894
  ["flags", flags, "#"],
3813
3895
  ["only_new_subscribers", "true", "flags.0?true"],
@@ -3816,7 +3898,8 @@ const types = new Map([
3816
3898
  ["countries_iso2", ["string"], "flags.1?Vector<string>"],
3817
3899
  ["prize_description", "string", "flags.3?string"],
3818
3900
  ["quantity", "number", "int"],
3819
- ["months", "number", "int"],
3901
+ ["months", "number", "flags.4?int"],
3902
+ ["stars", "bigint", "flags.5?long"],
3820
3903
  ["until_date", "number", "int"],
3821
3904
  ],
3822
3905
  ],
@@ -3824,7 +3907,7 @@ const types = new Map([
3824
3907
  [
3825
3908
  "messageMediaGiveawayResults",
3826
3909
  [
3827
- 0xC6991068,
3910
+ 0xCEAA3EA1,
3828
3911
  [
3829
3912
  ["flags", flags, "#"],
3830
3913
  ["only_new_subscribers", "true", "flags.0?true"],
@@ -3835,7 +3918,8 @@ const types = new Map([
3835
3918
  ["winners_count", "number", "int"],
3836
3919
  ["unclaimed_count", "number", "int"],
3837
3920
  ["winners", ["bigint"], "Vector<long>"],
3838
- ["months", "number", "int"],
3921
+ ["months", "number", "flags.4?int"],
3922
+ ["stars", "bigint", "flags.5?long"],
3839
3923
  ["prize_description", "string", "flags.1?string"],
3840
3924
  ["until_date", "number", "int"],
3841
3925
  ],
@@ -4250,15 +4334,20 @@ const types = new Map([
4250
4334
  [
4251
4335
  "messageActionGiveawayLaunch",
4252
4336
  [
4253
- 0x332BA9ED,
4254
- [],
4337
+ 0xA80F51E4,
4338
+ [
4339
+ ["flags", flags, "#"],
4340
+ ["stars", "bigint", "flags.0?long"],
4341
+ ],
4255
4342
  ],
4256
4343
  ],
4257
4344
  [
4258
4345
  "messageActionGiveawayResults",
4259
4346
  [
4260
- 0x2A9FADC5,
4347
+ 0x87E2F155,
4261
4348
  [
4349
+ ["flags", flags, "#"],
4350
+ ["stars", "true", "flags.0?true"],
4262
4351
  ["winners_count", "number", "int"],
4263
4352
  ["unclaimed_count", "number", "int"],
4264
4353
  ],
@@ -4312,6 +4401,20 @@ const types = new Map([
4312
4401
  ],
4313
4402
  ],
4314
4403
  ],
4404
+ [
4405
+ "messageActionPrizeStars",
4406
+ [
4407
+ 0xB00C47A2,
4408
+ [
4409
+ ["flags", flags, "#"],
4410
+ ["unclaimed", "true", "flags.0?true"],
4411
+ ["stars", "bigint", "long"],
4412
+ ["transaction_id", "string", "string"],
4413
+ ["boost_peer", "Peer", "Peer"],
4414
+ ["giveaway_msg_id", "number", "int"],
4415
+ ],
4416
+ ],
4417
+ ],
4315
4418
  [
4316
4419
  "dialog",
4317
4420
  [
@@ -6604,6 +6707,26 @@ const types = new Map([
6604
6707
  ],
6605
6708
  ],
6606
6709
  ],
6710
+ [
6711
+ "updateBotPurchasedPaidMedia",
6712
+ [
6713
+ 0x283BD312,
6714
+ [
6715
+ ["user_id", "bigint", "long"],
6716
+ ["payload", "string", "string"],
6717
+ ["qts", "number", "int"],
6718
+ ],
6719
+ ],
6720
+ ],
6721
+ [
6722
+ "updatePaidReactionPrivacy",
6723
+ [
6724
+ 0x51CA7AEC,
6725
+ [
6726
+ ["private", "boolean", "Bool"],
6727
+ ],
6728
+ ],
6729
+ ],
6607
6730
  [
6608
6731
  "updates.state",
6609
6732
  [
@@ -11535,6 +11658,16 @@ const types = new Map([
11535
11658
  ],
11536
11659
  ],
11537
11660
  ],
11661
+ [
11662
+ "channelAdminLogEventActionParticipantSubExtend",
11663
+ [
11664
+ 0x64642DB3,
11665
+ [
11666
+ ["prev_participant", "ChannelParticipant", "ChannelParticipant"],
11667
+ ["new_participant", "ChannelParticipant", "ChannelParticipant"],
11668
+ ],
11669
+ ],
11670
+ ],
11538
11671
  [
11539
11672
  "channelAdminLogEvent",
11540
11673
  [
@@ -11582,6 +11715,7 @@ const types = new Map([
11582
11715
  ["invites", "true", "flags.15?true"],
11583
11716
  ["send", "true", "flags.16?true"],
11584
11717
  ["forums", "true", "flags.17?true"],
11718
+ ["sub_extend", "true", "flags.18?true"],
11585
11719
  ],
11586
11720
  ],
11587
11721
  ],
@@ -14663,6 +14797,27 @@ const types = new Map([
14663
14797
  ],
14664
14798
  ],
14665
14799
  ],
14800
+ [
14801
+ "inputStorePaymentStarsGiveaway",
14802
+ [
14803
+ 0x751F08FA,
14804
+ [
14805
+ ["flags", flags, "#"],
14806
+ ["only_new_subscribers", "true", "flags.0?true"],
14807
+ ["winners_are_visible", "true", "flags.3?true"],
14808
+ ["stars", "bigint", "long"],
14809
+ ["boost_peer", "InputPeer", "InputPeer"],
14810
+ ["additional_peers", ["InputPeer"], "flags.1?Vector<InputPeer>"],
14811
+ ["countries_iso2", ["string"], "flags.2?Vector<string>"],
14812
+ ["prize_description", "string", "flags.4?string"],
14813
+ ["random_id", "bigint", "long"],
14814
+ ["until_date", "number", "int"],
14815
+ ["currency", "string", "string"],
14816
+ ["amount", "bigint", "long"],
14817
+ ["users", "number", "int"],
14818
+ ],
14819
+ ],
14820
+ ],
14666
14821
  [
14667
14822
  "premiumGiftOption",
14668
14823
  [
@@ -15810,16 +15965,17 @@ const types = new Map([
15810
15965
  [
15811
15966
  "payments.giveawayInfoResults",
15812
15967
  [
15813
- 0x00CD5570,
15968
+ 0xE175E66F,
15814
15969
  [
15815
15970
  ["flags", flags, "#"],
15816
15971
  ["winner", "true", "flags.0?true"],
15817
15972
  ["refunded", "true", "flags.1?true"],
15818
15973
  ["start_date", "number", "int"],
15819
- ["gift_code_slug", "string", "flags.0?string"],
15974
+ ["gift_code_slug", "string", "flags.3?string"],
15975
+ ["stars_prize", "bigint", "flags.4?long"],
15820
15976
  ["finish_date", "number", "int"],
15821
15977
  ["winners_count", "number", "int"],
15822
- ["activated_count", "number", "int"],
15978
+ ["activated_count", "number", "flags.2?int"],
15823
15979
  ],
15824
15980
  ],
15825
15981
  ],
@@ -15835,10 +15991,23 @@ const types = new Map([
15835
15991
  ],
15836
15992
  ],
15837
15993
  ],
15994
+ [
15995
+ "prepaidStarsGiveaway",
15996
+ [
15997
+ 0x9A9D77E0,
15998
+ [
15999
+ ["id", "bigint", "long"],
16000
+ ["stars", "bigint", "long"],
16001
+ ["quantity", "number", "int"],
16002
+ ["boosts", "number", "int"],
16003
+ ["date", "number", "int"],
16004
+ ],
16005
+ ],
16006
+ ],
15838
16007
  [
15839
16008
  "boost",
15840
16009
  [
15841
- 0x2A1C8C71,
16010
+ 0x4B3E14D6,
15842
16011
  [
15843
16012
  ["flags", flags, "#"],
15844
16013
  ["gift", "true", "flags.1?true"],
@@ -15851,6 +16020,7 @@ const types = new Map([
15851
16020
  ["expires", "number", "int"],
15852
16021
  ["used_gift_slug", "string", "flags.4?string"],
15853
16022
  ["multiplier", "number", "flags.5?int"],
16023
+ ["stars", "bigint", "flags.6?long"],
15854
16024
  ],
15855
16025
  ],
15856
16026
  ],
@@ -16855,8 +17025,10 @@ const types = new Map([
16855
17025
  [
16856
17026
  "broadcastRevenueBalances",
16857
17027
  [
16858
- 0x8438F1C6,
17028
+ 0xC3FF71E7,
16859
17029
  [
17030
+ ["flags", flags, "#"],
17031
+ ["withdrawal_enabled", "true", "flags.0?true"],
16860
17032
  ["current_balance", "bigint", "long"],
16861
17033
  ["available_balance", "bigint", "long"],
16862
17034
  ["overall_revenue", "bigint", "long"],
@@ -16977,7 +17149,7 @@ const types = new Map([
16977
17149
  [
16978
17150
  "starsTransaction",
16979
17151
  [
16980
- 0x433AEB2B,
17152
+ 0xEE7522D5,
16981
17153
  [
16982
17154
  ["flags", flags, "#"],
16983
17155
  ["refund", "true", "flags.3?true"],
@@ -16998,6 +17170,7 @@ const types = new Map([
16998
17170
  ["msg_id", "number", "flags.8?int"],
16999
17171
  ["extended_media", ["MessageMedia"], "flags.9?Vector<MessageMedia>"],
17000
17172
  ["subscription_period", "number", "flags.12?int"],
17173
+ ["giveaway_post_id", "number", "flags.13?int"],
17001
17174
  ],
17002
17175
  ],
17003
17176
  ],
@@ -17195,6 +17368,35 @@ const types = new Map([
17195
17368
  ],
17196
17369
  ],
17197
17370
  ],
17371
+ [
17372
+ "starsGiveawayOption",
17373
+ [
17374
+ 0x94CE852A,
17375
+ [
17376
+ ["flags", flags, "#"],
17377
+ ["extended", "true", "flags.0?true"],
17378
+ ["default", "true", "flags.1?true"],
17379
+ ["stars", "bigint", "long"],
17380
+ ["yearly_boosts", "number", "int"],
17381
+ ["store_product", "string", "flags.2?string"],
17382
+ ["currency", "string", "string"],
17383
+ ["amount", "bigint", "long"],
17384
+ ["winners", ["StarsGiveawayWinnersOption"], "Vector<StarsGiveawayWinnersOption>"],
17385
+ ],
17386
+ ],
17387
+ ],
17388
+ [
17389
+ "starsGiveawayWinnersOption",
17390
+ [
17391
+ 0x54236209,
17392
+ [
17393
+ ["flags", flags, "#"],
17394
+ ["default", "true", "flags.0?true"],
17395
+ ["users", "number", "int"],
17396
+ ["per_user_stars", "bigint", "long"],
17397
+ ],
17398
+ ],
17399
+ ],
17198
17400
  [
17199
17401
  "req_pq_multi",
17200
17402
  [
@@ -17282,6 +17484,35 @@ const types = new Map([
17282
17484
  [],
17283
17485
  ],
17284
17486
  ],
17487
+ [
17488
+ "invokeWithBusinessConnectionPrefix",
17489
+ [
17490
+ 0xDD289F8E,
17491
+ [
17492
+ ["connection_id", "string", "string"],
17493
+ ],
17494
+ ],
17495
+ ],
17496
+ [
17497
+ "invokeWithGooglePlayIntegrityPrefix",
17498
+ [
17499
+ 0x1DF92984,
17500
+ [
17501
+ ["nonce", "string", "string"],
17502
+ ["token", "string", "string"],
17503
+ ],
17504
+ ],
17505
+ ],
17506
+ [
17507
+ "invokeWithApnsSecretPrefix",
17508
+ [
17509
+ 0x0DAE54F8,
17510
+ [
17511
+ ["nonce", "string", "string"],
17512
+ ["secret", "string", "string"],
17513
+ ],
17514
+ ],
17515
+ ],
17285
17516
  [
17286
17517
  "invokeAfterMsg",
17287
17518
  [
@@ -21450,14 +21681,14 @@ const types = new Map([
21450
21681
  [
21451
21682
  "messages.sendPaidReaction",
21452
21683
  [
21453
- 0x25C8FE3E,
21684
+ 0x9DD6A67B,
21454
21685
  [
21455
21686
  ["flags", flags, "#"],
21456
- ["private", "true", "flags.0?true"],
21457
21687
  ["peer", "InputPeer", "InputPeer"],
21458
21688
  ["msg_id", "number", "int"],
21459
21689
  ["count", "number", "int"],
21460
21690
  ["random_id", "bigint", "long"],
21691
+ ["private", "boolean", "flags.0?Bool"],
21461
21692
  ],
21462
21693
  ],
21463
21694
  ],
@@ -21472,6 +21703,13 @@ const types = new Map([
21472
21703
  ],
21473
21704
  ],
21474
21705
  ],
21706
+ [
21707
+ "messages.getPaidReactionPrivacy",
21708
+ [
21709
+ 0x472455AA,
21710
+ [],
21711
+ ],
21712
+ ],
21475
21713
  [
21476
21714
  "updates.getState",
21477
21715
  [
@@ -23102,6 +23340,13 @@ const types = new Map([
23102
23340
  ],
23103
23341
  ],
23104
23342
  ],
23343
+ [
23344
+ "payments.getStarsGiveawayOptions",
23345
+ [
23346
+ 0xBD1EFD3E,
23347
+ [],
23348
+ ],
23349
+ ],
23105
23350
  [
23106
23351
  "stickers.createStickerSet",
23107
23352
  [
@@ -25,7 +25,7 @@ export declare function analyzeOptionalParam(ntype: string): {
25
25
  };
26
26
  export declare function isValidType(object: any): object is AnyType;
27
27
  export declare function assertIsValidType(object: any): void;
28
- export declare function is<S extends keyof (Types & Functions)>(typeName: S, value: unknown): value is S extends keyof Types ? Types[S] : S extends keyof Functions ? Functions[S] : never;
28
+ export declare function is<S extends keyof (Types & Functions)>(typeName: S, value: unknown, deep?: boolean): value is S extends keyof Types ? Types[S] : S extends keyof Functions ? Functions[S] : never;
29
29
  export declare function isOneOf<S extends keyof (Types & Functions)>(typeNames: S[] | readonly S[], value: unknown): value is S extends keyof Types ? Types[S] : S extends keyof Functions ? Functions[S] : never;
30
30
  export declare function isOfEnum<S extends keyof Enums>(enumName: S, value: unknown): value is Enums[S];
31
31
  export declare function as<S extends keyof Types>(typ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AAS,MAAM,SAAS,GAAG,SAAS,CAAC,CAAC,CAAC,GAAG,KAAK,CAExM;AACD,wBAAgB,QAAQ,CAAC,CAAC,SAAS,MAAM,KAAK,EAAE,QAAQ,EAAE,CAAC,EAAE,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,KAAK,CAAC,CAAC,CAAC,CAE9F;AACD,wBAAgB,EAAE,CAAC,CAAC,SAAS,MAAM,KAAK,EAAE,QAAQ,EAAE,CAAC,EAAE,KAAK,EAAE,OAAO,GAAG,KAAK,CAAC,CAAC,CAAC,CAM/E"}
@@ -41,7 +41,19 @@ export function assertIsValidType(object) {
41
41
  throw new Error("Invalid object");
42
42
  }
43
43
  }
44
- export function is(typeName, value) {
44
+ const GENERIC_FUNCTIONS = [
45
+ "invokeAfterMsg",
46
+ "invokeAfterMsgs",
47
+ "initConnection",
48
+ "invokeWithLayer",
49
+ "invokeWithoutUpdates",
50
+ "invokeWithMessagesRange",
51
+ "invokeWithTakeout",
52
+ ];
53
+ export function is(typeName, value, deep = false) {
54
+ if (deep && isOneOf(GENERIC_FUNCTIONS, value)) {
55
+ value = value.query;
56
+ }
45
57
  if (!isValidType(value)) {
46
58
  return false;
47
59
  }