@mtkruto/node 0.19.0 → 0.20.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.
Files changed (43) 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_utilities.d.ts +2 -2
  7. package/esm/client/0_utilities.d.ts.map +1 -1
  8. package/esm/client/4_chat_list_manager.d.ts +1 -0
  9. package/esm/client/4_chat_list_manager.d.ts.map +1 -1
  10. package/esm/client/4_chat_list_manager.js +22 -90
  11. package/esm/client/5_client.d.ts +8 -1
  12. package/esm/client/5_client.d.ts.map +1 -1
  13. package/esm/client/5_client.js +10 -1
  14. package/esm/tl/0_api.d.ts +90 -19
  15. package/esm/tl/0_api.d.ts.map +1 -1
  16. package/esm/tl/0_api.js +151 -42
  17. package/esm/types/2_chat_settings.d.ts +27 -0
  18. package/esm/types/2_chat_settings.d.ts.map +1 -0
  19. package/esm/types/2_chat_settings.js +32 -0
  20. package/esm/types/5_chat_list_item.d.ts.map +1 -1
  21. package/esm/types/5_chat_list_item.js +3 -2
  22. package/package.json +1 -1
  23. package/script/3_types.d.ts +1 -0
  24. package/script/3_types.d.ts.map +1 -1
  25. package/script/3_types.js +1 -0
  26. package/script/4_constants.d.ts +1 -1
  27. package/script/4_constants.js +1 -1
  28. package/script/client/0_utilities.d.ts +2 -2
  29. package/script/client/0_utilities.d.ts.map +1 -1
  30. package/script/client/4_chat_list_manager.d.ts +1 -0
  31. package/script/client/4_chat_list_manager.d.ts.map +1 -1
  32. package/script/client/4_chat_list_manager.js +20 -88
  33. package/script/client/5_client.d.ts +8 -1
  34. package/script/client/5_client.d.ts.map +1 -1
  35. package/script/client/5_client.js +10 -1
  36. package/script/tl/0_api.d.ts +90 -19
  37. package/script/tl/0_api.d.ts.map +1 -1
  38. package/script/tl/0_api.js +151 -42
  39. package/script/types/2_chat_settings.d.ts +27 -0
  40. package/script/types/2_chat_settings.d.ts.map +1 -0
  41. package/script/types/2_chat_settings.js +35 -0
  42. package/script/types/5_chat_list_item.d.ts.map +1 -1
  43. package/script/types/5_chat_list_item.js +3 -2
