@mtcute/core 0.27.2 → 0.27.4

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 (139) hide show
  1. package/client.cjs +80 -68
  2. package/client.js +80 -68
  3. package/highlevel/base.cjs +4 -0
  4. package/highlevel/base.d.cts +1 -0
  5. package/highlevel/base.d.ts +1 -0
  6. package/highlevel/base.js +4 -0
  7. package/highlevel/client.d.cts +484 -420
  8. package/highlevel/client.d.ts +484 -420
  9. package/highlevel/methods/files/download-iterable.cjs +4 -0
  10. package/highlevel/methods/files/download-iterable.d.cts +11 -1
  11. package/highlevel/methods/files/download-iterable.d.ts +11 -1
  12. package/highlevel/methods/files/download-iterable.js +4 -0
  13. package/highlevel/methods/files/download-stream.cjs +14 -0
  14. package/highlevel/methods/files/download-stream.d.cts +13 -2
  15. package/highlevel/methods/files/download-stream.d.ts +13 -2
  16. package/highlevel/methods/files/download-stream.js +14 -0
  17. package/highlevel/methods/gifts/get-star-gift-upgrade-options.cjs +30 -0
  18. package/highlevel/methods/gifts/get-star-gift-upgrade-options.d.cts +12 -0
  19. package/highlevel/methods/gifts/get-star-gift-upgrade-options.d.ts +12 -0
  20. package/highlevel/methods/gifts/get-star-gift-upgrade-options.js +25 -0
  21. package/highlevel/methods/gifts/resolve-star-gift-offer.cjs +17 -0
  22. package/highlevel/methods/gifts/resolve-star-gift-offer.d.cts +18 -0
  23. package/highlevel/methods/gifts/resolve-star-gift-offer.d.ts +18 -0
  24. package/highlevel/methods/gifts/resolve-star-gift-offer.js +12 -0
  25. package/highlevel/methods/gifts/send-star-gift-offer.cjs +26 -0
  26. package/highlevel/methods/gifts/send-star-gift-offer.d.cts +26 -0
  27. package/highlevel/methods/gifts/send-star-gift-offer.d.ts +26 -0
  28. package/highlevel/methods/gifts/send-star-gift-offer.js +21 -0
  29. package/highlevel/methods/{premium → gifts}/set-gift-resale-price.cjs +2 -5
  30. package/highlevel/methods/{premium → gifts}/set-gift-resale-price.d.cts +2 -2
  31. package/highlevel/methods/{premium → gifts}/set-gift-resale-price.d.ts +2 -2
  32. package/highlevel/methods/{premium → gifts}/set-gift-resale-price.js +2 -5
  33. package/highlevel/methods/premium/_normalize-stars-amount.cjs +18 -0
  34. package/highlevel/methods/premium/_normalize-stars-amount.d.cts +12 -0
  35. package/highlevel/methods/premium/_normalize-stars-amount.d.ts +12 -0
  36. package/highlevel/methods/premium/_normalize-stars-amount.js +13 -0
  37. package/highlevel/methods.d.cts +23 -18
  38. package/highlevel/methods.d.ts +23 -18
  39. package/highlevel/types/media/document-utils.cjs +1 -1
  40. package/highlevel/types/media/document-utils.js +1 -1
  41. package/highlevel/types/media/voice.cjs +6 -1
  42. package/highlevel/types/media/voice.d.cts +4 -1
  43. package/highlevel/types/media/voice.d.ts +4 -1
  44. package/highlevel/types/media/voice.js +6 -1
  45. package/highlevel/types/messages/message-action.cjs +27 -4
  46. package/highlevel/types/messages/message-action.d.cts +28 -1
  47. package/highlevel/types/messages/message-action.d.ts +28 -1
  48. package/highlevel/types/messages/message-action.js +27 -4
  49. package/highlevel/types/premium/saved-star-gift.cjs +4 -0
  50. package/highlevel/types/premium/saved-star-gift.d.cts +2 -0
  51. package/highlevel/types/premium/saved-star-gift.d.ts +2 -0
  52. package/highlevel/types/premium/saved-star-gift.js +4 -0
  53. package/highlevel/types/premium/star-gift-unique.cjs +8 -0
  54. package/highlevel/types/premium/star-gift-unique.d.cts +4 -0
  55. package/highlevel/types/premium/star-gift-unique.d.ts +4 -0
  56. package/highlevel/types/premium/star-gift-unique.js +8 -0
  57. package/highlevel/types/premium/star-gift.cjs +12 -3
  58. package/highlevel/types/premium/star-gift.d.cts +5 -0
  59. package/highlevel/types/premium/star-gift.d.ts +5 -0
  60. package/highlevel/types/premium/star-gift.js +12 -3
  61. package/highlevel/types/premium/stars-transaction.cjs +6 -0
  62. package/highlevel/types/premium/stars-transaction.d.cts +6 -0
  63. package/highlevel/types/premium/stars-transaction.d.ts +6 -0
  64. package/highlevel/types/premium/stars-transaction.js +6 -0
  65. package/highlevel/updates/manager.cjs +7 -0
  66. package/highlevel/updates/manager.js +7 -0
  67. package/methods.cjs +40 -34
  68. package/methods.js +23 -17
  69. package/network/middlewares/internal-errors.cjs +5 -0
  70. package/network/middlewares/internal-errors.js +5 -0
  71. package/network/network-manager.cjs +1 -1
  72. package/network/network-manager.js +1 -1
  73. package/package.json +2 -2
  74. package/utils/binary/compat.cjs +12 -0
  75. package/utils/binary/compat.js +12 -0
  76. /package/highlevel/methods/{premium → gifts}/_normalize-input-star-gift.cjs +0 -0
  77. /package/highlevel/methods/{premium → gifts}/_normalize-input-star-gift.d.cts +0 -0
  78. /package/highlevel/methods/{premium → gifts}/_normalize-input-star-gift.d.ts +0 -0
  79. /package/highlevel/methods/{premium → gifts}/_normalize-input-star-gift.js +0 -0
  80. /package/highlevel/methods/{premium → gifts}/accept-star-gift.cjs +0 -0
  81. /package/highlevel/methods/{premium → gifts}/accept-star-gift.d.cts +0 -0
  82. /package/highlevel/methods/{premium → gifts}/accept-star-gift.d.ts +0 -0
  83. /package/highlevel/methods/{premium → gifts}/accept-star-gift.js +0 -0
  84. /package/highlevel/methods/{premium → gifts}/buy-resale-gift.cjs +0 -0
  85. /package/highlevel/methods/{premium → gifts}/buy-resale-gift.d.cts +0 -0
  86. /package/highlevel/methods/{premium → gifts}/buy-resale-gift.d.ts +0 -0
  87. /package/highlevel/methods/{premium → gifts}/buy-resale-gift.js +0 -0
  88. /package/highlevel/methods/{premium → gifts}/get-resale-star-gifts.cjs +0 -0
  89. /package/highlevel/methods/{premium → gifts}/get-resale-star-gifts.d.cts +0 -0
  90. /package/highlevel/methods/{premium → gifts}/get-resale-star-gifts.d.ts +0 -0
  91. /package/highlevel/methods/{premium → gifts}/get-resale-star-gifts.js +0 -0
  92. /package/highlevel/methods/{premium → gifts}/get-saved-star-gifts-by-id.cjs +0 -0
  93. /package/highlevel/methods/{premium → gifts}/get-saved-star-gifts-by-id.d.cts +0 -0
  94. /package/highlevel/methods/{premium → gifts}/get-saved-star-gifts-by-id.d.ts +0 -0
  95. /package/highlevel/methods/{premium → gifts}/get-saved-star-gifts-by-id.js +0 -0
  96. /package/highlevel/methods/{premium → gifts}/get-saved-star-gifts.cjs +0 -0
  97. /package/highlevel/methods/{premium → gifts}/get-saved-star-gifts.d.cts +0 -0
  98. /package/highlevel/methods/{premium → gifts}/get-saved-star-gifts.d.ts +0 -0
  99. /package/highlevel/methods/{premium → gifts}/get-saved-star-gifts.js +0 -0
  100. /package/highlevel/methods/{premium → gifts}/get-star-gift-options.cjs +0 -0
  101. /package/highlevel/methods/{premium → gifts}/get-star-gift-options.d.cts +0 -0
  102. /package/highlevel/methods/{premium → gifts}/get-star-gift-options.d.ts +0 -0
  103. /package/highlevel/methods/{premium → gifts}/get-star-gift-options.js +0 -0
  104. /package/highlevel/methods/{premium → gifts}/get-star-gift-value.cjs +0 -0
  105. /package/highlevel/methods/{premium → gifts}/get-star-gift-value.d.cts +0 -0
  106. /package/highlevel/methods/{premium → gifts}/get-star-gift-value.d.ts +0 -0
  107. /package/highlevel/methods/{premium → gifts}/get-star-gift-value.js +0 -0
  108. /package/highlevel/methods/{premium → gifts}/get-star-gift-withdrawal-url.cjs +0 -0
  109. /package/highlevel/methods/{premium → gifts}/get-star-gift-withdrawal-url.d.cts +0 -0
  110. /package/highlevel/methods/{premium → gifts}/get-star-gift-withdrawal-url.d.ts +0 -0
  111. /package/highlevel/methods/{premium → gifts}/get-star-gift-withdrawal-url.js +0 -0
  112. /package/highlevel/methods/{premium → gifts}/get-unique-star-gift.cjs +0 -0
  113. /package/highlevel/methods/{premium → gifts}/get-unique-star-gift.d.cts +0 -0
  114. /package/highlevel/methods/{premium → gifts}/get-unique-star-gift.d.ts +0 -0
  115. /package/highlevel/methods/{premium → gifts}/get-unique-star-gift.js +0 -0
  116. /package/highlevel/methods/{premium → gifts}/iter-saved-star-gifts.cjs +0 -0
  117. /package/highlevel/methods/{premium → gifts}/iter-saved-star-gifts.d.cts +0 -0
  118. /package/highlevel/methods/{premium → gifts}/iter-saved-star-gifts.d.ts +0 -0
  119. /package/highlevel/methods/{premium → gifts}/iter-saved-star-gifts.js +0 -0
  120. /package/highlevel/methods/{premium → gifts}/pin-star-gift.cjs +0 -0
  121. /package/highlevel/methods/{premium → gifts}/pin-star-gift.d.cts +0 -0
  122. /package/highlevel/methods/{premium → gifts}/pin-star-gift.d.ts +0 -0
  123. /package/highlevel/methods/{premium → gifts}/pin-star-gift.js +0 -0
  124. /package/highlevel/methods/{premium → gifts}/prepay-star-gift-upgrade.cjs +0 -0
  125. /package/highlevel/methods/{premium → gifts}/prepay-star-gift-upgrade.d.cts +0 -0
  126. /package/highlevel/methods/{premium → gifts}/prepay-star-gift-upgrade.d.ts +0 -0
  127. /package/highlevel/methods/{premium → gifts}/prepay-star-gift-upgrade.js +0 -0
  128. /package/highlevel/methods/{premium → gifts}/send-star-gift.cjs +0 -0
  129. /package/highlevel/methods/{premium → gifts}/send-star-gift.d.cts +0 -0
  130. /package/highlevel/methods/{premium → gifts}/send-star-gift.d.ts +0 -0
  131. /package/highlevel/methods/{premium → gifts}/send-star-gift.js +0 -0
  132. /package/highlevel/methods/{premium → gifts}/transfer-star-gift.cjs +0 -0
  133. /package/highlevel/methods/{premium → gifts}/transfer-star-gift.d.cts +0 -0
  134. /package/highlevel/methods/{premium → gifts}/transfer-star-gift.d.ts +0 -0
  135. /package/highlevel/methods/{premium → gifts}/transfer-star-gift.js +0 -0
  136. /package/highlevel/methods/{premium → gifts}/upgrade-star-gift.cjs +0 -0
  137. /package/highlevel/methods/{premium → gifts}/upgrade-star-gift.d.cts +0 -0
  138. /package/highlevel/methods/{premium → gifts}/upgrade-star-gift.d.ts +0 -0
  139. /package/highlevel/methods/{premium → gifts}/upgrade-star-gift.js +0 -0
