@mtkruto/node 0.2.30 → 0.2.32

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 (55) 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/1_client_encrypted.d.ts +1 -1
  7. package/esm/client/1_client_encrypted.d.ts.map +1 -1
  8. package/esm/client/1_client_plain.d.ts +1 -1
  9. package/esm/client/1_client_plain.d.ts.map +1 -1
  10. package/esm/client/3_message_manager.d.ts.map +1 -1
  11. package/esm/client/3_message_manager.js +6 -0
  12. package/esm/client/4_story_manager.d.ts.map +1 -1
  13. package/esm/client/4_story_manager.js +3 -0
  14. package/esm/client/5_client.d.ts +3 -3
  15. package/esm/client/5_client.d.ts.map +1 -1
  16. package/esm/tl/0_api.d.ts +179 -22
  17. package/esm/tl/0_api.d.ts.map +1 -1
  18. package/esm/tl/0_api.js +249 -16
  19. package/esm/types/0_refunded_payment.d.ts +29 -0
  20. package/esm/types/0_refunded_payment.d.ts.map +1 -0
  21. package/esm/types/0_refunded_payment.js +29 -0
  22. package/esm/types/2_chat.d.ts +1 -0
  23. package/esm/types/2_chat.d.ts.map +1 -1
  24. package/esm/types/2_chat.js +1 -0
  25. package/esm/types/4_message.d.ts +11 -1
  26. package/esm/types/4_message.d.ts.map +1 -1
  27. package/esm/types/4_message.js +6 -0
  28. package/package.json +1 -1
  29. package/script/3_types.d.ts +1 -0
  30. package/script/3_types.d.ts.map +1 -1
  31. package/script/3_types.js +1 -0
  32. package/script/4_constants.d.ts +1 -1
  33. package/script/4_constants.js +1 -1
  34. package/script/client/1_client_encrypted.d.ts +1 -1
  35. package/script/client/1_client_encrypted.d.ts.map +1 -1
  36. package/script/client/1_client_plain.d.ts +1 -1
  37. package/script/client/1_client_plain.d.ts.map +1 -1
  38. package/script/client/3_message_manager.d.ts.map +1 -1
  39. package/script/client/3_message_manager.js +6 -0
  40. package/script/client/4_story_manager.d.ts.map +1 -1
  41. package/script/client/4_story_manager.js +3 -0
  42. package/script/client/5_client.d.ts +3 -3
  43. package/script/client/5_client.d.ts.map +1 -1
  44. package/script/tl/0_api.d.ts +179 -22
  45. package/script/tl/0_api.d.ts.map +1 -1
  46. package/script/tl/0_api.js +249 -16
  47. package/script/types/0_refunded_payment.d.ts +29 -0
  48. package/script/types/0_refunded_payment.d.ts.map +1 -0
  49. package/script/types/0_refunded_payment.js +33 -0
  50. package/script/types/2_chat.d.ts +1 -0
  51. package/script/types/2_chat.d.ts.map +1 -1
  52. package/script/types/2_chat.js +1 -0
  53. package/script/types/4_message.d.ts +11 -1
  54. package/script/types/4_message.d.ts.map +1 -1
  55. package/script/types/4_message.js +6 -0