@@ -151,7 +151,7 @@ const map = new Map([
151
151
  [0xB3CEA0E4, "storage.fileMp4"],
152
152
  [0x1081464C, "storage.fileWebp"],
153
153
  [0xD3BC4B7A, "userEmpty"],
154
- [0x4B46C37E, "user"],
154
+ [0x020B1422, "user"],
155
155
  [0x4F11BAE1, "userProfilePhotoEmpty"],
156
156
  [0x82D1F706, "userProfilePhoto"],
157
157
  [0x09D05049, "userStatusEmpty"],
@@ -163,7 +163,7 @@ const map = new Map([
163
163
  [0x29562865, "chatEmpty"],
164
164
  [0x41CBF256, "chat"],
165
165
  [0x6592A1A7, "chatForbidden"],
166
- [0xE00998B7, "channel"],
166
+ [0x7482147E, "channel"],
167
167
  [0x17D493D5, "channelForbidden"],
168
168
  [0x2633421B, "chatFull"],
169
169
  [0x52D6806B, "channelFull"],
@@ -175,7 +175,7 @@ const map = new Map([
175
175
  [0x37C1011C, "chatPhotoEmpty"],
176
176
  [0x1C6E1C11, "chatPhoto"],
177
177
  [0x90A6CA84, "messageEmpty"],
178
- [0x96FDBBE9, "message"],
178
+ [0xEABCDD4D, "message"],
179
179
  [0xD3D28540, "messageService"],
180
180
  [0x3DED6320, "messageMediaEmpty"],
181
181
  [0x695150D7, "messageMediaPhoto"],
@@ -266,7 +266,7 @@ const map = new Map([
266
266
  [0x5C467992, "inputNotifyForumTopic"],
267
267
  [0xCACB6AE2, "inputPeerNotifySettings"],
268
268
  [0x99622C0C, "peerNotifySettings"],
269
- [0xACD66C5E, "peerSettings"],
269
+ [0xF47741F7, "peerSettings"],
270
270
  [0xA437C3ED, "wallPaper"],
271
271
  [0xE0804116, "wallPaperNoFile"],
272
272
  [0x58DBCAB8, "inputReportReasonSpam"],
@@ -279,7 +279,7 @@ const map = new Map([
279
279
  [0xF5DDD6E7, "inputReportReasonFake"],
280
280
  [0x0A8EB2BE, "inputReportReasonIllegalDrugs"],
281
281
  [0x9EC7863D, "inputReportReasonPersonalDetails"],
282
- [0x4D975BBC, "userFull"],
282
+ [0xD2234EA0, "userFull"],
283
283
  [0x145ADE0B, "contact"],
284
284
  [0xC13E3C50, "importedContact"],
285
285
  [0x16D9703B, "contactStatus"],
@@ -539,6 +539,7 @@ const map = new Map([
539
539
  [0x3823CC40, "inputPrivacyKeyAbout"],
540
540
  [0xD65A11CC, "inputPrivacyKeyBirthday"],
541
541
  [0xE1732341, "inputPrivacyKeyStarGiftsAutoSave"],
542
+ [0xBDC597B4, "inputPrivacyKeyNoPaidMessages"],
542
543
  [0xBC2EAB30, "privacyKeyStatusTimestamp"],
543
544
  [0x500E6DFA, "privacyKeyChatInvite"],
544
545
  [0x3D662B7B, "privacyKeyPhoneCall"],
@@ -551,6 +552,7 @@ const map = new Map([
551
552
  [0xA486B761, "privacyKeyAbout"],
552
553
  [0x2000A518, "privacyKeyBirthday"],
553
554
  [0x2CA4FDF8, "privacyKeyStarGiftsAutoSave"],
555
+ [0x17D348D2, "privacyKeyNoPaidMessages"],
554
556
  [0x0D09E07B, "inputPrivacyValueAllowContacts"],
555
557
  [0x184B35CE, "inputPrivacyValueAllowAll"],
556
558
  [0x131CC67F, "inputPrivacyValueAllowUsers"],
@@ -1106,7 +1108,7 @@ const map = new Map([
1106
1108
  [0xD7584C87, "statsGroupTopAdmin"],
1107
1109
  [0x535F779D, "statsGroupTopInviter"],
1108
1110
  [0xEF7FF916, "stats.megagroupStats"],
1109
- [0x734C4CCB, "globalPrivacySettings"],
1111
+ [0xC9D8DF1C, "globalPrivacySettings"],
1110
1112
  [0x4203C5EF, "help.countryCode"],
1111
1113
  [0xC3878E23, "help.country"],
1112
1114
  [0x93CC1F32, "help.countriesListNotModified"],
@@ -1210,6 +1212,7 @@ const map = new Map([
1210
1212
  [0xE8625E92, "inputInvoiceStarGift"],
1211
1213
  [0x4D818D5D, "inputInvoiceStarGiftUpgrade"],
1212
1214
  [0x4A5F5BD9, "inputInvoiceStarGiftTransfer"],
1215
+ [0xDABAB2EF, "inputInvoicePremiumGiftStars"],
1213
1216
  [0xAED0CBD9, "payments.exportedInvoice"],
1214
1217
  [0xCFB9D957, "messages.transcribedAudio"],
1215
1218
  [0x5334759C, "help.premiumPromo"],
@@ -1220,7 +1223,6 @@ const map = new Map([
1220
1223
  [0xDDDD0F56, "inputStorePaymentStarsTopup"],
1221
1224
  [0x1D741EF7, "inputStorePaymentStarsGift"],
1222
1225
  [0x751F08FA, "inputStorePaymentStarsGiveaway"],
1223
- [0x74C34319, "premiumGiftOption"],
1224
1226
  [0x88F8F21B, "paymentFormMethod"],
1225
1227
  [0x2DE11AAE, "emojiStatusEmpty"],
1226
1228
  [0xE7FF068A, "emojiStatus"],
@@ -1430,7 +1432,7 @@ const map = new Map([
1430
1432
  [0x60682812, "starsTransactionPeerAds"],
1431
1433
  [0xF9677AAD, "starsTransactionPeerAPI"],
1432
1434
  [0x0BD915C0, "starsTopupOption"],
1433
- [0x64DFC926, "starsTransaction"],
1435
+ [0xA39FD94A, "starsTransaction"],
1434
1436
  [0x6C9CE8ED, "payments.starsStatus"],
1435
1437
  [0xE87ACBC0, "foundStory"],
1436
1438
  [0xE2DE7737, "stories.foundStories"],
@@ -1486,6 +1488,10 @@ const map = new Map([
1486
1488
  [0x206AD49E, "paidReactionPrivacyDefault"],
1487
1489
  [0x1F0C1AD9, "paidReactionPrivacyAnonymous"],
1488
1490
  [0xDC6CFCF0, "paidReactionPrivacyPeer"],
1491
+ [0x1E109708, "account.paidMessagesRevenue"],
1492
+ [0x050A9839, "requirementToContactEmpty"],
1493
+ [0xE581E4E9, "requirementToContactPremium"],
1494
+ [0xB4F67E93, "requirementToContactPaidMessages"],
1489
1495
  ]);
1490
1496
  exports.getTypeName = map.get.bind(map);
1491
1497
  exports.flags = Symbol();
@@ -1734,8 +1740,8 @@ const enums = new Map([
1734
1740
  ["NotifyPeer", ["notifyPeer", "notifyUsers", "notifyChats", "notifyBroadcasts", "notifyForumTopic"]],
1735
1741
  ["SendMessageAction", ["sendMessageTypingAction", "sendMessageCancelAction", "sendMessageRecordVideoAction", "sendMessageUploadVideoAction", "sendMessageRecordAudioAction", "sendMessageUploadAudioAction", "sendMessageUploadPhotoAction", "sendMessageUploadDocumentAction", "sendMessageGeoLocationAction", "sendMessageChooseContactAction", "sendMessageGamePlayAction", "sendMessageRecordRoundAction", "sendMessageUploadRoundAction", "speakingInGroupCallAction", "sendMessageHistoryImportAction", "sendMessageChooseStickerAction", "sendMessageEmojiInteraction", "sendMessageEmojiInteractionSeen"]],
1736
1742
  ["contacts.Found", ["contacts.found"]],
1737
- ["InputPrivacyKey", ["inputPrivacyKeyStatusTimestamp", "inputPrivacyKeyChatInvite", "inputPrivacyKeyPhoneCall", "inputPrivacyKeyPhoneP2P", "inputPrivacyKeyForwards", "inputPrivacyKeyProfilePhoto", "inputPrivacyKeyPhoneNumber", "inputPrivacyKeyAddedByPhone", "inputPrivacyKeyVoiceMessages", "inputPrivacyKeyAbout", "inputPrivacyKeyBirthday", "inputPrivacyKeyStarGiftsAutoSave"]],
1738
- ["PrivacyKey", ["privacyKeyStatusTimestamp", "privacyKeyChatInvite", "privacyKeyPhoneCall", "privacyKeyPhoneP2P", "privacyKeyForwards", "privacyKeyProfilePhoto", "privacyKeyPhoneNumber", "privacyKeyAddedByPhone", "privacyKeyVoiceMessages", "privacyKeyAbout", "privacyKeyBirthday", "privacyKeyStarGiftsAutoSave"]],
1743
+ ["InputPrivacyKey", ["inputPrivacyKeyStatusTimestamp", "inputPrivacyKeyChatInvite", "inputPrivacyKeyPhoneCall", "inputPrivacyKeyPhoneP2P", "inputPrivacyKeyForwards", "inputPrivacyKeyProfilePhoto", "inputPrivacyKeyPhoneNumber", "inputPrivacyKeyAddedByPhone", "inputPrivacyKeyVoiceMessages", "inputPrivacyKeyAbout", "inputPrivacyKeyBirthday", "inputPrivacyKeyStarGiftsAutoSave", "inputPrivacyKeyNoPaidMessages"]],
1744
+ ["PrivacyKey", ["privacyKeyStatusTimestamp", "privacyKeyChatInvite", "privacyKeyPhoneCall", "privacyKeyPhoneP2P", "privacyKeyForwards", "privacyKeyProfilePhoto", "privacyKeyPhoneNumber", "privacyKeyAddedByPhone", "privacyKeyVoiceMessages", "privacyKeyAbout", "privacyKeyBirthday", "privacyKeyStarGiftsAutoSave", "privacyKeyNoPaidMessages"]],
1739
1745
  ["InputPrivacyRule", ["inputPrivacyValueAllowContacts", "inputPrivacyValueAllowAll", "inputPrivacyValueAllowUsers", "inputPrivacyValueDisallowContacts", "inputPrivacyValueDisallowAll", "inputPrivacyValueDisallowUsers", "inputPrivacyValueAllowChatParticipants", "inputPrivacyValueDisallowChatParticipants", "inputPrivacyValueAllowCloseFriends", "inputPrivacyValueAllowPremium", "inputPrivacyValueAllowBots", "inputPrivacyValueDisallowBots"]],
1740
1746
  ["PrivacyRule", ["privacyValueAllowContacts", "privacyValueAllowAll", "privacyValueAllowUsers", "privacyValueDisallowContacts", "privacyValueDisallowAll", "privacyValueDisallowUsers", "privacyValueAllowChatParticipants", "privacyValueDisallowChatParticipants", "privacyValueAllowCloseFriends", "privacyValueAllowPremium", "privacyValueAllowBots", "privacyValueDisallowBots"]],
1741
1747
  ["account.PrivacyRules", ["account.privacyRules"]],
@@ -2058,12 +2064,11 @@ const enums = new Map([
2058
2064
  ["NotificationSound", ["notificationSoundDefault", "notificationSoundNone", "notificationSoundLocal", "notificationSoundRingtone"]],
2059
2065
  ["account.SavedRingtone", ["account.savedRingtone", "account.savedRingtoneConverted"]],
2060
2066
  ["AttachMenuPeerType", ["attachMenuPeerTypeSameBotPM", "attachMenuPeerTypeBotPM", "attachMenuPeerTypePM", "attachMenuPeerTypeChat", "attachMenuPeerTypeBroadcast"]],
2061
- ["InputInvoice", ["inputInvoiceMessage", "inputInvoiceSlug", "inputInvoicePremiumGiftCode", "inputInvoiceStars", "inputInvoiceChatInviteSubscription", "inputInvoiceStarGift", "inputInvoiceStarGiftUpgrade", "inputInvoiceStarGiftTransfer"]],
2067
+ ["InputInvoice", ["inputInvoiceMessage", "inputInvoiceSlug", "inputInvoicePremiumGiftCode", "inputInvoiceStars", "inputInvoiceChatInviteSubscription", "inputInvoiceStarGift", "inputInvoiceStarGiftUpgrade", "inputInvoiceStarGiftTransfer", "inputInvoicePremiumGiftStars"]],
2062
2068
  ["payments.ExportedInvoice", ["payments.exportedInvoice"]],
2063
2069
  ["messages.TranscribedAudio", ["messages.transcribedAudio"]],
2064
2070
  ["help.PremiumPromo", ["help.premiumPromo"]],
2065
2071
  ["InputStorePaymentPurpose", ["inputStorePaymentPremiumSubscription", "inputStorePaymentGiftPremium", "inputStorePaymentPremiumGiftCode", "inputStorePaymentPremiumGiveaway", "inputStorePaymentStarsTopup", "inputStorePaymentStarsGift", "inputStorePaymentStarsGiveaway"]],
2066
- ["PremiumGiftOption", ["premiumGiftOption"]],
2067
2072
  ["PaymentFormMethod", ["paymentFormMethod"]],
2068
2073
  ["EmojiStatus", ["emojiStatusEmpty", "emojiStatus", "emojiStatusCollectible", "inputEmojiStatusCollectible"]],
2069
2074
  ["account.EmojiStatuses", ["account.emojiStatusesNotModified", "account.emojiStatuses"]],
@@ -2242,6 +2247,8 @@ const enums = new Map([
2242
2247
  ["InputSavedStarGift", ["inputSavedStarGiftUser", "inputSavedStarGiftChat"]],
2243
2248
  ["payments.StarGiftWithdrawalUrl", ["payments.starGiftWithdrawalUrl"]],
2244
2249
  ["PaidReactionPrivacy", ["paidReactionPrivacyDefault", "paidReactionPrivacyAnonymous", "paidReactionPrivacyPeer"]],
2250
+ ["account.PaidMessagesRevenue", ["account.paidMessagesRevenue"]],
2251
+ ["RequirementToContact", ["requirementToContactEmpty", "requirementToContactPremium", "requirementToContactPaidMessages"]],
2245
2252
  ]);
2246
2253
  const types = new Map([
2247
2254
  [
@@ -3342,7 +3349,7 @@ const types = new Map([
3342
3349
  [
3343
3350
  "user",
3344
3351
  [
3345
- 0x4B46C37E,
3352
+ 0x020B1422,
3346
3353
  [
3347
3354
  ["flags", exports.flags, "#"],
3348
3355
  ["self", "true", "flags.10?true"],
@@ -3390,6 +3397,7 @@ const types = new Map([
3390
3397
  ["profile_color", "PeerColor", "flags2.9?PeerColor"],
3391
3398
  ["bot_active_users", "number", "flags2.12?int"],
3392
3399
  ["bot_verification_icon", "bigint", "flags2.14?long"],
3400
+ ["send_paid_messages_stars", "bigint", "flags2.15?long"],
3393
3401
  ],
3394
3402
  ],
3395
3403
  ],
@@ -3515,7 +3523,7 @@ const types = new Map([
3515
3523
  [
3516
3524
  "channel",
3517
3525
  [
3518
- 0xE00998B7,
3526
+ 0x7482147E,
3519
3527
  [
3520
3528
  ["flags", exports.flags, "#"],
3521
3529
  ["creator", "true", "flags.0?true"],
@@ -3562,6 +3570,7 @@ const types = new Map([
3562
3570
  ["level", "number", "flags2.10?int"],
3563
3571
  ["subscription_until_date", "number", "flags2.11?int"],
3564
3572
  ["bot_verification_icon", "bigint", "flags2.13?long"],
3573
+ ["send_paid_messages_stars", "bigint", "flags2.14?long"],
3565
3574
  ],
3566
3575
  ],
3567
3576
  ],
@@ -3636,6 +3645,7 @@ const types = new Map([
3636
3645
  ["can_view_stars_revenue", "true", "flags2.15?true"],
3637
3646
  ["paid_reactions_available", "true", "flags2.16?true"],
3638
3647
  ["stargifts_available", "true", "flags2.19?true"],
3648
+ ["paid_messages_available", "true", "flags2.20?true"],
3639
3649
  ["id", "bigint", "long"],
3640
3650
  ["about", "string", "string"],
3641
3651
  ["participants_count", "number", "flags.0?int"],
@@ -3769,7 +3779,7 @@ const types = new Map([
3769
3779
  [
3770
3780
  "message",
3771
3781
  [
3772
- 0x96FDBBE9,
3782
+ 0xEABCDD4D,
3773
3783
  [
3774
3784
  ["flags", exports.flags, "#"],
3775
3785
  ["out", "true", "flags.1?true"],
@@ -3813,6 +3823,7 @@ const types = new Map([
3813
3823
  ["effect", "bigint", "flags2.2?long"],
3814
3824
  ["factcheck", "FactCheck", "flags2.3?FactCheck"],
3815
3825
  ["report_delivery_until_date", "number", "flags2.5?int"],
3826
+ ["paid_message_stars", "bigint", "flags2.6?long"],
3816
3827
  ],
3817
3828
  ],
3818
3829
  ],
@@ -4446,7 +4457,7 @@ const types = new Map([
4446
4457
  [
4447
4458
  ["flags", exports.flags, "#"],
4448
4459
  ["via_giveaway", "true", "flags.0?true"],
4449
- ["unclaimed", "true", "flags.2?true"],
4460
+ ["unclaimed", "true", "flags.5?true"],
4450
4461
  ["boost_peer", "Peer", "flags.1?Peer"],
4451
4462
  ["months", "number", "int"],
4452
4463
  ["slug", "string", "string"],
@@ -4871,7 +4882,7 @@ const types = new Map([
4871
4882
  [
4872
4883
  "peerSettings",
4873
4884
  [
4874
- 0xACD66C5E,
4885
+ 0xF47741F7,
4875
4886
  [
4876
4887
  ["flags", exports.flags, "#"],
4877
4888
  ["report_spam", "true", "flags.0?true"],
@@ -4890,6 +4901,11 @@ const types = new Map([
4890
4901
  ["request_chat_date", "number", "flags.9?int"],
4891
4902
  ["business_bot_id", "bigint", "flags.13?long"],
4892
4903
  ["business_bot_manage_url", "string", "flags.13?string"],
4904
+ ["charge_paid_message_stars", "bigint", "flags.14?long"],
4905
+ ["registration_month", "string", "flags.15?string"],
4906
+ ["phone_country", "string", "flags.16?string"],
4907
+ ["name_change_date", "number", "flags.17?int"],
4908
+ ["photo_change_date", "number", "flags.18?int"],
4893
4909
  ],
4894
4910
  ],
4895
4911
  ],
@@ -4997,7 +5013,7 @@ const types = new Map([
4997
5013
  [
4998
5014
  "userFull",
4999
5015
  [
5000
- 0x4D975BBC,
5016
+ 0xD2234EA0,
5001
5017
  [
5002
5018
  ["flags", exports.flags, "#"],
5003
5019
  ["blocked", "true", "flags.0?true"],
@@ -5033,7 +5049,6 @@ const types = new Map([
5033
5049
  ["private_forward_name", "string", "flags.16?string"],
5034
5050
  ["bot_group_admin_rights", "ChatAdminRights", "flags.17?ChatAdminRights"],
5035
5051
  ["bot_broadcast_admin_rights", "ChatAdminRights", "flags.18?ChatAdminRights"],
5036
- ["premium_gifts", ["PremiumGiftOption"], "flags.19?Vector<PremiumGiftOption>"],
5037
5052
  ["wallpaper", "WallPaper", "flags.24?WallPaper"],
5038
5053
  ["stories", "PeerStories", "flags.25?PeerStories"],
5039
5054
  ["business_work_hours", "BusinessWorkHours", "flags2.0?BusinessWorkHours"],
@@ -5047,6 +5062,7 @@ const types = new Map([
5047
5062
  ["stargifts_count", "number", "flags2.8?int"],
5048
5063
  ["starref_program", "StarRefProgram", "flags2.11?StarRefProgram"],
5049
5064
  ["bot_verification", "BotVerification", "flags2.12?BotVerification"],
5065
+ ["send_paid_messages_stars", "bigint", "flags2.14?long"],
5050
5066
  ],
5051
5067
  ],
5052
5068
  ],
@@ -7783,6 +7799,13 @@ const types = new Map([
7783
7799
  [],
7784
7800
  ],
7785
7801
  ],
7802
+ [
7803
+ "inputPrivacyKeyNoPaidMessages",
7804
+ [
7805
+ 0xBDC597B4,
7806
+ [],
7807
+ ],
7808
+ ],
7786
7809
  [
7787
7810
  "privacyKeyStatusTimestamp",
7788
7811
  [
@@ -7867,6 +7890,13 @@ const types = new Map([
7867
7890
  [],
7868
7891
  ],
7869
7892
  ],
7893
+ [
7894
+ "privacyKeyNoPaidMessages",
7895
+ [
7896
+ 0x17D348D2,
7897
+ [],
7898
+ ],
7899
+ ],
7870
7900
  [
7871
7901
  "inputPrivacyValueAllowContacts",
7872
7902
  [
@@ -13873,7 +13903,7 @@ const types = new Map([
13873
13903
  [
13874
13904
  "globalPrivacySettings",
13875
13905
  [
13876
- 0x734C4CCB,
13906
+ 0xC9D8DF1C,
13877
13907
  [
13878
13908
  ["flags", exports.flags, "#"],
13879
13909
  ["archive_and_mute_new_noncontact_peers", "true", "flags.0?true"],
@@ -13881,6 +13911,7 @@ const types = new Map([
13881
13911
  ["keep_archived_folders", "true", "flags.2?true"],
13882
13912
  ["hide_read_marks", "true", "flags.3?true"],
13883
13913
  ["new_noncontact_peers_require_premium", "true", "flags.4?true"],
13914
+ ["noncontact_peers_paid_stars", "bigint", "flags.5?long"],
13884
13915
  ],
13885
13916
  ],
13886
13917
  ],
@@ -14990,6 +15021,18 @@ const types = new Map([
14990
15021
  ],
14991
15022
  ],
14992
15023
  ],
15024
+ [
15025
+ "inputInvoicePremiumGiftStars",
15026
+ [
15027
+ 0xDABAB2EF,
15028
+ [
15029
+ ["flags", exports.flags, "#"],
15030
+ ["user_id", "InputUser", "InputUser"],
15031
+ ["months", "number", "int"],
15032
+ ["message", "TextWithEntities", "flags.0?TextWithEntities"],
15033
+ ],
15034
+ ],
15035
+ ],
14993
15036
  [
14994
15037
  "payments.exportedInvoice",
14995
15038
  [
@@ -15126,20 +15169,6 @@ const types = new Map([
15126
15169
  ],
15127
15170
  ],
15128
15171
  ],
15129
- [
15130
- "premiumGiftOption",
15131
- [
15132
- 0x74C34319,
15133
- [
15134
- ["flags", exports.flags, "#"],
15135
- ["months", "number", "int"],
15136
- ["currency", "string", "string"],
15137
- ["amount", "bigint", "long"],
15138
- ["bot_url", "string", "string"],
15139
- ["store_product", "string", "flags.0?string"],
15140
- ],
15141
- ],
15142
- ],
15143
15172
  [
15144
15173
  "paymentFormMethod",
15145
15174
  [
@@ -17497,7 +17526,7 @@ const types = new Map([
17497
17526
  [
17498
17527
  "starsTransaction",
17499
17528
  [
17500
- 0x64DFC926,
17529
+ 0xA39FD94A,
17501
17530
  [
17502
17531
  ["flags", exports.flags, "#"],
17503
17532
  ["refund", "true", "flags.3?true"],
@@ -17525,6 +17554,8 @@ const types = new Map([
17525
17554
  ["starref_commission_permille", "number", "flags.16?int"],
17526
17555
  ["starref_peer", "Peer", "flags.17?Peer"],
17527
17556
  ["starref_amount", "StarsAmount", "flags.17?StarsAmount"],
17557
+ ["paid_messages", "number", "flags.19?int"],
17558
+ ["premium_gift_months", "number", "flags.20?int"],
17528
17559
  ],
17529
17560
  ],
17530
17561
  ],
@@ -18106,6 +18137,7 @@ const types = new Map([
18106
18137
  ["unsaved", "true", "flags.5?true"],
18107
18138
  ["refunded", "true", "flags.9?true"],
18108
18139
  ["can_upgrade", "true", "flags.10?true"],
18140
+ ["pinned_to_top", "true", "flags.12?true"],
18109
18141
  ["from_id", "Peer", "flags.1?Peer"],
18110
18142
  ["date", "number", "int"],
18111
18143
  ["gift", "StarGift", "StarGift"],
@@ -18185,6 +18217,38 @@ const types = new Map([
18185
18217
  ],
18186
18218
  ],
18187
18219
  ],
18220
+ [
18221
+ "account.paidMessagesRevenue",
18222
+ [
18223
+ 0x1E109708,
18224
+ [
18225
+ ["stars_amount", "bigint", "long"],
18226
+ ],
18227
+ ],
18228
+ ],
18229
+ [
18230
+ "requirementToContactEmpty",
18231
+ [
18232
+ 0x050A9839,
18233
+ [],
18234
+ ],
18235
+ ],
18236
+ [
18237
+ "requirementToContactPremium",
18238
+ [
18239
+ 0xE581E4E9,
18240
+ [],
18241
+ ],
18242
+ ],
18243
+ [
18244
+ "requirementToContactPaidMessages",
18245
+ [
18246
+ 0xB4F67E93,
18247
+ [
18248
+ ["stars_amount", "bigint", "long"],
18249
+ ],
18250
+ ],
18251
+ ],
18188
18252
  [
18189
18253
  "req_pq_multi",
18190
18254
  [
@@ -19752,6 +19816,26 @@ const types = new Map([
19752
19816
  ],
19753
19817
  ],
19754
19818
  ],
19819
+ [
19820
+ "account.addNoPaidMessagesException",
19821
+ [
19822
+ 0x6F688AA7,
19823
+ [
19824
+ ["flags", exports.flags, "#"],
19825
+ ["refund_charged", "true", "flags.0?true"],
19826
+ ["user_id", "InputUser", "InputUser"],
19827
+ ],
19828
+ ],
19829
+ ],
19830
+ [
19831
+ "account.getPaidMessagesRevenue",
19832
+ [
19833
+ 0xF1266F38,
19834
+ [
19835
+ ["user_id", "InputUser", "InputUser"],
19836
+ ],
19837
+ ],
19838
+ ],
19755
19839
  [
19756
19840
  "users.getUsers",
19757
19841
  [
@@ -19781,9 +19865,9 @@ const types = new Map([
19781
19865
  ],
19782
19866
  ],
19783
19867
  [
19784
- "users.getIsPremiumRequiredToContact",
19868
+ "users.getRequirementsToContact",
19785
19869
  [
19786
- 0xA622AA10,
19870
+ 0xD89A83A3,
19787
19871
  [
19788
19872
  ["id", ["InputUser"], "Vector<InputUser>"],
19789
19873
  ],
@@ -20176,7 +20260,7 @@ const types = new Map([
20176
20260
  [
20177
20261
  "messages.sendMessage",
20178
20262
  [
20179
- 0x983F9745,
20263
+ 0xFBF2340A,
20180
20264
  [
20181
20265
  ["flags", exports.flags, "#"],
20182
20266
  ["no_webpage", "true", "flags.1?true"],
@@ -20197,13 +20281,14 @@ const types = new Map([
20197
20281
  ["send_as", "InputPeer", "flags.13?InputPeer"],
20198
20282
  ["quick_reply_shortcut", "InputQuickReplyShortcut", "flags.17?InputQuickReplyShortcut"],
20199
20283
  ["effect", "bigint", "flags.18?long"],
20284
+ ["allow_paid_stars", "bigint", "flags.21?long"],
20200
20285
  ],
20201
20286
  ],
20202
20287
  ],
20203
20288
  [
20204
20289
  "messages.sendMedia",
20205
20290
  [
20206
- 0x7852834E,
20291
+ 0xA550CD78,
20207
20292
  [
20208
20293
  ["flags", exports.flags, "#"],
20209
20294
  ["silent", "true", "flags.5?true"],
@@ -20224,13 +20309,14 @@ const types = new Map([
20224
20309
  ["send_as", "InputPeer", "flags.13?InputPeer"],
20225
20310
  ["quick_reply_shortcut", "InputQuickReplyShortcut", "flags.17?InputQuickReplyShortcut"],
20226
20311
  ["effect", "bigint", "flags.18?long"],
20312
+ ["allow_paid_stars", "bigint", "flags.21?long"],
20227
20313
  ],
20228
20314
  ],
20229
20315
  ],
20230
20316
  [
20231
20317
  "messages.forwardMessages",
20232
20318
  [
20233
- 0x6D74DA08,
20319
+ 0xBB9FA475,
20234
20320
  [
20235
20321
  ["flags", exports.flags, "#"],
20236
20322
  ["silent", "true", "flags.5?true"],
@@ -20249,6 +20335,7 @@ const types = new Map([
20249
20335
  ["send_as", "InputPeer", "flags.13?InputPeer"],
20250
20336
  ["quick_reply_shortcut", "InputQuickReplyShortcut", "flags.17?InputQuickReplyShortcut"],
20251
20337
  ["video_timestamp", "number", "flags.20?int"],
20338
+ ["allow_paid_stars", "bigint", "flags.21?long"],
20252
20339
  ],
20253
20340
  ],
20254
20341
  ],
@@ -20716,7 +20803,7 @@ const types = new Map([
20716
20803
  [
20717
20804
  "messages.sendInlineBotResult",
20718
20805
  [
20719
- 0x3EBEE86A,
20806
+ 0xC0CF7646,
20720
20807
  [
20721
20808
  ["flags", exports.flags, "#"],
20722
20809
  ["silent", "true", "flags.5?true"],
@@ -20731,6 +20818,7 @@ const types = new Map([
20731
20818
  ["schedule_date", "number", "flags.10?int"],
20732
20819
  ["send_as", "InputPeer", "flags.13?InputPeer"],
20733
20820
  ["quick_reply_shortcut", "InputQuickReplyShortcut", "flags.17?InputQuickReplyShortcut"],
20821
+ ["allow_paid_stars", "bigint", "flags.21?long"],
20734
20822
  ],
20735
20823
  ],
20736
20824
  ],
@@ -21132,7 +21220,7 @@ const types = new Map([
21132
21220
  [
21133
21221
  "messages.sendMultiMedia",
21134
21222
  [
21135
- 0x37B74355,
21223
+ 0x1BF89D74,
21136
21224
  [
21137
21225
  ["flags", exports.flags, "#"],
21138
21226
  ["silent", "true", "flags.5?true"],
@@ -21149,6 +21237,7 @@ const types = new Map([
21149
21237
  ["send_as", "InputPeer", "flags.13?InputPeer"],
21150
21238
  ["quick_reply_shortcut", "InputQuickReplyShortcut", "flags.17?InputQuickReplyShortcut"],
21151
21239
  ["effect", "bigint", "flags.18?long"],
21240
+ ["allow_paid_stars", "bigint", "flags.21?long"],
21152
21241
  ],
21153
21242
  ],
21154
21243
  ],
@@ -23687,6 +23776,16 @@ const types = new Map([
23687
23776
  ],
23688
23777
  ],
23689
23778
  ],
23779
+ [
23780
+ "channels.updatePaidMessagesPrice",
23781
+ [
23782
+ 0xFC84653F,
23783
+ [
23784
+ ["channel", "InputChannel", "InputChannel"],
23785
+ ["send_paid_messages_stars", "bigint", "long"],
23786
+ ],
23787
+ ],
23788
+ ],
23690
23789
  [
23691
23790
  "bots.sendCustomRequest",
23692
23791
  [
@@ -24489,6 +24588,16 @@ const types = new Map([
24489
24588
  ],
24490
24589
  ],
24491
24590
  ],
24591
+ [
24592
+ "payments.toggleStarGiftsPinnedToTop",
24593
+ [
24594
+ 0x1513E7B0,
24595
+ [
24596
+ ["peer", "InputPeer", "InputPeer"],
24597
+ ["stargift", ["InputSavedStarGift"], "Vector<InputSavedStarGift>"],
24598
+ ],
24599
+ ],
24600
+ ],
24492
24601
  [
24493
24602
  "stickers.createStickerSet",
24494
24603
  [
@@ -0,0 +1,27 @@
1
+ import { Api } from "../2_tl.js";
2
+ import { User } from "./1_user.js";
3
+ export interface ChatSettings {
4
+ report: boolean;
5
+ addToContacts: boolean;
6
+ block: boolean;
7
+ shareContact: boolean;
8
+ contactsException: boolean;
9
+ reportLocation: boolean;
10
+ unarchive: boolean;
11
+ inviteMembers: boolean;
12
+ channelJoinRequest: boolean;
13
+ businessBotPaused: boolean;
14
+ businessBotCanReply: boolean;
15
+ distance?: number;
16
+ joinRequestChatTitle?: string;
17
+ joinRequestDate?: Date;
18
+ businessBot?: User;
19
+ businessBotUrl?: string;
20
+ messagePrice?: number;
21
+ registrationMonth?: string;
22
+ phoneCountry?: string;
23
+ nameChangeDate?: Date;
24
+ photoChangeDate?: Date;
25
+ }
26
+ export declare function constructChatSettings(settings_: Api.messages_peerSettings): ChatSettings;
27
+ //# sourceMappingURL=2_chat_settings.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"2_chat_settings.d.ts","sourceRoot":"","sources":["../../src/types/2_chat_settings.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,GAAG,EAAM,MAAM,YAAY,CAAC;AACrC,OAAO,EAAiB,IAAI,EAAE,MAAM,aAAa,CAAC;AAElD,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,OAAO,CAAC;IAChB,aAAa,EAAE,OAAO,CAAC;IACvB,KAAK,EAAE,OAAO,CAAC;IACf,YAAY,EAAE,OAAO,CAAC;IACtB,iBAAiB,EAAE,OAAO,CAAC;IAC3B,cAAc,EAAE,OAAO,CAAC;IACxB,SAAS,EAAE,OAAO,CAAC;IACnB,aAAa,EAAE,OAAO,CAAC;IACvB,kBAAkB,EAAE,OAAO,CAAC;IAC5B,iBAAiB,EAAE,OAAO,CAAC;IAC3B,mBAAmB,EAAE,OAAO,CAAC;IAC7B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,eAAe,CAAC,EAAE,IAAI,CAAC;IACvB,WAAW,CAAC,EAAE,IAAI,CAAC;IACnB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,cAAc,CAAC,EAAE,IAAI,CAAC;IACtB,eAAe,CAAC,EAAE,IAAI,CAAC;CACxB;AAED,wBAAgB,qBAAqB,CAAC,SAAS,EAAE,GAAG,CAAC,qBAAqB,GAAG,YAAY,CA4BxF"}
@@ -0,0 +1,35 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.constructChatSettings = constructChatSettings;
4
+ const _1_utilities_js_1 = require("../1_utilities.js");
5
+ const _2_tl_js_1 = require("../2_tl.js");
6
+ const _1_user_js_1 = require("./1_user.js");
7
+ function constructChatSettings(settings_) {
8
+ const settings = {
9
+ report: settings_.settings.report_spam || false,
10
+ addToContacts: settings_.settings.add_contact || false,
11
+ block: settings_.settings.block_contact || false,
12
+ shareContact: settings_.settings.share_contact || false,
13
+ contactsException: settings_.settings.need_contacts_exception || false,
14
+ reportLocation: settings_.settings.report_geo || false,
15
+ unarchive: settings_.settings.autoarchived || false,
16
+ inviteMembers: settings_.settings.invite_members || false,
17
+ channelJoinRequest: settings_.settings.request_chat_broadcast || false,
18
+ businessBotPaused: settings_.settings.business_bot_paused || false,
19
+ businessBotCanReply: settings_.settings.business_bot_can_reply || false,
20
+ distance: settings_.settings.geo_distance,
21
+ joinRequestChatTitle: settings_.settings.request_chat_title,
22
+ joinRequestDate: settings_.settings.request_chat_date ? (0, _1_utilities_js_1.fromUnixTimestamp)(settings_.settings.request_chat_date) : undefined,
23
+ businessBotUrl: settings_.settings.business_bot_manage_url,
24
+ messagePrice: settings_.settings.charge_paid_message_stars ? Number(settings_.settings.charge_paid_message_stars) : undefined,
25
+ registrationMonth: settings_.settings.registration_month,
26
+ phoneCountry: settings_.settings.phone_country,
27
+ nameChangeDate: settings_.settings.name_change_date ? (0, _1_utilities_js_1.fromUnixTimestamp)(settings_.settings.name_change_date) : undefined,
28
+ photoChangeDate: settings_.settings.photo_change_date ? (0, _1_utilities_js_1.fromUnixTimestamp)(settings_.settings.photo_change_date) : undefined,
29
+ };
30
+ const bot = settings_.users.find((v) => v.id == settings_.settings.business_bot_id);
31
+ if ((0, _2_tl_js_1.is)("user", bot)) {
32
+ settings.businessBot = (0, _1_user_js_1.constructUser)(bot);
33
+ }
34
+ return (0, _1_utilities_js_1.cleanObject)(settings);
35
+ }
@@ -1 +1 @@
1
- {"version":3,"file":"5_chat_list_item.d.ts","sourceRoot":"","sources":["../../src/types/5_chat_list_item.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAGH,OAAO,EAAE,GAAG,EAAkC,MAAM,YAAY,CAAC;AACjE,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,EAAE,KAAK,EAAkB,MAAM,eAAe,CAAC;AACtD,OAAO,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AACtD,OAAO,EAAoB,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAE1E,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,KAAK,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IAC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EAAE,YAAY,GAAG,OAAO,CAAC,YAAY,GAAG,IAAI,CAAC,CAW5L;AAED,wBAAsB,sBAAsB,CAAC,MAAM,EAAE,GAAG,CAAC,MAAM,EAAE,OAAO,EAAE,GAAG,CAAC,gBAAgB,GAAG,GAAG,CAAC,qBAAqB,EAAE,WAAW,EAAE,MAAM,EAAE,EAAE,SAAS,EAAE,YAAY,EAAE,UAAU,EAAE,aAAa,EAAE,iBAAiB,EAAE,oBAAoB,GAAG,OAAO,CAAC,YAAY,CAAC,CAqBrQ"}
@@ -25,6 +25,7 @@ exports.constructChatListItem2 = constructChatListItem2;
25
25
  exports.constructChatListItem3 = constructChatListItem3;
26
26
  exports.constructChatListItem4 = constructChatListItem4;
27
27
  const _0_deps_js_1 = require("../0_deps.js");
28
+ const _1_utilities_js_1 = require("../1_utilities.js");
28
29
  const _2_tl_js_1 = require("../2_tl.js");
29
30
  const _1_chat_p_js_1 = require("./1_chat_p.js");
30
31
  const _4_message_js_1 = require("./4_message.js");
@@ -42,12 +43,12 @@ async function constructChatListItem(chatId, pinned, lastMessageId, getEntity, g
42
43
  }
43
44
  const lastMessage_ = lastMessageId > 0 ? await getMessage(chatId, lastMessageId) : null;
44
45
  const lastMessage = lastMessage_ == null ? undefined : lastMessage_;
45
- return {
46
+ return (0, _1_utilities_js_1.cleanObject)({
46
47
  chat: (0, _1_chat_p_js_1.constructChatP)(entity),
47
48
  order: getChatListItemOrder(lastMessage, pinned),
48
49
  pinned,
49
50
  lastMessage,
50
- };
51
+ });
51
52
  }
52
53
  function constructChatListItem2(entity, pinned, lastMessage) {
53
54
  return {