package/client.cjs CHANGED
@@ -120,6 +120,26 @@ const toggleForumTopicClosed = require("./highlevel/methods/forums/toggle-forum-
120
120
  const toggleForumTopicPinned = require("./highlevel/methods/forums/toggle-forum-topic-pinned.cjs");
121
121
  const toggleForum = require("./highlevel/methods/forums/toggle-forum.cjs");
122
122
  const toggleGeneralTopicHidden = require("./highlevel/methods/forums/toggle-general-topic-hidden.cjs");
123
+ const _normalizeInputStarGift = require("./highlevel/methods/gifts/_normalize-input-star-gift.cjs");
124
+ const acceptStarGift = require("./highlevel/methods/gifts/accept-star-gift.cjs");
125
+ const buyResaleGift = require("./highlevel/methods/gifts/buy-resale-gift.cjs");
126
+ const getResaleStarGifts = require("./highlevel/methods/gifts/get-resale-star-gifts.cjs");
127
+ const getSavedStarGiftsById = require("./highlevel/methods/gifts/get-saved-star-gifts-by-id.cjs");
128
+ const getSavedStarGifts = require("./highlevel/methods/gifts/get-saved-star-gifts.cjs");
129
+ const getStarGiftOptions = require("./highlevel/methods/gifts/get-star-gift-options.cjs");
130
+ const getStarGiftUpgradeOptions = require("./highlevel/methods/gifts/get-star-gift-upgrade-options.cjs");
131
+ const getStarGiftValue = require("./highlevel/methods/gifts/get-star-gift-value.cjs");
132
+ const getStarGiftWithdrawalUrl = require("./highlevel/methods/gifts/get-star-gift-withdrawal-url.cjs");
133
+ const getUniqueStarGift = require("./highlevel/methods/gifts/get-unique-star-gift.cjs");
134
+ const iterSavedStarGifts = require("./highlevel/methods/gifts/iter-saved-star-gifts.cjs");
135
+ const pinStarGift = require("./highlevel/methods/gifts/pin-star-gift.cjs");
136
+ const prepayStarGiftUpgrade = require("./highlevel/methods/gifts/prepay-star-gift-upgrade.cjs");
137
+ const resolveStarGiftOffer = require("./highlevel/methods/gifts/resolve-star-gift-offer.cjs");
138
+ const sendStarGiftOffer = require("./highlevel/methods/gifts/send-star-gift-offer.cjs");
139
+ const sendStarGift = require("./highlevel/methods/gifts/send-star-gift.cjs");
140
+ const setGiftResalePrice = require("./highlevel/methods/gifts/set-gift-resale-price.cjs");
141
+ const transferStarGift = require("./highlevel/methods/gifts/transfer-star-gift.cjs");
142
+ const upgradeStarGift = require("./highlevel/methods/gifts/upgrade-star-gift.cjs");
123
143
  const createInviteLink = require("./highlevel/methods/invite-links/create-invite-link.cjs");
124
144
  const editInviteLink = require("./highlevel/methods/invite-links/edit-invite-link.cjs");
125
145
  const exportInviteLink = require("./highlevel/methods/invite-links/export-invite-link.cjs");
@@ -193,10 +213,7 @@ const changeCloudPassword = require("./highlevel/methods/password/change-cloud-p
193
213
  const enableCloudPassword = require("./highlevel/methods/password/enable-cloud-password.cjs");
194
214
  const passwordEmail = require("./highlevel/methods/password/password-email.cjs");
195
215
  const removeCloudPassword = require("./highlevel/methods/password/remove-cloud-password.cjs");
196
- const _normalizeInputStarGift = require("./highlevel/methods/premium/_normalize-input-star-gift.cjs");
197
- const acceptStarGift = require("./highlevel/methods/premium/accept-star-gift.cjs");
198
216
  const applyBoost = require("./highlevel/methods/premium/apply-boost.cjs");
199
- const buyResaleGift = require("./highlevel/methods/premium/buy-resale-gift.cjs");
200
217
  const canApplyBoost = require("./highlevel/methods/premium/can-apply-boost.cjs");
201
218
  const createBusinessChatLink = require("./highlevel/methods/premium/create-business-chat-link.cjs");
202
219
  const editBusinessChatLink = require("./highlevel/methods/premium/edit-business-chat-link.cjs");
@@ -205,25 +222,11 @@ const getBoosts = require("./highlevel/methods/premium/get-boosts.cjs");
205
222
  const getBusinessChatLinks = require("./highlevel/methods/premium/get-business-chat-links.cjs");
206
223
  const getBusinessConnection = require("./highlevel/methods/premium/get-business-connection.cjs");
207
224
  const getMyBoostSlots = require("./highlevel/methods/premium/get-my-boost-slots.cjs");
208
- const getResaleStarGifts = require("./highlevel/methods/premium/get-resale-star-gifts.cjs");
209
- const getSavedStarGiftsById = require("./highlevel/methods/premium/get-saved-star-gifts-by-id.cjs");
210
- const getSavedStarGifts = require("./highlevel/methods/premium/get-saved-star-gifts.cjs");
211
- const getStarGiftOptions = require("./highlevel/methods/premium/get-star-gift-options.cjs");
212
- const getStarGiftValue = require("./highlevel/methods/premium/get-star-gift-value.cjs");
213
- const getStarGiftWithdrawalUrl = require("./highlevel/methods/premium/get-star-gift-withdrawal-url.cjs");
214
225
  const getStarsTransactions = require("./highlevel/methods/premium/get-stars-transactions.cjs");
215
- const getUniqueStarGift = require("./highlevel/methods/premium/get-unique-star-gift.cjs");
216
226
  const iterBoosters = require("./highlevel/methods/premium/iter-boosters.cjs");
217
- const iterSavedStarGifts = require("./highlevel/methods/premium/iter-saved-star-gifts.cjs");
218
227
  const iterStarsTransactions = require("./highlevel/methods/premium/iter-stars-transactions.cjs");
219
- const pinStarGift = require("./highlevel/methods/premium/pin-star-gift.cjs");
220
- const prepayStarGiftUpgrade = require("./highlevel/methods/premium/prepay-star-gift-upgrade.cjs");
221
- const sendStarGift = require("./highlevel/methods/premium/send-star-gift.cjs");
222
228
  const setBusinessIntro = require("./highlevel/methods/premium/set-business-intro.cjs");
223
229
  const setBusinessWorkHours = require("./highlevel/methods/premium/set-business-work-hours.cjs");
224
- const setGiftResalePrice = require("./highlevel/methods/premium/set-gift-resale-price.cjs");
225
- const transferStarGift = require("./highlevel/methods/premium/transfer-star-gift.cjs");
226
- const upgradeStarGift = require("./highlevel/methods/premium/upgrade-star-gift.cjs");
227
230
  const addStickerToSet = require("./highlevel/methods/stickers/add-sticker-to-set.cjs");
228
231
  const createStickerSet = require("./highlevel/methods/stickers/create-sticker-set.cjs");
229
232
  const deleteStickerFromSet = require("./highlevel/methods/stickers/delete-sticker-from-set.cjs");
@@ -801,6 +804,66 @@ TelegramClient.prototype.updateForumSettings = function(...args) {
801
804
  TelegramClient.prototype.toggleGeneralTopicHidden = function(...args) {
802
805
  return toggleGeneralTopicHidden.toggleGeneralTopicHidden(this._client, ...args);
803
806
  };
807
+ TelegramClient.prototype._normalizeInputStarGift = function(...args) {
808
+ return _normalizeInputStarGift._normalizeInputStarGift(this._client, ...args);
809
+ };
810
+ TelegramClient.prototype.acceptStarGift = function(...args) {
811
+ return acceptStarGift.acceptStarGift(this._client, ...args);
812
+ };
813
+ TelegramClient.prototype.buyResaleGift = function(...args) {
814
+ return buyResaleGift.buyResaleGift(this._client, ...args);
815
+ };
816
+ TelegramClient.prototype.getStarGiftResaleOptions = function(...args) {
817
+ return getResaleStarGifts.getStarGiftResaleOptions(this._client, ...args);
818
+ };
819
+ TelegramClient.prototype.getSavedStarGiftsById = function(...args) {
820
+ return getSavedStarGiftsById.getSavedStarGiftsById(this._client, ...args);
821
+ };
822
+ TelegramClient.prototype.getSavedStarGifts = function(...args) {
823
+ return getSavedStarGifts.getSavedStarGifts(this._client, ...args);
824
+ };
825
+ TelegramClient.prototype.getStarGiftOptions = function(...args) {
826
+ return getStarGiftOptions.getStarGiftOptions(this._client, ...args);
827
+ };
828
+ TelegramClient.prototype.getStarGiftUpgradeOptions = function(...args) {
829
+ return getStarGiftUpgradeOptions.getStarGiftUpgradeOptions(this._client, ...args);
830
+ };
831
+ TelegramClient.prototype.getStarGiftValue = function(...args) {
832
+ return getStarGiftValue.getStarGiftValue(this._client, ...args);
833
+ };
834
+ TelegramClient.prototype.getStarGiftWithdrawalUrl = function(...args) {
835
+ return getStarGiftWithdrawalUrl.getStarGiftWithdrawalUrl(this._client, ...args);
836
+ };
837
+ TelegramClient.prototype.getUniqueStarGift = function(...args) {
838
+ return getUniqueStarGift.getUniqueStarGift(this._client, ...args);
839
+ };
840
+ TelegramClient.prototype.iterSavedStarGifts = function(...args) {
841
+ return iterSavedStarGifts.iterSavedStarGifts(this._client, ...args);
842
+ };
843
+ TelegramClient.prototype.togglePinnedStarGifts = function(...args) {
844
+ return pinStarGift.togglePinnedStarGifts(this._client, ...args);
845
+ };
846
+ TelegramClient.prototype.prepayStarGiftUpgrade = function(...args) {
847
+ return prepayStarGiftUpgrade.prepayStarGiftUpgrade(this._client, ...args);
848
+ };
849
+ TelegramClient.prototype.resolveStarGiftOffer = function(...args) {
850
+ return resolveStarGiftOffer.resolveStarGiftOffer(this._client, ...args);
851
+ };
852
+ TelegramClient.prototype.sendStarGiftOffer = function(...args) {
853
+ return sendStarGiftOffer.sendStarGiftOffer(this._client, ...args);
854
+ };
855
+ TelegramClient.prototype.sendStarGift = function(...args) {
856
+ return sendStarGift.sendStarGift(this._client, ...args);
857
+ };
858
+ TelegramClient.prototype.setResaleStarGiftPrice = function(...args) {
859
+ return setGiftResalePrice.setResaleStarGiftPrice(this._client, ...args);
860
+ };
861
+ TelegramClient.prototype.transferStarGift = function(...args) {
862
+ return transferStarGift.transferStarGift(this._client, ...args);
863
+ };
864
+ TelegramClient.prototype.upgradeStarGift = function(...args) {
865
+ return upgradeStarGift.upgradeStarGift(this._client, ...args);
866
+ };
804
867
  TelegramClient.prototype.createInviteLink = function(...args) {
805
868
  return createInviteLink.createInviteLink(this._client, ...args);
806
869
  };
@@ -1059,18 +1122,9 @@ TelegramClient.prototype.cancelPasswordEmail = function(...args) {
1059
1122
  TelegramClient.prototype.removeCloudPassword = function(...args) {
1060
1123
  return removeCloudPassword.removeCloudPassword(this._client, ...args);
1061
1124
  };
1062
- TelegramClient.prototype._normalizeInputStarGift = function(...args) {
1063
- return _normalizeInputStarGift._normalizeInputStarGift(this._client, ...args);
1064
- };
1065
- TelegramClient.prototype.acceptStarGift = function(...args) {
1066
- return acceptStarGift.acceptStarGift(this._client, ...args);
1067
- };
1068
1125
  TelegramClient.prototype.applyBoost = function(...args) {
1069
1126
  return applyBoost.applyBoost(this._client, ...args);
1070
1127
  };
1071
- TelegramClient.prototype.buyResaleGift = function(...args) {
1072
- return buyResaleGift.buyResaleGift(this._client, ...args);
1073
- };
1074
1128
  TelegramClient.prototype.canApplyBoost = function(...args) {
1075
1129
  return canApplyBoost.canApplyBoost(this._client, ...args);
1076
1130
  };
@@ -1098,63 +1152,21 @@ TelegramClient.prototype.getBusinessConnection = function(...args) {
1098
1152
  TelegramClient.prototype.getMyBoostSlots = function(...args) {
1099
1153
  return getMyBoostSlots.getMyBoostSlots(this._client, ...args);
1100
1154
  };
1101
- TelegramClient.prototype.getStarGiftResaleOptions = function(...args) {
1102
- return getResaleStarGifts.getStarGiftResaleOptions(this._client, ...args);
1103
- };
1104
- TelegramClient.prototype.getSavedStarGiftsById = function(...args) {
1105
- return getSavedStarGiftsById.getSavedStarGiftsById(this._client, ...args);
1106
- };
1107
- TelegramClient.prototype.getSavedStarGifts = function(...args) {
1108
- return getSavedStarGifts.getSavedStarGifts(this._client, ...args);
1109
- };
1110
- TelegramClient.prototype.getStarGiftOptions = function(...args) {
1111
- return getStarGiftOptions.getStarGiftOptions(this._client, ...args);
1112
- };
1113
- TelegramClient.prototype.getStarGiftValue = function(...args) {
1114
- return getStarGiftValue.getStarGiftValue(this._client, ...args);
1115
- };
1116
- TelegramClient.prototype.getStarGiftWithdrawalUrl = function(...args) {
1117
- return getStarGiftWithdrawalUrl.getStarGiftWithdrawalUrl(this._client, ...args);
1118
- };
1119
1155
  TelegramClient.prototype.getStarsTransactions = function(...args) {
1120
1156
  return getStarsTransactions.getStarsTransactions(this._client, ...args);
1121
1157
  };
1122
- TelegramClient.prototype.getUniqueStarGift = function(...args) {
1123
- return getUniqueStarGift.getUniqueStarGift(this._client, ...args);
1124
- };
1125
1158
  TelegramClient.prototype.iterBoosters = function(...args) {
1126
1159
  return iterBoosters.iterBoosters(this._client, ...args);
1127
1160
  };
1128
- TelegramClient.prototype.iterSavedStarGifts = function(...args) {
1129
- return iterSavedStarGifts.iterSavedStarGifts(this._client, ...args);
1130
- };
1131
1161
  TelegramClient.prototype.iterStarsTransactions = function(...args) {
1132
1162
  return iterStarsTransactions.iterStarsTransactions(this._client, ...args);
1133
1163
  };
1134
- TelegramClient.prototype.togglePinnedStarGifts = function(...args) {
1135
- return pinStarGift.togglePinnedStarGifts(this._client, ...args);
1136
- };
1137
- TelegramClient.prototype.prepayStarGiftUpgrade = function(...args) {
1138
- return prepayStarGiftUpgrade.prepayStarGiftUpgrade(this._client, ...args);
1139
- };
1140
- TelegramClient.prototype.sendStarGift = function(...args) {
1141
- return sendStarGift.sendStarGift(this._client, ...args);
1142
- };
1143
1164
  TelegramClient.prototype.setBusinessIntro = function(...args) {
1144
1165
  return setBusinessIntro.setBusinessIntro(this._client, ...args);
1145
1166
  };
1146
1167
  TelegramClient.prototype.setBusinessWorkHours = function(...args) {
1147
1168
  return setBusinessWorkHours.setBusinessWorkHours(this._client, ...args);
1148
1169
  };
1149
- TelegramClient.prototype.setResaleStarGiftPrice = function(...args) {
1150
- return setGiftResalePrice.setResaleStarGiftPrice(this._client, ...args);
1151
- };
1152
- TelegramClient.prototype.transferStarGift = function(...args) {
1153
- return transferStarGift.transferStarGift(this._client, ...args);
1154
- };
1155
- TelegramClient.prototype.upgradeStarGift = function(...args) {
1156
- return upgradeStarGift.upgradeStarGift(this._client, ...args);
1157
- };
1158
1170
  TelegramClient.prototype.addStickerToSet = function(...args) {
1159
1171
  return addStickerToSet.addStickerToSet(this._client, ...args);
1160
1172
  };
package/client.js CHANGED
@@ -113,6 +113,26 @@ import { toggleForumTopicClosed } from "./highlevel/methods/forums/toggle-forum-
113
113
  import { toggleForumTopicPinned } from "./highlevel/methods/forums/toggle-forum-topic-pinned.js";
114
114
  import { updateForumSettings } from "./highlevel/methods/forums/toggle-forum.js";
115
115
  import { toggleGeneralTopicHidden } from "./highlevel/methods/forums/toggle-general-topic-hidden.js";
116
+ import { _normalizeInputStarGift } from "./highlevel/methods/gifts/_normalize-input-star-gift.js";
117
+ import { acceptStarGift } from "./highlevel/methods/gifts/accept-star-gift.js";
118
+ import { buyResaleGift } from "./highlevel/methods/gifts/buy-resale-gift.js";
119
+ import { getStarGiftResaleOptions } from "./highlevel/methods/gifts/get-resale-star-gifts.js";
120
+ import { getSavedStarGiftsById } from "./highlevel/methods/gifts/get-saved-star-gifts-by-id.js";
121
+ import { getSavedStarGifts } from "./highlevel/methods/gifts/get-saved-star-gifts.js";
122
+ import { getStarGiftOptions } from "./highlevel/methods/gifts/get-star-gift-options.js";
123
+ import { getStarGiftUpgradeOptions } from "./highlevel/methods/gifts/get-star-gift-upgrade-options.js";
124
+ import { getStarGiftValue } from "./highlevel/methods/gifts/get-star-gift-value.js";
125
+ import { getStarGiftWithdrawalUrl } from "./highlevel/methods/gifts/get-star-gift-withdrawal-url.js";
126
+ import { getUniqueStarGift } from "./highlevel/methods/gifts/get-unique-star-gift.js";
127
+ import { iterSavedStarGifts } from "./highlevel/methods/gifts/iter-saved-star-gifts.js";
128
+ import { togglePinnedStarGifts } from "./highlevel/methods/gifts/pin-star-gift.js";
129
+ import { prepayStarGiftUpgrade } from "./highlevel/methods/gifts/prepay-star-gift-upgrade.js";
130
+ import { resolveStarGiftOffer } from "./highlevel/methods/gifts/resolve-star-gift-offer.js";
131
+ import { sendStarGiftOffer } from "./highlevel/methods/gifts/send-star-gift-offer.js";
132
+ import { sendStarGift } from "./highlevel/methods/gifts/send-star-gift.js";
133
+ import { setResaleStarGiftPrice } from "./highlevel/methods/gifts/set-gift-resale-price.js";
134
+ import { transferStarGift } from "./highlevel/methods/gifts/transfer-star-gift.js";
135
+ import { upgradeStarGift } from "./highlevel/methods/gifts/upgrade-star-gift.js";
116
136
  import { createInviteLink } from "./highlevel/methods/invite-links/create-invite-link.js";
117
137
  import { editInviteLink } from "./highlevel/methods/invite-links/edit-invite-link.js";
118
138
  import { exportInviteLink } from "./highlevel/methods/invite-links/export-invite-link.js";
@@ -186,10 +206,7 @@ import { changeCloudPassword } from "./highlevel/methods/password/change-cloud-p
186
206
  import { enableCloudPassword } from "./highlevel/methods/password/enable-cloud-password.js";
187
207
  import { verifyPasswordEmail, resendPasswordEmail, cancelPasswordEmail } from "./highlevel/methods/password/password-email.js";
188
208
  import { removeCloudPassword } from "./highlevel/methods/password/remove-cloud-password.js";
189
- import { _normalizeInputStarGift } from "./highlevel/methods/premium/_normalize-input-star-gift.js";
190
- import { acceptStarGift } from "./highlevel/methods/premium/accept-star-gift.js";
191
209
  import { applyBoost } from "./highlevel/methods/premium/apply-boost.js";
192
- import { buyResaleGift } from "./highlevel/methods/premium/buy-resale-gift.js";
193
210
  import { canApplyBoost } from "./highlevel/methods/premium/can-apply-boost.js";
194
211
  import { createBusinessChatLink } from "./highlevel/methods/premium/create-business-chat-link.js";
195
212
  import { editBusinessChatLink, deleteBusinessChatLink } from "./highlevel/methods/premium/edit-business-chat-link.js";
@@ -198,25 +215,11 @@ import { getBoosts } from "./highlevel/methods/premium/get-boosts.js";
198
215
  import { getBusinessChatLinks } from "./highlevel/methods/premium/get-business-chat-links.js";
199
216
  import { getBusinessConnection } from "./highlevel/methods/premium/get-business-connection.js";
200
217
  import { getMyBoostSlots } from "./highlevel/methods/premium/get-my-boost-slots.js";
201
- import { getStarGiftResaleOptions } from "./highlevel/methods/premium/get-resale-star-gifts.js";
202
- import { getSavedStarGiftsById } from "./highlevel/methods/premium/get-saved-star-gifts-by-id.js";
203
- import { getSavedStarGifts } from "./highlevel/methods/premium/get-saved-star-gifts.js";
204
- import { getStarGiftOptions } from "./highlevel/methods/premium/get-star-gift-options.js";
205
- import { getStarGiftValue } from "./highlevel/methods/premium/get-star-gift-value.js";
206
- import { getStarGiftWithdrawalUrl } from "./highlevel/methods/premium/get-star-gift-withdrawal-url.js";
207
218
  import { getStarsTransactions } from "./highlevel/methods/premium/get-stars-transactions.js";
208
- import { getUniqueStarGift } from "./highlevel/methods/premium/get-unique-star-gift.js";
209
219
  import { iterBoosters } from "./highlevel/methods/premium/iter-boosters.js";
210
- import { iterSavedStarGifts } from "./highlevel/methods/premium/iter-saved-star-gifts.js";
211
220
  import { iterStarsTransactions } from "./highlevel/methods/premium/iter-stars-transactions.js";
212
- import { togglePinnedStarGifts } from "./highlevel/methods/premium/pin-star-gift.js";
213
- import { prepayStarGiftUpgrade } from "./highlevel/methods/premium/prepay-star-gift-upgrade.js";
214
- import { sendStarGift } from "./highlevel/methods/premium/send-star-gift.js";
215
221
  import { setBusinessIntro } from "./highlevel/methods/premium/set-business-intro.js";
216
222
  import { setBusinessWorkHours } from "./highlevel/methods/premium/set-business-work-hours.js";
217
- import { setResaleStarGiftPrice } from "./highlevel/methods/premium/set-gift-resale-price.js";
218
- import { transferStarGift } from "./highlevel/methods/premium/transfer-star-gift.js";
219
- import { upgradeStarGift } from "./highlevel/methods/premium/upgrade-star-gift.js";
220
223
  import { addStickerToSet } from "./highlevel/methods/stickers/add-sticker-to-set.js";
221
224
  import { createStickerSet } from "./highlevel/methods/stickers/create-sticker-set.js";
222
225
  import { deleteStickerFromSet } from "./highlevel/methods/stickers/delete-sticker-from-set.js";
@@ -794,6 +797,66 @@ TelegramClient.prototype.updateForumSettings = function(...args) {
794
797
  TelegramClient.prototype.toggleGeneralTopicHidden = function(...args) {
795
798
  return toggleGeneralTopicHidden(this._client, ...args);
796
799
  };
800
+ TelegramClient.prototype._normalizeInputStarGift = function(...args) {
801
+ return _normalizeInputStarGift(this._client, ...args);
802
+ };
803
+ TelegramClient.prototype.acceptStarGift = function(...args) {
804
+ return acceptStarGift(this._client, ...args);
805
+ };
806
+ TelegramClient.prototype.buyResaleGift = function(...args) {
807
+ return buyResaleGift(this._client, ...args);
808
+ };
809
+ TelegramClient.prototype.getStarGiftResaleOptions = function(...args) {
810
+ return getStarGiftResaleOptions(this._client, ...args);
811
+ };
812
+ TelegramClient.prototype.getSavedStarGiftsById = function(...args) {
813
+ return getSavedStarGiftsById(this._client, ...args);
814
+ };
815
+ TelegramClient.prototype.getSavedStarGifts = function(...args) {
816
+ return getSavedStarGifts(this._client, ...args);
817
+ };
818
+ TelegramClient.prototype.getStarGiftOptions = function(...args) {
819
+ return getStarGiftOptions(this._client, ...args);
820
+ };
821
+ TelegramClient.prototype.getStarGiftUpgradeOptions = function(...args) {
822
+ return getStarGiftUpgradeOptions(this._client, ...args);
823
+ };
824
+ TelegramClient.prototype.getStarGiftValue = function(...args) {
825
+ return getStarGiftValue(this._client, ...args);
826
+ };
827
+ TelegramClient.prototype.getStarGiftWithdrawalUrl = function(...args) {
828
+ return getStarGiftWithdrawalUrl(this._client, ...args);
829
+ };
830
+ TelegramClient.prototype.getUniqueStarGift = function(...args) {
831
+ return getUniqueStarGift(this._client, ...args);
832
+ };
833
+ TelegramClient.prototype.iterSavedStarGifts = function(...args) {
834
+ return iterSavedStarGifts(this._client, ...args);
835
+ };
836
+ TelegramClient.prototype.togglePinnedStarGifts = function(...args) {
837
+ return togglePinnedStarGifts(this._client, ...args);
838
+ };
839
+ TelegramClient.prototype.prepayStarGiftUpgrade = function(...args) {
840
+ return prepayStarGiftUpgrade(this._client, ...args);
841
+ };
842
+ TelegramClient.prototype.resolveStarGiftOffer = function(...args) {
843
+ return resolveStarGiftOffer(this._client, ...args);
844
+ };
845
+ TelegramClient.prototype.sendStarGiftOffer = function(...args) {
846
+ return sendStarGiftOffer(this._client, ...args);
847
+ };
848
+ TelegramClient.prototype.sendStarGift = function(...args) {
849
+ return sendStarGift(this._client, ...args);
850
+ };
851
+ TelegramClient.prototype.setResaleStarGiftPrice = function(...args) {
852
+ return setResaleStarGiftPrice(this._client, ...args);
853
+ };
854
+ TelegramClient.prototype.transferStarGift = function(...args) {
855
+ return transferStarGift(this._client, ...args);
856
+ };
857
+ TelegramClient.prototype.upgradeStarGift = function(...args) {
858
+ return upgradeStarGift(this._client, ...args);
859
+ };
797
860
  TelegramClient.prototype.createInviteLink = function(...args) {
798
861
  return createInviteLink(this._client, ...args);
799
862
  };
@@ -1052,18 +1115,9 @@ TelegramClient.prototype.cancelPasswordEmail = function(...args) {
1052
1115
  TelegramClient.prototype.removeCloudPassword = function(...args) {
1053
1116
  return removeCloudPassword(this._client, ...args);
1054
1117
  };
1055
- TelegramClient.prototype._normalizeInputStarGift = function(...args) {
1056
- return _normalizeInputStarGift(this._client, ...args);
1057
- };
1058
- TelegramClient.prototype.acceptStarGift = function(...args) {
1059
- return acceptStarGift(this._client, ...args);
1060
- };
1061
1118
  TelegramClient.prototype.applyBoost = function(...args) {
1062
1119
  return applyBoost(this._client, ...args);
1063
1120
  };
1064
- TelegramClient.prototype.buyResaleGift = function(...args) {
1065
- return buyResaleGift(this._client, ...args);
1066
- };
1067
1121
  TelegramClient.prototype.canApplyBoost = function(...args) {
1068
1122
  return canApplyBoost(this._client, ...args);
1069
1123
  };
@@ -1091,63 +1145,21 @@ TelegramClient.prototype.getBusinessConnection = function(...args) {
1091
1145
  TelegramClient.prototype.getMyBoostSlots = function(...args) {
1092
1146
  return getMyBoostSlots(this._client, ...args);
1093
1147
  };
1094
- TelegramClient.prototype.getStarGiftResaleOptions = function(...args) {
1095
- return getStarGiftResaleOptions(this._client, ...args);
1096
- };
1097
- TelegramClient.prototype.getSavedStarGiftsById = function(...args) {
1098
- return getSavedStarGiftsById(this._client, ...args);
1099
- };
1100
- TelegramClient.prototype.getSavedStarGifts = function(...args) {
1101
- return getSavedStarGifts(this._client, ...args);
1102
- };
1103
- TelegramClient.prototype.getStarGiftOptions = function(...args) {
1104
- return getStarGiftOptions(this._client, ...args);
1105
- };
1106
- TelegramClient.prototype.getStarGiftValue = function(...args) {
1107
- return getStarGiftValue(this._client, ...args);
1108
- };
1109
- TelegramClient.prototype.getStarGiftWithdrawalUrl = function(...args) {
1110
- return getStarGiftWithdrawalUrl(this._client, ...args);
1111
- };
1112
1148
  TelegramClient.prototype.getStarsTransactions = function(...args) {
1113
1149
  return getStarsTransactions(this._client, ...args);
1114
1150
  };
1115
- TelegramClient.prototype.getUniqueStarGift = function(...args) {
1116
- return getUniqueStarGift(this._client, ...args);
1117
- };
1118
1151
  TelegramClient.prototype.iterBoosters = function(...args) {
1119
1152
  return iterBoosters(this._client, ...args);
1120
1153
  };
1121
- TelegramClient.prototype.iterSavedStarGifts = function(...args) {
1122
- return iterSavedStarGifts(this._client, ...args);
1123
- };
1124
1154
  TelegramClient.prototype.iterStarsTransactions = function(...args) {
1125
1155
  return iterStarsTransactions(this._client, ...args);
1126
1156
  };
1127
- TelegramClient.prototype.togglePinnedStarGifts = function(...args) {
1128
- return togglePinnedStarGifts(this._client, ...args);
1129
- };
1130
- TelegramClient.prototype.prepayStarGiftUpgrade = function(...args) {
1131
- return prepayStarGiftUpgrade(this._client, ...args);
1132
- };
1133
- TelegramClient.prototype.sendStarGift = function(...args) {
1134
- return sendStarGift(this._client, ...args);
1135
- };
1136
1157
  TelegramClient.prototype.setBusinessIntro = function(...args) {
1137
1158
  return setBusinessIntro(this._client, ...args);
1138
1159
  };
1139
1160
  TelegramClient.prototype.setBusinessWorkHours = function(...args) {
1140
1161
  return setBusinessWorkHours(this._client, ...args);
1141
1162
  };
1142
- TelegramClient.prototype.setResaleStarGiftPrice = function(...args) {
1143
- return setResaleStarGiftPrice(this._client, ...args);
1144
- };
1145
- TelegramClient.prototype.transferStarGift = function(...args) {
1146
- return transferStarGift(this._client, ...args);
1147
- };
1148
- TelegramClient.prototype.upgradeStarGift = function(...args) {
1149
- return upgradeStarGift(this._client, ...args);
1150
- };
1151
1163
  TelegramClient.prototype.addStickerToSet = function(...args) {
1152
1164
  return addStickerToSet(this._client, ...args);
1153
1165
  };
@@ -129,8 +129,12 @@ class BaseTelegramClient {
129
129
  if (this.#destroyed) return;
130
130
  this.#destroyed = true;
131
131
  await this.disconnect();
132
+ this.updates?.destroy();
132
133
  await this.mt.destroy();
133
134
  }
135
+ get destroyed() {
136
+ return this.#destroyed;
137
+ }
134
138
  [Symbol.asyncDispose]() {
135
139
  return this.destroy();
136
140
  }
@@ -57,6 +57,7 @@ export declare class BaseTelegramClient implements ITelegramClient {
57
57
  get isConnected(): boolean;
58
58
  disconnect(): Promise<void>;
59
59
  destroy(): Promise<void>;
60
+ get destroyed(): boolean;
60
61
  [Symbol.asyncDispose](): Promise<void>;
61
62
  notifyLoggedIn(auth: tl.auth.TypeAuthorization | tl.RawUser): Promise<tl.RawUser>;
62
63
  notifyLoggedOut(): Promise<void>;
@@ -57,6 +57,7 @@ export declare class BaseTelegramClient implements ITelegramClient {
57
57
  get isConnected(): boolean;
58
58
  disconnect(): Promise<void>;
59
59
  destroy(): Promise<void>;
60
+ get destroyed(): boolean;
60
61
  [Symbol.asyncDispose](): Promise<void>;
61
62
  notifyLoggedIn(auth: tl.auth.TypeAuthorization | tl.RawUser): Promise<tl.RawUser>;
62
63
  notifyLoggedOut(): Promise<void>;
package/highlevel/base.js CHANGED
@@ -122,8 +122,12 @@ class BaseTelegramClient {
122
122
  if (this.#destroyed) return;
123
123
  this.#destroyed = true;
124
124
  await this.disconnect();
125
+ this.updates?.destroy();
125
126
  await this.mt.destroy();
126
127
  }
128
+ get destroyed() {
129
+ return this.#destroyed;
130
+ }
127
131
  [Symbol.asyncDispose]() {
128
132
  return this.destroy();
129
133
  }