package/esm/tl/0_api.js CHANGED
@@ -75,6 +75,7 @@ const map = new Map([
75
75
  [0xF392B7F4, "inputPhoneContact"],
76
76
  [0xF52FF27F, "inputFile"],
77
77
  [0xFA4F0BB5, "inputFileBig"],
78
+ [0x62DC8B48, "inputFileStoryDocument"],
78
79
  [0x9664F57F, "inputMediaEmpty"],
79
80
  [0x1E287D04, "inputMediaUploadedPhoto"],
80
81
  [0xB3BA0635, "inputMediaPhoto"],
@@ -124,7 +125,7 @@ const map = new Map([
124
125
  [0xB3CEA0E4, "storage.fileMp4"],
125
126
  [0x1081464C, "storage.fileWebp"],
126
127
  [0xD3BC4B7A, "userEmpty"],
127
- [0x215C4438, "user"],
128
+ [0x83314FCA, "user"],
128
129
  [0x4F11BAE1, "userProfilePhotoEmpty"],
129
130
  [0x82D1F706, "userProfilePhoto"],
130
131
  [0x09D05049, "userStatusEmpty"],
@@ -210,6 +211,8 @@ const map = new Map([
210
211
  [0x2A9FADC5, "messageActionGiveawayResults"],
211
212
  [0xCC02AA6D, "messageActionBoostApply"],
212
213
  [0x93B31848, "messageActionRequestedPeerSentMe"],
214
+ [0x41B3E202, "messageActionPaymentRefunded"],
215
+ [0x45D5B021, "messageActionGiftStars"],
213
216
  [0xD58A08C6, "dialog"],
214
217
  [0x71BD134C, "dialogFolder"],
215
218
  [0x2331B22D, "photoEmpty"],
@@ -540,7 +543,7 @@ const map = new Map([
540
543
  [0x6C37C15C, "documentAttributeImageSize"],
541
544
  [0x11B58939, "documentAttributeAnimated"],
542
545
  [0x6319D612, "documentAttributeSticker"],
543
- [0xD38FF1C2, "documentAttributeVideo"],
546
+ [0x17399FAD, "documentAttributeVideo"],
544
547
  [0x9852F9C6, "documentAttributeAudio"],
545
548
  [0x15590068, "documentAttributeFilename"],
546
549
  [0x9801D2F7, "documentAttributeHasStickers"],
@@ -711,6 +714,7 @@ const map = new Map([
711
714
  [0x1E76A78C, "topPeerCategoryPhoneCalls"],
712
715
  [0xA8406CA9, "topPeerCategoryForwardUsers"],
713
716
  [0xFBEEC0F0, "topPeerCategoryForwardChats"],
717
+ [0xFD9E7BEC, "topPeerCategoryBotsApp"],
714
718
  [0xFB834291, "topPeerCategoryPeers"],
715
719
  [0xDE266EF5, "contacts.topPeersNotModified"],
716
720
  [0x70B772A8, "contacts.topPeers"],
@@ -1158,7 +1162,7 @@ const map = new Map([
1158
1162
  [0xC5B56859, "inputInvoiceMessage"],
1159
1163
  [0xC326CAEF, "inputInvoiceSlug"],
1160
1164
  [0x98986C0D, "inputInvoicePremiumGiftCode"],
1161
- [0x1DA33AD8, "inputInvoiceStars"],
1165
+ [0x65F00CE3, "inputInvoiceStars"],
1162
1166
  [0xAED0CBD9, "payments.exportedInvoice"],
1163
1167
  [0xCFB9D957, "messages.transcribedAudio"],
1164
1168
  [0x5334759C, "help.premiumPromo"],
@@ -1166,7 +1170,8 @@ const map = new Map([
1166
1170
  [0x616F7FE8, "inputStorePaymentGiftPremium"],
1167
1171
  [0xA3805F3F, "inputStorePaymentPremiumGiftCode"],
1168
1172
  [0x160544CA, "inputStorePaymentPremiumGiveaway"],
1169
- [0x4F0EE8DF, "inputStorePaymentStars"],
1173
+ [0xDDDD0F56, "inputStorePaymentStarsTopup"],
1174
+ [0x1D741EF7, "inputStorePaymentStarsGift"],
1170
1175
  [0x74C34319, "premiumGiftOption"],
1171
1176
  [0x88F8F21B, "paymentFormMethod"],
1172
1177
  [0x2DE11AAE, "emojiStatusEmpty"],
@@ -1260,6 +1265,7 @@ const map = new Map([
1260
1265
  [0x770416AF, "mediaAreaChannelPost"],
1261
1266
  [0x2271F2BF, "inputMediaAreaChannelPost"],
1262
1267
  [0x37381085, "mediaAreaUrl"],
1268
+ [0x49A6549C, "mediaAreaWeather"],
1263
1269
  [0x9A35E999, "peerStories"],
1264
1270
  [0xCAE68768, "stories.peerStories"],
1265
1271
  [0xFD5E12BD, "messages.webPage"],
@@ -1381,6 +1387,10 @@ const map = new Map([
1381
1387
  [0x1DAB80B7, "payments.starsRevenueWithdrawalUrl"],
1382
1388
  [0x394E7F21, "payments.starsRevenueAdsAccountUrl"],
1383
1389
  [0x206AE6D1, "inputStarsTransaction"],
1390
+ [0x5E0589F1, "starsGiftOption"],
1391
+ [0x1991B13B, "bots.popularAppBots"],
1392
+ [0x23E91BA3, "botPreviewMedia"],
1393
+ [0x0CA71D64, "bots.previewInfo"],
1384
1394
  ]);
1385
1395
  export const getTypeName = map.get.bind(map);
1386
1396
  export const flags = Symbol();
@@ -1418,7 +1428,7 @@ const enums = new Map([
1418
1428
  ["InputPeer", ["inputPeerEmpty", "inputPeerSelf", "inputPeerChat", "inputPeerUser", "inputPeerChannel", "inputPeerUserFromMessage", "inputPeerChannelFromMessage"]],
1419
1429
  ["InputUser", ["inputUserEmpty", "inputUserSelf", "inputUser", "inputUserFromMessage"]],
1420
1430
  ["InputContact", ["inputPhoneContact"]],
1421
- ["InputFile", ["inputFile", "inputFileBig"]],
1431
+ ["InputFile", ["inputFile", "inputFileBig", "inputFileStoryDocument"]],
1422
1432
  ["InputMedia", ["inputMediaEmpty", "inputMediaUploadedPhoto", "inputMediaPhoto", "inputMediaGeoPoint", "inputMediaContact", "inputMediaUploadedDocument", "inputMediaDocument", "inputMediaVenue", "inputMediaPhotoExternal", "inputMediaDocumentExternal", "inputMediaGame", "inputMediaInvoice", "inputMediaGeoLive", "inputMediaPoll", "inputMediaDice", "inputMediaStory", "inputMediaWebPage", "inputMediaPaidMedia"]],
1423
1433
  ["InputChatPhoto", ["inputChatPhotoEmpty", "inputChatUploadedPhoto", "inputChatPhoto"]],
1424
1434
  ["InputGeoPoint", ["inputGeoPointEmpty", "inputGeoPoint"]],
@@ -1435,7 +1445,7 @@ const enums = new Map([
1435
1445
  ["ChatPhoto", ["chatPhotoEmpty", "chatPhoto"]],
1436
1446
  ["Message", ["messageEmpty", "message", "messageService"]],
1437
1447
  ["MessageMedia", ["messageMediaEmpty", "messageMediaPhoto", "messageMediaGeo", "messageMediaContact", "messageMediaUnsupported", "messageMediaDocument", "messageMediaWebPage", "messageMediaVenue", "messageMediaGame", "messageMediaInvoice", "messageMediaGeoLive", "messageMediaPoll", "messageMediaDice", "messageMediaStory", "messageMediaGiveaway", "messageMediaGiveawayResults", "messageMediaPaidMedia"]],
1438
- ["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"]],
1448
+ ["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"]],
1439
1449
  ["Dialog", ["dialog", "dialogFolder"]],
1440
1450
  ["Photo", ["photoEmpty", "photo"]],
1441
1451
  ["PhotoSize", ["photoSizeEmpty", "photoSize", "photoCachedSize", "photoStrippedSize", "photoSizeProgressive", "photoPathSize"]],
@@ -1683,7 +1693,7 @@ const enums = new Map([
1683
1693
  ["InlineBotSwitchPM", ["inlineBotSwitchPM"]],
1684
1694
  ["messages.PeerDialogs", ["messages.peerDialogs"]],
1685
1695
  ["TopPeer", ["topPeer"]],
1686
- ["TopPeerCategory", ["topPeerCategoryBotsPM", "topPeerCategoryBotsInline", "topPeerCategoryCorrespondents", "topPeerCategoryGroups", "topPeerCategoryChannels", "topPeerCategoryPhoneCalls", "topPeerCategoryForwardUsers", "topPeerCategoryForwardChats"]],
1696
+ ["TopPeerCategory", ["topPeerCategoryBotsPM", "topPeerCategoryBotsInline", "topPeerCategoryCorrespondents", "topPeerCategoryGroups", "topPeerCategoryChannels", "topPeerCategoryPhoneCalls", "topPeerCategoryForwardUsers", "topPeerCategoryForwardChats", "topPeerCategoryBotsApp"]],
1687
1697
  ["TopPeerCategoryPeers", ["topPeerCategoryPeers"]],
1688
1698
  ["contacts.TopPeers", ["contacts.topPeersNotModified", "contacts.topPeers", "contacts.topPeersDisabled"]],
1689
1699
  ["DraftMessage", ["draftMessageEmpty", "draftMessage"]],
@@ -1953,7 +1963,7 @@ const enums = new Map([
1953
1963
  ["payments.ExportedInvoice", ["payments.exportedInvoice"]],
1954
1964
  ["messages.TranscribedAudio", ["messages.transcribedAudio"]],
1955
1965
  ["help.PremiumPromo", ["help.premiumPromo"]],
1956
- ["InputStorePaymentPurpose", ["inputStorePaymentPremiumSubscription", "inputStorePaymentGiftPremium", "inputStorePaymentPremiumGiftCode", "inputStorePaymentPremiumGiveaway", "inputStorePaymentStars"]],
1966
+ ["InputStorePaymentPurpose", ["inputStorePaymentPremiumSubscription", "inputStorePaymentGiftPremium", "inputStorePaymentPremiumGiftCode", "inputStorePaymentPremiumGiveaway", "inputStorePaymentStarsTopup", "inputStorePaymentStarsGift"]],
1957
1967
  ["PremiumGiftOption", ["premiumGiftOption"]],
1958
1968
  ["PaymentFormMethod", ["paymentFormMethod"]],
1959
1969
  ["EmojiStatus", ["emojiStatusEmpty", "emojiStatus", "emojiStatusUntil"]],
@@ -2007,7 +2017,7 @@ const enums = new Map([
2007
2017
  ["ExportedStoryLink", ["exportedStoryLink"]],
2008
2018
  ["StoriesStealthMode", ["storiesStealthMode"]],
2009
2019
  ["MediaAreaCoordinates", ["mediaAreaCoordinates"]],
2010
- ["MediaArea", ["mediaAreaVenue", "inputMediaAreaVenue", "mediaAreaGeoPoint", "mediaAreaSuggestedReaction", "mediaAreaChannelPost", "inputMediaAreaChannelPost", "mediaAreaUrl"]],
2020
+ ["MediaArea", ["mediaAreaVenue", "inputMediaAreaVenue", "mediaAreaGeoPoint", "mediaAreaSuggestedReaction", "mediaAreaChannelPost", "inputMediaAreaChannelPost", "mediaAreaUrl", "mediaAreaWeather"]],
2011
2021
  ["PeerStories", ["peerStories"]],
2012
2022
  ["stories.PeerStories", ["stories.peerStories"]],
2013
2023
  ["messages.WebPage", ["messages.webPage"]],
@@ -2099,6 +2109,10 @@ const enums = new Map([
2099
2109
  ["payments.StarsRevenueWithdrawalUrl", ["payments.starsRevenueWithdrawalUrl"]],
2100
2110
  ["payments.StarsRevenueAdsAccountUrl", ["payments.starsRevenueAdsAccountUrl"]],
2101
2111
  ["InputStarsTransaction", ["inputStarsTransaction"]],
2112
+ ["StarsGiftOption", ["starsGiftOption"]],
2113
+ ["bots.PopularAppBots", ["bots.popularAppBots"]],
2114
+ ["BotPreviewMedia", ["botPreviewMedia"]],
2115
+ ["bots.PreviewInfo", ["bots.previewInfo"]],
2102
2116
  ]);
2103
2117
  const types = new Map([
2104
2118
  [
@@ -2676,6 +2690,15 @@ const types = new Map([
2676
2690
  ],
2677
2691
  ],
2678
2692
  ],
2693
+ [
2694
+ "inputFileStoryDocument",
2695
+ [
2696
+ 0x62DC8B48,
2697
+ [
2698
+ ["id", "InputDocument", "InputDocument"],
2699
+ ],
2700
+ ],
2701
+ ],
2679
2702
  [
2680
2703
  "inputMediaEmpty",
2681
2704
  [
@@ -3182,7 +3205,7 @@ const types = new Map([
3182
3205
  [
3183
3206
  "user",
3184
3207
  [
3185
- 0x215C4438,
3208
+ 0x83314FCA,
3186
3209
  [
3187
3210
  ["flags", flags, "#"],
3188
3211
  ["self", "true", "flags.10?true"],
@@ -3210,6 +3233,7 @@ const types = new Map([
3210
3233
  ["stories_unavailable", "true", "flags2.4?true"],
3211
3234
  ["contact_require_premium", "true", "flags2.10?true"],
3212
3235
  ["bot_business", "true", "flags2.11?true"],
3236
+ ["bot_has_main_app", "true", "flags2.13?true"],
3213
3237
  ["id", "bigint", "long"],
3214
3238
  ["access_hash", "bigint", "flags.0?long"],
3215
3239
  ["first_name", "string", "flags.1?string"],
@@ -3227,6 +3251,7 @@ const types = new Map([
3227
3251
  ["stories_max_id", "number", "flags2.5?int"],
3228
3252
  ["color", "PeerColor", "flags2.8?PeerColor"],
3229
3253
  ["profile_color", "PeerColor", "flags2.9?PeerColor"],
3254
+ ["bot_active_users", "number", "flags2.12?int"],
3230
3255
  ],
3231
3256
  ],
3232
3257
  ],
@@ -3467,6 +3492,7 @@ const types = new Map([
3467
3492
  ["restricted_sponsored", "true", "flags2.11?true"],
3468
3493
  ["can_view_revenue", "true", "flags2.12?true"],
3469
3494
  ["paid_media_allowed", "true", "flags2.14?true"],
3495
+ ["can_view_stars_revenue", "true", "flags2.15?true"],
3470
3496
  ["id", "bigint", "long"],
3471
3497
  ["about", "string", "string"],
3472
3498
  ["participants_count", "number", "flags.0?int"],
@@ -4311,6 +4337,35 @@ const types = new Map([
4311
4337
  ],
4312
4338
  ],
4313
4339
  ],
4340
+ [
4341
+ "messageActionPaymentRefunded",
4342
+ [
4343
+ 0x41B3E202,
4344
+ [
4345
+ ["flags", flags, "#"],
4346
+ ["peer", "Peer", "Peer"],
4347
+ ["currency", "string", "string"],
4348
+ ["total_amount", "bigint", "long"],
4349
+ ["payload", Uint8Array, "flags.0?bytes"],
4350
+ ["charge", "PaymentCharge", "PaymentCharge"],
4351
+ ],
4352
+ ],
4353
+ ],
4354
+ [
4355
+ "messageActionGiftStars",
4356
+ [
4357
+ 0x45D5B021,
4358
+ [
4359
+ ["flags", flags, "#"],
4360
+ ["currency", "string", "string"],
4361
+ ["amount", "bigint", "long"],
4362
+ ["stars", "bigint", "long"],
4363
+ ["crypto_currency", "string", "flags.0?string"],
4364
+ ["crypto_amount", "bigint", "flags.0?long"],
4365
+ ["transaction_id", "string", "flags.1?string"],
4366
+ ],
4367
+ ],
4368
+ ],
4314
4369
  [
4315
4370
  "dialog",
4316
4371
  [
@@ -7761,7 +7816,7 @@ const types = new Map([
7761
7816
  [
7762
7817
  "documentAttributeVideo",
7763
7818
  [
7764
- 0xD38FF1C2,
7819
+ 0x17399FAD,
7765
7820
  [
7766
7821
  ["flags", flags, "#"],
7767
7822
  ["round_message", "true", "flags.0?true"],
@@ -7771,6 +7826,7 @@ const types = new Map([
7771
7826
  ["w", "number", "int"],
7772
7827
  ["h", "number", "int"],
7773
7828
  ["preload_prefix_size", "number", "flags.2?int"],
7829
+ ["video_start_ts", "number", "flags.4?double"],
7774
7830
  ],
7775
7831
  ],
7776
7832
  ],
@@ -8251,6 +8307,7 @@ const types = new Map([
8251
8307
  0x8F300B57,
8252
8308
  [
8253
8309
  ["flags", flags, "#"],
8310
+ ["has_preview_medias", "true", "flags.6?true"],
8254
8311
  ["user_id", "bigint", "flags.0?long"],
8255
8312
  ["description", "string", "flags.1?string"],
8256
8313
  ["description_photo", "Photo", "flags.4?Photo"],
@@ -9679,6 +9736,13 @@ const types = new Map([
9679
9736
  [],
9680
9737
  ],
9681
9738
  ],
9739
+ [
9740
+ "topPeerCategoryBotsApp",
9741
+ [
9742
+ 0xFD9E7BEC,
9743
+ [],
9744
+ ],
9745
+ ],
9682
9746
  [
9683
9747
  "topPeerCategoryPeers",
9684
9748
  [
@@ -14504,9 +14568,9 @@ const types = new Map([
14504
14568
  [
14505
14569
  "inputInvoiceStars",
14506
14570
  [
14507
- 0x1DA33AD8,
14571
+ 0x65F00CE3,
14508
14572
  [
14509
- ["option", "StarsTopupOption", "StarsTopupOption"],
14573
+ ["purpose", "InputStorePaymentPurpose", "InputStorePaymentPurpose"],
14510
14574
  ],
14511
14575
  ],
14512
14576
  ],
@@ -14602,11 +14666,22 @@ const types = new Map([
14602
14666
  ],
14603
14667
  ],
14604
14668
  [
14605
- "inputStorePaymentStars",
14669
+ "inputStorePaymentStarsTopup",
14606
14670
  [
14607
- 0x4F0EE8DF,
14671
+ 0xDDDD0F56,
14608
14672
  [
14609
- ["flags", flags, "#"],
14673
+ ["stars", "bigint", "long"],
14674
+ ["currency", "string", "string"],
14675
+ ["amount", "bigint", "long"],
14676
+ ],
14677
+ ],
14678
+ ],
14679
+ [
14680
+ "inputStorePaymentStarsGift",
14681
+ [
14682
+ 0x1D741EF7,
14683
+ [
14684
+ ["user_id", "InputUser", "InputUser"],
14610
14685
  ["stars", "bigint", "long"],
14611
14686
  ["currency", "string", "string"],
14612
14687
  ["amount", "bigint", "long"],
@@ -15656,6 +15731,18 @@ const types = new Map([
15656
15731
  ],
15657
15732
  ],
15658
15733
  ],
15734
+ [
15735
+ "mediaAreaWeather",
15736
+ [
15737
+ 0x49A6549C,
15738
+ [
15739
+ ["coordinates", "MediaAreaCoordinates", "MediaAreaCoordinates"],
15740
+ ["emoji", "string", "string"],
15741
+ ["temperature_c", "number", "double"],
15742
+ ["color", "number", "int"],
15743
+ ],
15744
+ ],
15745
+ ],
15659
15746
  [
15660
15747
  "peerStories",
15661
15748
  [
@@ -16914,6 +17001,7 @@ const types = new Map([
16914
17001
  ["refund", "true", "flags.3?true"],
16915
17002
  ["pending", "true", "flags.4?true"],
16916
17003
  ["failed", "true", "flags.6?true"],
17004
+ ["gift", "true", "flags.10?true"],
16917
17005
  ["id", "string", "string"],
16918
17006
  ["stars", "bigint", "long"],
16919
17007
  ["date", "number", "int"],
@@ -17034,6 +17122,51 @@ const types = new Map([
17034
17122
  ],
17035
17123
  ],
17036
17124
  ],
17125
+ [
17126
+ "starsGiftOption",
17127
+ [
17128
+ 0x5E0589F1,
17129
+ [
17130
+ ["flags", flags, "#"],
17131
+ ["extended", "true", "flags.1?true"],
17132
+ ["stars", "bigint", "long"],
17133
+ ["store_product", "string", "flags.0?string"],
17134
+ ["currency", "string", "string"],
17135
+ ["amount", "bigint", "long"],
17136
+ ],
17137
+ ],
17138
+ ],
17139
+ [
17140
+ "bots.popularAppBots",
17141
+ [
17142
+ 0x1991B13B,
17143
+ [
17144
+ ["flags", flags, "#"],
17145
+ ["next_offset", "string", "flags.0?string"],
17146
+ ["users", ["User"], "Vector<User>"],
17147
+ ],
17148
+ ],
17149
+ ],
17150
+ [
17151
+ "botPreviewMedia",
17152
+ [
17153
+ 0x23E91BA3,
17154
+ [
17155
+ ["date", "number", "int"],
17156
+ ["media", "MessageMedia", "MessageMedia"],
17157
+ ],
17158
+ ],
17159
+ ],
17160
+ [
17161
+ "bots.previewInfo",
17162
+ [
17163
+ 0x0CA71D64,
17164
+ [
17165
+ ["media", ["BotPreviewMedia"], "Vector<BotPreviewMedia>"],
17166
+ ["lang_codes", ["string"], "Vector<string>"],
17167
+ ],
17168
+ ],
17169
+ ],
17037
17170
  [
17038
17171
  "req_pq_multi",
17039
17172
  [
@@ -18729,6 +18862,7 @@ const types = new Map([
18729
18862
  ["forward_chats", "true", "flags.5?true"],
18730
18863
  ["groups", "true", "flags.10?true"],
18731
18864
  ["channels", "true", "flags.15?true"],
18865
+ ["bots_app", "true", "flags.16?true"],
18732
18866
  ["offset", "number", "int"],
18733
18867
  ["limit", "number", "int"],
18734
18868
  ["hash", "bigint", "long"],
@@ -21296,6 +21430,21 @@ const types = new Map([
21296
21430
  ],
21297
21431
  ],
21298
21432
  ],
21433
+ [
21434
+ "messages.requestMainWebView",
21435
+ [
21436
+ 0xC9E01E7B,
21437
+ [
21438
+ ["flags", flags, "#"],
21439
+ ["compact", "true", "flags.7?true"],
21440
+ ["peer", "InputPeer", "InputPeer"],
21441
+ ["bot", "InputUser", "InputUser"],
21442
+ ["start_param", "string", "flags.1?string"],
21443
+ ["theme_params", "DataJSON", "flags.0?DataJSON"],
21444
+ ["platform", "string", "string"],
21445
+ ],
21446
+ ],
21447
+ ],
21299
21448
  [
21300
21449
  "updates.getState",
21301
21450
  [
@@ -22550,6 +22699,80 @@ const types = new Map([
22550
22699
  ],
22551
22700
  ],
22552
22701
  ],
22702
+ [
22703
+ "bots.getPopularAppBots",
22704
+ [
22705
+ 0xC2510192,
22706
+ [
22707
+ ["offset", "string", "string"],
22708
+ ["limit", "number", "int"],
22709
+ ],
22710
+ ],
22711
+ ],
22712
+ [
22713
+ "bots.addPreviewMedia",
22714
+ [
22715
+ 0x17AEB75A,
22716
+ [
22717
+ ["bot", "InputUser", "InputUser"],
22718
+ ["lang_code", "string", "string"],
22719
+ ["media", "InputMedia", "InputMedia"],
22720
+ ],
22721
+ ],
22722
+ ],
22723
+ [
22724
+ "bots.editPreviewMedia",
22725
+ [
22726
+ 0x8525606F,
22727
+ [
22728
+ ["bot", "InputUser", "InputUser"],
22729
+ ["lang_code", "string", "string"],
22730
+ ["media", "InputMedia", "InputMedia"],
22731
+ ["new_media", "InputMedia", "InputMedia"],
22732
+ ],
22733
+ ],
22734
+ ],
22735
+ [
22736
+ "bots.deletePreviewMedia",
22737
+ [
22738
+ 0x2D0135B3,
22739
+ [
22740
+ ["bot", "InputUser", "InputUser"],
22741
+ ["lang_code", "string", "string"],
22742
+ ["media", ["InputMedia"], "Vector<InputMedia>"],
22743
+ ],
22744
+ ],
22745
+ ],
22746
+ [
22747
+ "bots.reorderPreviewMedias",
22748
+ [
22749
+ 0xB627F3AA,
22750
+ [
22751
+ ["bot", "InputUser", "InputUser"],
22752
+ ["lang_code", "string", "string"],
22753
+ ["order", ["InputMedia"], "Vector<InputMedia>"],
22754
+ ],
22755
+ ],
22756
+ ],
22757
+ [
22758
+ "bots.getPreviewInfo",
22759
+ [
22760
+ 0x423AB3AD,
22761
+ [
22762
+ ["bot", "InputUser", "InputUser"],
22763
+ ["lang_code", "string", "string"],
22764
+ ],
22765
+ ],
22766
+ ],
22767
+ [
22768
+ "bots.getPreviewMedias",
22769
+ [
22770
+ 0xA2A5594D,
22771
+ [
22772
+ ["bot", "InputUser", "InputUser"],
22773
+ ],
22774
+ ],
22775
+ ],
22553
22776
  [
22554
22777
  "payments.getPaymentForm",
22555
22778
  [
@@ -22805,6 +23028,16 @@ const types = new Map([
22805
23028
  ],
22806
23029
  ],
22807
23030
  ],
23031
+ [
23032
+ "payments.getStarsGiftOptions",
23033
+ [
23034
+ 0xD3C96BC8,
23035
+ [
23036
+ ["flags", flags, "#"],
23037
+ ["user_id", "InputUser", "flags.0?InputUser"],
23038
+ ],
23039
+ ],
23040
+ ],
22808
23041
  [
22809
23042
  "stickers.createStickerSet",
22810
23043
  [
@@ -0,0 +1,29 @@
1
+ /**
2
+ * MTKruto - Cross-runtime JavaScript library for building Telegram clients
3
+ * Copyright (C) 2023-2024 Roj <https://roj.im/>
4
+ *
5
+ * This file is part of MTKruto.
6
+ *
7
+ * This program is free software: you can redistribute it and/or modify
8
+ * it under the terms of the GNU Lesser General Public License as published by
9
+ * the Free Software Foundation, either version 3 of the License, or
10
+ * (at your option) any later version.
11
+ *
12
+ * This program is distributed in the hope that it will be useful,
13
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
14
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
+ * GNU Lesser General Public License for more details.
16
+ *
17
+ * You should have received a copy of the GNU Lesser General Public License
18
+ * along with this program. If not, see <https://www.gnu.org/licenses/>.
19
+ */
20
+ import { Api } from "../2_tl.js";
21
+ export interface RefundedPayment {
22
+ currency: string;
23
+ totalAmount: number;
24
+ invoicePayload: string;
25
+ telegramPaymentChargeId: string;
26
+ providerPaymentChargeId?: string;
27
+ }
28
+ export declare function constructRefundedPayment(action: Api.messageActionPaymentRefunded): RefundedPayment;
29
+ //# sourceMappingURL=0_refunded_payment.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"0_refunded_payment.d.ts","sourceRoot":"","sources":["../../src/types/0_refunded_payment.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAGH,OAAO,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AAEjC,MAAM,WAAW,eAAe;IAC9B,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,cAAc,EAAE,MAAM,CAAC;IACvB,uBAAuB,EAAE,MAAM,CAAC;IAChC,uBAAuB,CAAC,EAAE,MAAM,CAAC;CAClC;AAED,wBAAgB,wBAAwB,CAAC,MAAM,EAAE,GAAG,CAAC,4BAA4B,GAAG,eAAe,CAQlG"}
@@ -0,0 +1,29 @@
1
+ /**
2
+ * MTKruto - Cross-runtime JavaScript library for building Telegram clients
3
+ * Copyright (C) 2023-2024 Roj <https://roj.im/>
4
+ *
5
+ * This file is part of MTKruto.
6
+ *
7
+ * This program is free software: you can redistribute it and/or modify
8
+ * it under the terms of the GNU Lesser General Public License as published by
9
+ * the Free Software Foundation, either version 3 of the License, or
10
+ * (at your option) any later version.
11
+ *
12
+ * This program is distributed in the hope that it will be useful,
13
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
14
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
+ * GNU Lesser General Public License for more details.
16
+ *
17
+ * You should have received a copy of the GNU Lesser General Public License
18
+ * along with this program. If not, see <https://www.gnu.org/licenses/>.
19
+ */
20
+ import { cleanObject } from "../1_utilities.js";
21
+ export function constructRefundedPayment(action) {
22
+ return cleanObject({
23
+ currency: action.currency,
24
+ totalAmount: Number(action.total_amount),
25
+ invoicePayload: new TextDecoder().decode(action.payload),
26
+ telegramPaymentChargeId: action.charge.id,
27
+ providerPaymentChargeId: action.charge.provider_charge_id,
28
+ });
29
+ }
@@ -54,6 +54,7 @@ export interface ChatPrivate extends ChatBase, ChatPPrivate {
54
54
  location?: Location;
55
55
  /** The opening hours of the business. */
56
56
  openingHours?: OpeningHours;
57
+ hasMainMiniApp?: boolean;
57
58
  }
58
59
  /**
59
60
  * A chat with more fields.
@@ -1 +1 @@
1
- {"version":3,"file":"2_chat.d.ts","sourceRoot":"","sources":["../../src/types/2_chat.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAIH,OAAO,EAAE,GAA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IAC3C,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,0CAA0C;IAC1C,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,yCAAyC;IACzC,YAAY,CAAC,EAAE,YAAY,CAAC;IAC5B,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B;AAED;;GAEG;AACH,MAAM,MAAM,IAAI,GAAG,WAAW,GAAG,cAAc,GAAG,SAAS,GAAG,WAAW,CAAC;AAE1E,wBAAsB,aAAa,CAAC,QAAQ,EAAE,GAAG,CAAC,QAAQ,GAAG,GAAG,CAAC,QAAQ,GAAG,GAAG,CAAC,WAAW,EAAE,SAAS,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC,CAmCnI"}
@@ -38,6 +38,7 @@ export async function constructChat(fullChat, getEntity) {
38
38
  address: fullChat.business_location?.address,
39
39
  location: fullChat.business_location?.geo_point && is("geoPoint", fullChat.business_location.geo_point) ? constructLocation(fullChat.business_location.geo_point) : undefined,
40
40
  openingHours: fullChat.business_work_hours ? constructOpeningHours(fullChat.business_work_hours) : undefined,
41
+ hasMainMiniApp: user.bot ? user.bot_has_main_app : undefined,
41
42
  });
42
43
  }
43
44
  else if (is("chatFull", fullChat)) {
@@ -44,6 +44,7 @@ import { Game } from "./2_game.js";
44
44
  import { Poll } from "./2_poll.js";
45
45
  import { ReplyMarkup } from "./3_reply_markup.js";
46
46
  import { SuccessfulPayment } from "./2_successful_payment.js";
47
+ import { RefundedPayment } from "./0_refunded_payment.js";
47
48
  /**
48
49
  * Properties shared between all message types.
49
50
  * @unlisted
@@ -547,6 +548,14 @@ export interface MessageSuccessfulPayment extends _MessageBase {
547
548
  /** @discriminator */
548
549
  successfulPayment: SuccessfulPayment;
549
550
  }
551
+ /**
552
+ * A payment was successfully refunded. Bot-only.
553
+ * @unlisted
554
+ */
555
+ export interface MessageRefundedPayment extends _MessageBase {
556
+ /** @discriminator */
557
+ refundedPayment: RefundedPayment;
558
+ }
550
559
  /** @unlisted */
551
560
  export interface MessageTypes {
552
561
  text: MessageText;
@@ -590,10 +599,11 @@ export interface MessageTypes {
590
599
  giveaway: MessageGiveaway;
591
600
  unsupported: MessageUnsupported;
592
601
  successfulPayment: MessageSuccessfulPayment;
602
+ refundedPayment: MessageRefundedPayment;
593
603
  }
594
604
  export declare function assertMessageType<T extends keyof MessageTypes>(message: Message, type: T): MessageTypes[T];
595
605
  /** Any type of message. */
596
- export type Message = MessageText | MessageLink | MessagePhoto | MessageDocument | MessageVideo | MessageSticker | MessageAnimation | MessageVoice | MessageAudio | MessageDice | MessageVideoNote | MessageContact | MessageGame | MessagePoll | MessageInvoice | MessageVenue | MessageLocation | MessageNewChatMembers | MessageLeftChatMember | MessageNewChatTitle | MessageNewChatPhoto | MessageDeletedChatPhoto | MessageGroupCreated | MessageSupergroupCreated | MessageChannelCreated | MessageAutoDeleteTimerChanged | MessageChatMigratedTo | MessageChatMigratedFrom | MessagePinnedMessage | MessageUserShared | MessageWriteAccessAllowed | MessageForumTopicCreated | MessageForumTopicEdited | MessageForumTopicClosed | MessageForumTopicReopened | MessageVideoChatScheduled | MessageVideoChatStarted | MessageVideoChatEnded | MessageGiveaway | MessageUnsupported | MessageSuccessfulPayment;
606
+ export type Message = MessageText | MessageLink | MessagePhoto | MessageDocument | MessageVideo | MessageSticker | MessageAnimation | MessageVoice | MessageAudio | MessageDice | MessageVideoNote | MessageContact | MessageGame | MessagePoll | MessageInvoice | MessageVenue | MessageLocation | MessageNewChatMembers | MessageLeftChatMember | MessageNewChatTitle | MessageNewChatPhoto | MessageDeletedChatPhoto | MessageGroupCreated | MessageSupergroupCreated | MessageChannelCreated | MessageAutoDeleteTimerChanged | MessageChatMigratedTo | MessageChatMigratedFrom | MessagePinnedMessage | MessageUserShared | MessageWriteAccessAllowed | MessageForumTopicCreated | MessageForumTopicEdited | MessageForumTopicClosed | MessageForumTopicReopened | MessageVideoChatScheduled | MessageVideoChatStarted | MessageVideoChatEnded | MessageGiveaway | MessageUnsupported | MessageSuccessfulPayment | MessageRefundedPayment;
597
607
  /** @unlisted */
598
608
  export interface MessageGetter {
599
609
  (chatId: number, messageId: number): MaybePromise<Message | null>;