@mtcute/core 0.19.10 → 0.20.1

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 (107) hide show
  1. package/client.cjs +20 -0
  2. package/client.js +20 -0
  3. package/highlevel/client.d.cts +64 -9
  4. package/highlevel/client.d.ts +64 -9
  5. package/highlevel/methods/files/normalize-input-media.cjs +12 -2
  6. package/highlevel/methods/files/normalize-input-media.js +12 -2
  7. package/highlevel/methods/messages/forward-messages.cjs +4 -2
  8. package/highlevel/methods/messages/forward-messages.d.cts +2 -0
  9. package/highlevel/methods/messages/forward-messages.d.ts +2 -0
  10. package/highlevel/methods/messages/forward-messages.js +4 -2
  11. package/highlevel/methods/premium/_normalize-input-star-gift.cjs +23 -0
  12. package/highlevel/methods/premium/_normalize-input-star-gift.d.cts +4 -0
  13. package/highlevel/methods/premium/_normalize-input-star-gift.d.ts +4 -0
  14. package/highlevel/methods/premium/_normalize-input-star-gift.js +18 -0
  15. package/highlevel/methods/premium/accept-star-gift.cjs +4 -3
  16. package/highlevel/methods/premium/accept-star-gift.d.cts +3 -3
  17. package/highlevel/methods/premium/accept-star-gift.d.ts +3 -3
  18. package/highlevel/methods/premium/accept-star-gift.js +4 -3
  19. package/highlevel/methods/premium/get-saved-star-gifts-by-id.cjs +21 -0
  20. package/highlevel/methods/premium/get-saved-star-gifts-by-id.d.cts +6 -0
  21. package/highlevel/methods/premium/get-saved-star-gifts-by-id.d.ts +6 -0
  22. package/highlevel/methods/premium/get-saved-star-gifts-by-id.js +16 -0
  23. package/highlevel/methods/premium/get-saved-star-gifts.cjs +32 -0
  24. package/highlevel/methods/premium/get-saved-star-gifts.d.cts +28 -0
  25. package/highlevel/methods/premium/get-saved-star-gifts.d.ts +28 -0
  26. package/highlevel/methods/premium/get-saved-star-gifts.js +27 -0
  27. package/highlevel/methods/premium/get-star-gift-withdrawal-url.cjs +23 -0
  28. package/highlevel/methods/premium/get-star-gift-withdrawal-url.d.cts +8 -0
  29. package/highlevel/methods/premium/get-star-gift-withdrawal-url.d.ts +8 -0
  30. package/highlevel/methods/premium/get-star-gift-withdrawal-url.js +18 -0
  31. package/highlevel/methods/premium/get-star-gifts.cjs +4 -13
  32. package/highlevel/methods/premium/get-star-gifts.d.cts +3 -2
  33. package/highlevel/methods/premium/get-star-gifts.d.ts +3 -2
  34. package/highlevel/methods/premium/get-star-gifts.js +4 -13
  35. package/highlevel/methods/premium/iter-saved-star-gifts.cjs +33 -0
  36. package/highlevel/methods/premium/iter-saved-star-gifts.d.cts +27 -0
  37. package/highlevel/methods/premium/iter-saved-star-gifts.d.ts +27 -0
  38. package/highlevel/methods/premium/iter-saved-star-gifts.js +28 -0
  39. package/highlevel/methods/premium/send-star-gift.cjs +2 -2
  40. package/highlevel/methods/premium/send-star-gift.d.cts +2 -2
  41. package/highlevel/methods/premium/send-star-gift.d.ts +2 -2
  42. package/highlevel/methods/premium/send-star-gift.js +3 -3
  43. package/highlevel/methods/premium/transfer-star-gift.cjs +4 -4
  44. package/highlevel/methods/premium/transfer-star-gift.d.cts +3 -3
  45. package/highlevel/methods/premium/transfer-star-gift.d.ts +3 -3
  46. package/highlevel/methods/premium/transfer-star-gift.js +5 -5
  47. package/highlevel/methods/premium/upgrade-star-gift.cjs +3 -3
  48. package/highlevel/methods/premium/upgrade-star-gift.d.cts +2 -2
  49. package/highlevel/methods/premium/upgrade-star-gift.d.ts +2 -2
  50. package/highlevel/methods/premium/upgrade-star-gift.js +3 -3
  51. package/highlevel/methods/users/set-emoji-status.cjs +8 -1
  52. package/highlevel/methods/users/set-emoji-status.d.cts +2 -0
  53. package/highlevel/methods/users/set-emoji-status.d.ts +2 -0
  54. package/highlevel/methods/users/set-emoji-status.js +8 -1
  55. package/highlevel/methods.d.cts +5 -0
  56. package/highlevel/methods.d.ts +5 -0
  57. package/highlevel/types/media/input-media/types.d.cts +4 -0
  58. package/highlevel/types/media/input-media/types.d.ts +4 -0
  59. package/highlevel/types/media/video.cjs +8 -0
  60. package/highlevel/types/media/video.d.cts +3 -0
  61. package/highlevel/types/media/video.d.ts +3 -0
  62. package/highlevel/types/media/video.js +8 -0
  63. package/highlevel/types/messages/message-action.cjs +22 -1
  64. package/highlevel/types/messages/message-action.d.cts +4 -0
  65. package/highlevel/types/messages/message-action.d.ts +4 -0
  66. package/highlevel/types/messages/message-action.js +22 -1
  67. package/highlevel/types/peers/chat.cjs +3 -1
  68. package/highlevel/types/peers/chat.js +3 -1
  69. package/highlevel/types/peers/full-chat.cjs +8 -0
  70. package/highlevel/types/peers/full-chat.d.cts +4 -0
  71. package/highlevel/types/peers/full-chat.d.ts +4 -0
  72. package/highlevel/types/peers/full-chat.js +8 -0
  73. package/highlevel/types/peers/user.cjs +3 -1
  74. package/highlevel/types/peers/user.js +3 -1
  75. package/highlevel/types/premium/index.d.cts +1 -0
  76. package/highlevel/types/premium/index.d.ts +1 -0
  77. package/highlevel/types/premium/saved-star-gift.cjs +81 -0
  78. package/highlevel/types/premium/saved-star-gift.d.cts +42 -0
  79. package/highlevel/types/premium/saved-star-gift.d.ts +42 -0
  80. package/highlevel/types/premium/saved-star-gift.js +76 -0
  81. package/highlevel/types/premium/stars-gift-unique.cjs +9 -5
  82. package/highlevel/types/premium/stars-gift-unique.d.cts +7 -5
  83. package/highlevel/types/premium/stars-gift-unique.d.ts +7 -5
  84. package/highlevel/types/premium/stars-gift-unique.js +9 -5
  85. package/highlevel/types/premium/stars-gift.cjs +0 -66
  86. package/highlevel/types/premium/stars-gift.d.cts +12 -40
  87. package/highlevel/types/premium/stars-gift.d.ts +12 -40
  88. package/highlevel/types/premium/stars-gift.js +1 -67
  89. package/highlevel/types/reactions/emoji-status.cjs +38 -1
  90. package/highlevel/types/reactions/emoji-status.d.cts +23 -2
  91. package/highlevel/types/reactions/emoji-status.d.ts +23 -2
  92. package/highlevel/types/reactions/emoji-status.js +39 -2
  93. package/index.cjs +4 -1
  94. package/index.js +5 -2
  95. package/methods.cjs +10 -0
  96. package/methods.js +10 -0
  97. package/network/middlewares/bundle.cjs +4 -0
  98. package/network/middlewares/bundle.d.cts +2 -0
  99. package/network/middlewares/bundle.d.ts +2 -0
  100. package/network/middlewares/bundle.js +4 -0
  101. package/network/middlewares/internal-errors.cjs +3 -1
  102. package/network/middlewares/internal-errors.d.cts +4 -0
  103. package/network/middlewares/internal-errors.d.ts +4 -0
  104. package/network/middlewares/internal-errors.js +3 -1
  105. package/network/network-manager.cjs +1 -1
  106. package/network/network-manager.js +1 -1
  107. package/package.json +2 -2
package/client.cjs CHANGED
@@ -186,6 +186,7 @@ const changeCloudPassword = require("./highlevel/methods/password/change-cloud-p
186
186
  const enableCloudPassword = require("./highlevel/methods/password/enable-cloud-password.cjs");
187
187
  const passwordEmail = require("./highlevel/methods/password/password-email.cjs");
188
188
  const removeCloudPassword = require("./highlevel/methods/password/remove-cloud-password.cjs");
189
+ const _normalizeInputStarGift = require("./highlevel/methods/premium/_normalize-input-star-gift.cjs");
189
190
  const acceptStarGift = require("./highlevel/methods/premium/accept-star-gift.cjs");
190
191
  const applyBoost = require("./highlevel/methods/premium/apply-boost.cjs");
191
192
  const canApplyBoost = require("./highlevel/methods/premium/can-apply-boost.cjs");
@@ -196,11 +197,15 @@ const getBoosts = require("./highlevel/methods/premium/get-boosts.cjs");
196
197
  const getBusinessChatLinks = require("./highlevel/methods/premium/get-business-chat-links.cjs");
197
198
  const getBusinessConnection = require("./highlevel/methods/premium/get-business-connection.cjs");
198
199
  const getMyBoostSlots = require("./highlevel/methods/premium/get-my-boost-slots.cjs");
200
+ const getSavedStarGiftsById = require("./highlevel/methods/premium/get-saved-star-gifts-by-id.cjs");
201
+ const getSavedStarGifts = require("./highlevel/methods/premium/get-saved-star-gifts.cjs");
199
202
  const getStarGiftOptions = require("./highlevel/methods/premium/get-star-gift-options.cjs");
203
+ const getStarGiftWithdrawalUrl = require("./highlevel/methods/premium/get-star-gift-withdrawal-url.cjs");
200
204
  const getStarGifts = require("./highlevel/methods/premium/get-star-gifts.cjs");
201
205
  const getStarsTransactions = require("./highlevel/methods/premium/get-stars-transactions.cjs");
202
206
  const getUniqueStarGift = require("./highlevel/methods/premium/get-unique-star-gift.cjs");
203
207
  const iterBoosters = require("./highlevel/methods/premium/iter-boosters.cjs");
208
+ const iterSavedStarGifts = require("./highlevel/methods/premium/iter-saved-star-gifts.cjs");
204
209
  const iterStarGifts = require("./highlevel/methods/premium/iter-star-gifts.cjs");
205
210
  const iterStarsTransactions = require("./highlevel/methods/premium/iter-stars-transactions.cjs");
206
211
  const sendStarGift = require("./highlevel/methods/premium/send-star-gift.cjs");
@@ -1013,6 +1018,9 @@ TelegramClient.prototype.cancelPasswordEmail = function(...args) {
1013
1018
  TelegramClient.prototype.removeCloudPassword = function(...args) {
1014
1019
  return removeCloudPassword.removeCloudPassword(this._client, ...args);
1015
1020
  };
1021
+ TelegramClient.prototype._normalizeInputStarGift = function(...args) {
1022
+ return _normalizeInputStarGift._normalizeInputStarGift(this._client, ...args);
1023
+ };
1016
1024
  TelegramClient.prototype.acceptStarGift = function(...args) {
1017
1025
  return acceptStarGift.acceptStarGift(this._client, ...args);
1018
1026
  };
@@ -1046,9 +1054,18 @@ TelegramClient.prototype.getBusinessConnection = function(...args) {
1046
1054
  TelegramClient.prototype.getMyBoostSlots = function(...args) {
1047
1055
  return getMyBoostSlots.getMyBoostSlots(this._client, ...args);
1048
1056
  };
1057
+ TelegramClient.prototype.getSavedStarGiftsById = function(...args) {
1058
+ return getSavedStarGiftsById.getSavedStarGiftsById(this._client, ...args);
1059
+ };
1060
+ TelegramClient.prototype.getSavedStarGifts = function(...args) {
1061
+ return getSavedStarGifts.getSavedStarGifts(this._client, ...args);
1062
+ };
1049
1063
  TelegramClient.prototype.getStarGiftOptions = function(...args) {
1050
1064
  return getStarGiftOptions.getStarGiftOptions(this._client, ...args);
1051
1065
  };
1066
+ TelegramClient.prototype.getStarGiftWithdrawalUrl = function(...args) {
1067
+ return getStarGiftWithdrawalUrl.getStarGiftWithdrawalUrl(this._client, ...args);
1068
+ };
1052
1069
  TelegramClient.prototype.getStarGifts = function(...args) {
1053
1070
  return getStarGifts.getStarGifts(this._client, ...args);
1054
1071
  };
@@ -1061,6 +1078,9 @@ TelegramClient.prototype.getUniqueStarGift = function(...args) {
1061
1078
  TelegramClient.prototype.iterBoosters = function(...args) {
1062
1079
  return iterBoosters.iterBoosters(this._client, ...args);
1063
1080
  };
1081
+ TelegramClient.prototype.iterSavedStarGifts = function(...args) {
1082
+ return iterSavedStarGifts.iterSavedStarGifts(this._client, ...args);
1083
+ };
1064
1084
  TelegramClient.prototype.iterStarGifts = function(...args) {
1065
1085
  return iterStarGifts.iterStarGifts(this._client, ...args);
1066
1086
  };
package/client.js CHANGED
@@ -179,6 +179,7 @@ import { changeCloudPassword } from "./highlevel/methods/password/change-cloud-p
179
179
  import { enableCloudPassword } from "./highlevel/methods/password/enable-cloud-password.js";
180
180
  import { verifyPasswordEmail, resendPasswordEmail, cancelPasswordEmail } from "./highlevel/methods/password/password-email.js";
181
181
  import { removeCloudPassword } from "./highlevel/methods/password/remove-cloud-password.js";
182
+ import { _normalizeInputStarGift } from "./highlevel/methods/premium/_normalize-input-star-gift.js";
182
183
  import { acceptStarGift } from "./highlevel/methods/premium/accept-star-gift.js";
183
184
  import { applyBoost } from "./highlevel/methods/premium/apply-boost.js";
184
185
  import { canApplyBoost } from "./highlevel/methods/premium/can-apply-boost.js";
@@ -189,11 +190,15 @@ import { getBoosts } from "./highlevel/methods/premium/get-boosts.js";
189
190
  import { getBusinessChatLinks } from "./highlevel/methods/premium/get-business-chat-links.js";
190
191
  import { getBusinessConnection } from "./highlevel/methods/premium/get-business-connection.js";
191
192
  import { getMyBoostSlots } from "./highlevel/methods/premium/get-my-boost-slots.js";
193
+ import { getSavedStarGiftsById } from "./highlevel/methods/premium/get-saved-star-gifts-by-id.js";
194
+ import { getSavedStarGifts } from "./highlevel/methods/premium/get-saved-star-gifts.js";
192
195
  import { getStarGiftOptions } from "./highlevel/methods/premium/get-star-gift-options.js";
196
+ import { getStarGiftWithdrawalUrl } from "./highlevel/methods/premium/get-star-gift-withdrawal-url.js";
193
197
  import { getStarGifts } from "./highlevel/methods/premium/get-star-gifts.js";
194
198
  import { getStarsTransactions } from "./highlevel/methods/premium/get-stars-transactions.js";
195
199
  import { getUniqueStarGift } from "./highlevel/methods/premium/get-unique-star-gift.js";
196
200
  import { iterBoosters } from "./highlevel/methods/premium/iter-boosters.js";
201
+ import { iterSavedStarGifts } from "./highlevel/methods/premium/iter-saved-star-gifts.js";
197
202
  import { iterStarGifts } from "./highlevel/methods/premium/iter-star-gifts.js";
198
203
  import { iterStarsTransactions } from "./highlevel/methods/premium/iter-stars-transactions.js";
199
204
  import { sendStarGift } from "./highlevel/methods/premium/send-star-gift.js";
@@ -1006,6 +1011,9 @@ TelegramClient.prototype.cancelPasswordEmail = function(...args) {
1006
1011
  TelegramClient.prototype.removeCloudPassword = function(...args) {
1007
1012
  return removeCloudPassword(this._client, ...args);
1008
1013
  };
1014
+ TelegramClient.prototype._normalizeInputStarGift = function(...args) {
1015
+ return _normalizeInputStarGift(this._client, ...args);
1016
+ };
1009
1017
  TelegramClient.prototype.acceptStarGift = function(...args) {
1010
1018
  return acceptStarGift(this._client, ...args);
1011
1019
  };
@@ -1039,9 +1047,18 @@ TelegramClient.prototype.getBusinessConnection = function(...args) {
1039
1047
  TelegramClient.prototype.getMyBoostSlots = function(...args) {
1040
1048
  return getMyBoostSlots(this._client, ...args);
1041
1049
  };
1050
+ TelegramClient.prototype.getSavedStarGiftsById = function(...args) {
1051
+ return getSavedStarGiftsById(this._client, ...args);
1052
+ };
1053
+ TelegramClient.prototype.getSavedStarGifts = function(...args) {
1054
+ return getSavedStarGifts(this._client, ...args);
1055
+ };
1042
1056
  TelegramClient.prototype.getStarGiftOptions = function(...args) {
1043
1057
  return getStarGiftOptions(this._client, ...args);
1044
1058
  };
1059
+ TelegramClient.prototype.getStarGiftWithdrawalUrl = function(...args) {
1060
+ return getStarGiftWithdrawalUrl(this._client, ...args);
1061
+ };
1045
1062
  TelegramClient.prototype.getStarGifts = function(...args) {
1046
1063
  return getStarGifts(this._client, ...args);
1047
1064
  };
@@ -1054,6 +1071,9 @@ TelegramClient.prototype.getUniqueStarGift = function(...args) {
1054
1071
  TelegramClient.prototype.iterBoosters = function(...args) {
1055
1072
  return iterBoosters(this._client, ...args);
1056
1073
  };
1074
+ TelegramClient.prototype.iterSavedStarGifts = function(...args) {
1075
+ return iterSavedStarGifts(this._client, ...args);
1076
+ };
1057
1077
  TelegramClient.prototype.iterStarGifts = function(...args) {
1058
1078
  return iterStarGifts(this._client, ...args);
1059
1079
  };
@@ -23,7 +23,7 @@ import { QuoteParamsFrom } from './methods/messages/send-quote.js';
23
23
  import { CanApplyBoostResult } from './methods/premium/can-apply-boost.js';
24
24
  import { CanSendStoryResult } from './methods/stories/can-send-story.js';
25
25
  import { ITelegramStorageProvider } from './storage/provider.js';
26
- import { AllStories, ArrayPaginated, ArrayWithTotal, Boost, BoostSlot, BoostStats, BotChatJoinRequestUpdate, BotCommands, BotReactionCountUpdate, BotReactionUpdate, BotStoppedUpdate, BusinessCallbackQuery, BusinessChatLink, BusinessConnection, BusinessMessage, BusinessWorkHoursDay, CallbackQuery, Chat, ChatEvent, ChatInviteLink, ChatInviteLinkMember, ChatJoinRequestUpdate, ChatlistPreview, ChatMember, ChatMemberUpdate, ChatPreview, ChosenInlineResult, CollectibleInfo, DeleteBusinessMessageUpdate, DeleteMessageUpdate, DeleteStoryUpdate, Dialog, FactCheck, FileDownloadLocation, FileDownloadParameters, ForumTopic, FullChat, FullUser, GameHighScore, HistoryReadUpdate, InlineCallbackQuery, InlineQuery, InputChatEventFilters, InputDialogFolder, InputFileLike, InputInlineResult, InputMediaLike, InputMediaSticker, InputMessageId, InputPeerLike, InputPrivacyRule, InputReaction, InputStickerSet, InputStickerSetItem, InputText, InputWebview, MaybeDynamic, Message, MessageEffect, MessageMedia, MessageReactions, ParametersSkip2, ParsedUpdate, PeerReaction, PeerStories, Photo, Poll, PollUpdate, PollVoteUpdate, PreCheckoutQuery, RawDocument, ReplyMarkup, SentCode, StarGift, StarGiftUnique, StarsStatus, StarsTransaction, Sticker, StickerSet, StickerType, StoriesStealthMode, Story, StoryInteractions, StoryUpdate, StoryViewer, StoryViewersList, TakeoutSession, TextWithEntities, TypingStatus, UploadedFile, UploadFileLike, User, UserStarGift, UserStatusUpdate, UserTypingUpdate, WebviewResult } from './types/index.js';
26
+ import { AllStories, ArrayPaginated, ArrayWithTotal, Boost, BoostSlot, BoostStats, BotChatJoinRequestUpdate, BotCommands, BotReactionCountUpdate, BotReactionUpdate, BotStoppedUpdate, BusinessCallbackQuery, BusinessChatLink, BusinessConnection, BusinessMessage, BusinessWorkHoursDay, CallbackQuery, Chat, ChatEvent, ChatInviteLink, ChatInviteLinkMember, ChatJoinRequestUpdate, ChatlistPreview, ChatMember, ChatMemberUpdate, ChatPreview, ChosenInlineResult, CollectibleInfo, DeleteBusinessMessageUpdate, DeleteMessageUpdate, DeleteStoryUpdate, Dialog, FactCheck, FileDownloadLocation, FileDownloadParameters, ForumTopic, FullChat, FullUser, GameHighScore, HistoryReadUpdate, InlineCallbackQuery, InlineQuery, InputChatEventFilters, InputDialogFolder, InputFileLike, InputInlineResult, InputMediaLike, InputMediaSticker, InputMessageId, InputPeerLike, InputPrivacyRule, InputReaction, InputStarGift, InputStickerSet, InputStickerSetItem, InputText, InputWebview, MaybeDynamic, Message, MessageEffect, MessageMedia, MessageReactions, ParametersSkip2, ParsedUpdate, PeerReaction, PeerStories, Photo, Poll, PollUpdate, PollVoteUpdate, PreCheckoutQuery, RawDocument, ReplyMarkup, SavedStarGift, SentCode, StarGift, StarGiftUnique, StarsStatus, StarsTransaction, Sticker, StickerSet, StickerType, StoriesStealthMode, Story, StoryInteractions, StoryUpdate, StoryViewer, StoryViewersList, TakeoutSession, TextWithEntities, TypingStatus, UploadedFile, UploadFileLike, User, UserStarGift, UserStatusUpdate, UserTypingUpdate, WebviewResult } from './types/index.js';
27
27
  import { ParsedUpdateHandlerParams } from './updates/parsed.js';
28
28
  import { RawUpdateInfo } from './updates/types.js';
29
29
  import { InputStringSessionData } from './utils/string-session.js';
@@ -3818,6 +3818,7 @@ export interface TelegramClient extends ITelegramClient {
3818
3818
  * @param password 2FA password as plaintext
3819
3819
  */
3820
3820
  removeCloudPassword(password: string): Promise<void>;
3821
+ _normalizeInputStarGift(gift: InputStarGift): Promise<tl.TypeInputSavedStarGift>;
3821
3822
  /**
3822
3823
  * Accept, hide or convert a star gift.
3823
3824
  *
@@ -3826,8 +3827,8 @@ export interface TelegramClient extends ITelegramClient {
3826
3827
  * @returns Whether the action was successful
3827
3828
  */
3828
3829
  acceptStarGift(params: {
3829
- /** ID of the message containing the gift */
3830
- message: number | Message;
3830
+ /** Input star gift to accept */
3831
+ gift: InputStarGift;
3831
3832
  /**
3832
3833
  * Action to perform on the gift.
3833
3834
  * - `save` - save the gift to your profile
@@ -3939,12 +3940,41 @@ export interface TelegramClient extends ITelegramClient {
3939
3940
  *
3940
3941
  */
3941
3942
  getMyBoostSlots(): Promise<BoostSlot[]>;
3943
+ /** Get one or more saved star gifts by their IDs */
3944
+ getSavedStarGiftsById(gifts: MaybeArray<InputStarGift>): Promise<SavedStarGift[]>;
3945
+ /** Get a list of saved star gifts of a user */
3946
+ getSavedStarGifts(params: {
3947
+ /** Peer to get saved gifts from */
3948
+ owner: InputPeerLike;
3949
+ /** Whether to exclude hidden gifts */
3950
+ excludeHidden?: boolean;
3951
+ /** Whether to exclude publicly visible gifts */
3952
+ excludePublic?: boolean;
3953
+ /** Whether to exclude gifts with unlimited availability */
3954
+ excludeUnlimited?: boolean;
3955
+ /** Whether to exclude gifts with limited availability */
3956
+ excludeLimited?: boolean;
3957
+ /** Whether to exclude unique gifts */
3958
+ excludeUnique?: boolean;
3959
+ /** Whether to sort by value */
3960
+ sortByValue?: boolean;
3961
+ /** Offset for pagination */
3962
+ offset?: string;
3963
+ /** Limit for pagination */
3964
+ limit?: number;
3965
+ }): Promise<ArrayPaginated<SavedStarGift, string>>;
3942
3966
  /**
3943
3967
  * Get the list of available star gifts.
3944
3968
  * **Available**: 👤 users only
3945
3969
  *
3946
3970
  */
3947
3971
  getStarGiftOptions(): Promise<StarGift[]>;
3972
+ getStarGiftWithdrawalUrl(params: {
3973
+ /** The star gift to withdraw */
3974
+ gift: InputStarGift;
3975
+ /** 2FA password */
3976
+ password: string;
3977
+ }): Promise<string>;
3948
3978
  /**
3949
3979
  * Get a list of gifts sent to a user.
3950
3980
  *
@@ -4024,6 +4054,30 @@ export interface TelegramClient extends ITelegramClient {
4024
4054
  */
4025
4055
  chunkSize?: number;
4026
4056
  }): AsyncIterableIterator<Boost>;
4057
+ /**
4058
+ * Iterate over saved star gifts of a user,
4059
+ * wrapper over {@link getSavedStarGifts}
4060
+ */
4061
+ iterSavedStarGifts(params: {
4062
+ /** Peer to get saved gifts from */
4063
+ owner: InputPeerLike;
4064
+ /** Whether to exclude unsaved gifts */
4065
+ excludeUnsaved?: boolean;
4066
+ /** Whether to exclude saved gifts */
4067
+ excludeSaved?: boolean;
4068
+ /** Whether to exclude gifts with unlimited availability */
4069
+ excludeUnlimited?: boolean;
4070
+ /** Whether to exclude gifts with limited availability */
4071
+ excludeLimited?: boolean;
4072
+ /** Whether to exclude unique gifts */
4073
+ excludeUnique?: boolean;
4074
+ /** Whether to sort by value */
4075
+ sortByValue?: boolean;
4076
+ /** Offset for pagination */
4077
+ offset?: string;
4078
+ /** Limit for pagination */
4079
+ limit?: number;
4080
+ }): AsyncIterableIterator<SavedStarGift>;
4027
4081
  /**
4028
4082
  * Iterate over gifts sent to a given user.
4029
4083
  *
@@ -4090,8 +4144,8 @@ export interface TelegramClient extends ITelegramClient {
4090
4144
  * @returns Service message about the sent gift
4091
4145
  */
4092
4146
  sendStarGift(params: {
4093
- /** ID of the user to send the gift to */
4094
- userId: InputPeerLike;
4147
+ /** ID of the peer to send the gift to */
4148
+ peerId: InputPeerLike;
4095
4149
  /** ID of the gift to send */
4096
4150
  gift: Long | StarGift;
4097
4151
  /**
@@ -4161,8 +4215,8 @@ export interface TelegramClient extends ITelegramClient {
4161
4215
  * @returns Service message about the transferred gift
4162
4216
  */
4163
4217
  transferStarGift(params: {
4164
- /** ID of the message containing the gift */
4165
- message: number | Message;
4218
+ /** Star gift to transfer */
4219
+ gift: InputStarGift;
4166
4220
  /** ID of the user to transfer the gift to */
4167
4221
  recepient: InputPeerLike;
4168
4222
  /**
@@ -4184,8 +4238,7 @@ export interface TelegramClient extends ITelegramClient {
4184
4238
  * @returns Service message about the upgraded gift
4185
4239
  */
4186
4240
  upgradeStarGift(params: {
4187
- /** ID of the message containing the gift */
4188
- message: number | Message;
4241
+ gift: InputStarGift;
4189
4242
  /**
4190
4243
  * Whether to retain the original details of the gift
4191
4244
  * (like sender, recipient, date, message)
@@ -4997,6 +5050,8 @@ export interface TelegramClient extends ITelegramClient {
4997
5050
  peerId: InputPeerLike;
4998
5051
  /** Custom emoji ID or `null` to remove the emoji */
4999
5052
  emoji: tl.Long | null;
5053
+ /** When true, `emoji` is the ID of the collectible emoji */
5054
+ isCollectible?: boolean;
5000
5055
  /**
5001
5056
  * Date when the emoji status should expire (only if `emoji` is not `null`)
5002
5057
  */
@@ -23,7 +23,7 @@ import { QuoteParamsFrom } from './methods/messages/send-quote.js';
23
23
  import { CanApplyBoostResult } from './methods/premium/can-apply-boost.js';
24
24
  import { CanSendStoryResult } from './methods/stories/can-send-story.js';
25
25
  import { ITelegramStorageProvider } from './storage/provider.js';
26
- import { AllStories, ArrayPaginated, ArrayWithTotal, Boost, BoostSlot, BoostStats, BotChatJoinRequestUpdate, BotCommands, BotReactionCountUpdate, BotReactionUpdate, BotStoppedUpdate, BusinessCallbackQuery, BusinessChatLink, BusinessConnection, BusinessMessage, BusinessWorkHoursDay, CallbackQuery, Chat, ChatEvent, ChatInviteLink, ChatInviteLinkMember, ChatJoinRequestUpdate, ChatlistPreview, ChatMember, ChatMemberUpdate, ChatPreview, ChosenInlineResult, CollectibleInfo, DeleteBusinessMessageUpdate, DeleteMessageUpdate, DeleteStoryUpdate, Dialog, FactCheck, FileDownloadLocation, FileDownloadParameters, ForumTopic, FullChat, FullUser, GameHighScore, HistoryReadUpdate, InlineCallbackQuery, InlineQuery, InputChatEventFilters, InputDialogFolder, InputFileLike, InputInlineResult, InputMediaLike, InputMediaSticker, InputMessageId, InputPeerLike, InputPrivacyRule, InputReaction, InputStickerSet, InputStickerSetItem, InputText, InputWebview, MaybeDynamic, Message, MessageEffect, MessageMedia, MessageReactions, ParametersSkip2, ParsedUpdate, PeerReaction, PeerStories, Photo, Poll, PollUpdate, PollVoteUpdate, PreCheckoutQuery, RawDocument, ReplyMarkup, SentCode, StarGift, StarGiftUnique, StarsStatus, StarsTransaction, Sticker, StickerSet, StickerType, StoriesStealthMode, Story, StoryInteractions, StoryUpdate, StoryViewer, StoryViewersList, TakeoutSession, TextWithEntities, TypingStatus, UploadedFile, UploadFileLike, User, UserStarGift, UserStatusUpdate, UserTypingUpdate, WebviewResult } from './types/index.js';
26
+ import { AllStories, ArrayPaginated, ArrayWithTotal, Boost, BoostSlot, BoostStats, BotChatJoinRequestUpdate, BotCommands, BotReactionCountUpdate, BotReactionUpdate, BotStoppedUpdate, BusinessCallbackQuery, BusinessChatLink, BusinessConnection, BusinessMessage, BusinessWorkHoursDay, CallbackQuery, Chat, ChatEvent, ChatInviteLink, ChatInviteLinkMember, ChatJoinRequestUpdate, ChatlistPreview, ChatMember, ChatMemberUpdate, ChatPreview, ChosenInlineResult, CollectibleInfo, DeleteBusinessMessageUpdate, DeleteMessageUpdate, DeleteStoryUpdate, Dialog, FactCheck, FileDownloadLocation, FileDownloadParameters, ForumTopic, FullChat, FullUser, GameHighScore, HistoryReadUpdate, InlineCallbackQuery, InlineQuery, InputChatEventFilters, InputDialogFolder, InputFileLike, InputInlineResult, InputMediaLike, InputMediaSticker, InputMessageId, InputPeerLike, InputPrivacyRule, InputReaction, InputStarGift, InputStickerSet, InputStickerSetItem, InputText, InputWebview, MaybeDynamic, Message, MessageEffect, MessageMedia, MessageReactions, ParametersSkip2, ParsedUpdate, PeerReaction, PeerStories, Photo, Poll, PollUpdate, PollVoteUpdate, PreCheckoutQuery, RawDocument, ReplyMarkup, SavedStarGift, SentCode, StarGift, StarGiftUnique, StarsStatus, StarsTransaction, Sticker, StickerSet, StickerType, StoriesStealthMode, Story, StoryInteractions, StoryUpdate, StoryViewer, StoryViewersList, TakeoutSession, TextWithEntities, TypingStatus, UploadedFile, UploadFileLike, User, UserStarGift, UserStatusUpdate, UserTypingUpdate, WebviewResult } from './types/index.js';
27
27
  import { ParsedUpdateHandlerParams } from './updates/parsed.js';
28
28
  import { RawUpdateInfo } from './updates/types.js';
29
29
  import { InputStringSessionData } from './utils/string-session.js';
@@ -3818,6 +3818,7 @@ export interface TelegramClient extends ITelegramClient {
3818
3818
  * @param password 2FA password as plaintext
3819
3819
  */
3820
3820
  removeCloudPassword(password: string): Promise<void>;
3821
+ _normalizeInputStarGift(gift: InputStarGift): Promise<tl.TypeInputSavedStarGift>;
3821
3822
  /**
3822
3823
  * Accept, hide or convert a star gift.
3823
3824
  *
@@ -3826,8 +3827,8 @@ export interface TelegramClient extends ITelegramClient {
3826
3827
  * @returns Whether the action was successful
3827
3828
  */
3828
3829
  acceptStarGift(params: {
3829
- /** ID of the message containing the gift */
3830
- message: number | Message;
3830
+ /** Input star gift to accept */
3831
+ gift: InputStarGift;
3831
3832
  /**
3832
3833
  * Action to perform on the gift.
3833
3834
  * - `save` - save the gift to your profile
@@ -3939,12 +3940,41 @@ export interface TelegramClient extends ITelegramClient {
3939
3940
  *
3940
3941
  */
3941
3942
  getMyBoostSlots(): Promise<BoostSlot[]>;
3943
+ /** Get one or more saved star gifts by their IDs */
3944
+ getSavedStarGiftsById(gifts: MaybeArray<InputStarGift>): Promise<SavedStarGift[]>;
3945
+ /** Get a list of saved star gifts of a user */
3946
+ getSavedStarGifts(params: {
3947
+ /** Peer to get saved gifts from */
3948
+ owner: InputPeerLike;
3949
+ /** Whether to exclude hidden gifts */
3950
+ excludeHidden?: boolean;
3951
+ /** Whether to exclude publicly visible gifts */
3952
+ excludePublic?: boolean;
3953
+ /** Whether to exclude gifts with unlimited availability */
3954
+ excludeUnlimited?: boolean;
3955
+ /** Whether to exclude gifts with limited availability */
3956
+ excludeLimited?: boolean;
3957
+ /** Whether to exclude unique gifts */
3958
+ excludeUnique?: boolean;
3959
+ /** Whether to sort by value */
3960
+ sortByValue?: boolean;
3961
+ /** Offset for pagination */
3962
+ offset?: string;
3963
+ /** Limit for pagination */
3964
+ limit?: number;
3965
+ }): Promise<ArrayPaginated<SavedStarGift, string>>;
3942
3966
  /**
3943
3967
  * Get the list of available star gifts.
3944
3968
  * **Available**: 👤 users only
3945
3969
  *
3946
3970
  */
3947
3971
  getStarGiftOptions(): Promise<StarGift[]>;
3972
+ getStarGiftWithdrawalUrl(params: {
3973
+ /** The star gift to withdraw */
3974
+ gift: InputStarGift;
3975
+ /** 2FA password */
3976
+ password: string;
3977
+ }): Promise<string>;
3948
3978
  /**
3949
3979
  * Get a list of gifts sent to a user.
3950
3980
  *
@@ -4024,6 +4054,30 @@ export interface TelegramClient extends ITelegramClient {
4024
4054
  */
4025
4055
  chunkSize?: number;
4026
4056
  }): AsyncIterableIterator<Boost>;
4057
+ /**
4058
+ * Iterate over saved star gifts of a user,
4059
+ * wrapper over {@link getSavedStarGifts}
4060
+ */
4061
+ iterSavedStarGifts(params: {
4062
+ /** Peer to get saved gifts from */
4063
+ owner: InputPeerLike;
4064
+ /** Whether to exclude unsaved gifts */
4065
+ excludeUnsaved?: boolean;
4066
+ /** Whether to exclude saved gifts */
4067
+ excludeSaved?: boolean;
4068
+ /** Whether to exclude gifts with unlimited availability */
4069
+ excludeUnlimited?: boolean;
4070
+ /** Whether to exclude gifts with limited availability */
4071
+ excludeLimited?: boolean;
4072
+ /** Whether to exclude unique gifts */
4073
+ excludeUnique?: boolean;
4074
+ /** Whether to sort by value */
4075
+ sortByValue?: boolean;
4076
+ /** Offset for pagination */
4077
+ offset?: string;
4078
+ /** Limit for pagination */
4079
+ limit?: number;
4080
+ }): AsyncIterableIterator<SavedStarGift>;
4027
4081
  /**
4028
4082
  * Iterate over gifts sent to a given user.
4029
4083
  *
@@ -4090,8 +4144,8 @@ export interface TelegramClient extends ITelegramClient {
4090
4144
  * @returns Service message about the sent gift
4091
4145
  */
4092
4146
  sendStarGift(params: {
4093
- /** ID of the user to send the gift to */
4094
- userId: InputPeerLike;
4147
+ /** ID of the peer to send the gift to */
4148
+ peerId: InputPeerLike;
4095
4149
  /** ID of the gift to send */
4096
4150
  gift: Long | StarGift;
4097
4151
  /**
@@ -4161,8 +4215,8 @@ export interface TelegramClient extends ITelegramClient {
4161
4215
  * @returns Service message about the transferred gift
4162
4216
  */
4163
4217
  transferStarGift(params: {
4164
- /** ID of the message containing the gift */
4165
- message: number | Message;
4218
+ /** Star gift to transfer */
4219
+ gift: InputStarGift;
4166
4220
  /** ID of the user to transfer the gift to */
4167
4221
  recepient: InputPeerLike;
4168
4222
  /**
@@ -4184,8 +4238,7 @@ export interface TelegramClient extends ITelegramClient {
4184
4238
  * @returns Service message about the upgraded gift
4185
4239
  */
4186
4240
  upgradeStarGift(params: {
4187
- /** ID of the message containing the gift */
4188
- message: number | Message;
4241
+ gift: InputStarGift;
4189
4242
  /**
4190
4243
  * Whether to retain the original details of the gift
4191
4244
  * (like sender, recipient, date, message)
@@ -4997,6 +5050,8 @@ export interface TelegramClient extends ITelegramClient {
4997
5050
  peerId: InputPeerLike;
4998
5051
  /** Custom emoji ID or `null` to remove the emoji */
4999
5052
  emoji: tl.Long | null;
5053
+ /** When true, `emoji` is the ID of the collectible emoji */
5054
+ isCollectible?: boolean;
5000
5055
  /**
5001
5056
  * Date when the emoji status should expire (only if `emoji` is not `null`)
5002
5057
  */
@@ -213,6 +213,12 @@ async function _normalizeInputMedia(client, media, params = {}, uploadMedia = fa
213
213
  inputFile = uploaded.inputFile;
214
214
  mime = uploaded.mime;
215
215
  };
216
+ let videoCover;
217
+ if (media.type === "video" && media.cover) {
218
+ const inputMedia = await _normalizeInputMedia(client, media.cover);
219
+ typeAssertions.assertTypeIs("uploadMediaIfNeeded", inputMedia, "inputMediaPhoto");
220
+ videoCover = inputMedia.id;
221
+ }
216
222
  const uploadPeer = params.uploadPeer ?? { _: "inputPeerSelf" };
217
223
  const uploadMediaIfNeeded = async (inputMedia, photo) => {
218
224
  if (!uploadMedia) return inputMedia;
@@ -248,7 +254,9 @@ async function _normalizeInputMedia(client, media, params = {}, uploadMedia = fa
248
254
  fileReference: res.document.fileReference
249
255
  },
250
256
  ttlSeconds: media.ttlSeconds,
251
- spoiler: media.type === "video" && media.spoiler
257
+ spoiler: media.type === "video" && media.spoiler,
258
+ videoCover,
259
+ videoTimestamp: media.type === "video" ? media.timestamp : void 0
252
260
  };
253
261
  };
254
262
  const input = media.file;
@@ -358,7 +366,9 @@ async function _normalizeInputMedia(client, media, params = {}, uploadMedia = fa
358
366
  mimeType: mime,
359
367
  attributes,
360
368
  ttlSeconds: media.ttlSeconds,
361
- spoiler: media.type === "video" && media.spoiler
369
+ spoiler: media.type === "video" && media.spoiler,
370
+ videoTimestamp: media.type === "video" ? media.timestamp : void 0,
371
+ videoCover
362
372
  },
363
373
  false
364
374
  );
@@ -206,6 +206,12 @@ async function _normalizeInputMedia(client, media, params = {}, uploadMedia = fa
206
206
  inputFile = uploaded.inputFile;
207
207
  mime = uploaded.mime;
208
208
  };
209
+ let videoCover;
210
+ if (media.type === "video" && media.cover) {
211
+ const inputMedia = await _normalizeInputMedia(client, media.cover);
212
+ assertTypeIs("uploadMediaIfNeeded", inputMedia, "inputMediaPhoto");
213
+ videoCover = inputMedia.id;
214
+ }
209
215
  const uploadPeer = params.uploadPeer ?? { _: "inputPeerSelf" };
210
216
  const uploadMediaIfNeeded = async (inputMedia, photo) => {
211
217
  if (!uploadMedia) return inputMedia;
@@ -241,7 +247,9 @@ async function _normalizeInputMedia(client, media, params = {}, uploadMedia = fa
241
247
  fileReference: res.document.fileReference
242
248
  },
243
249
  ttlSeconds: media.ttlSeconds,
244
- spoiler: media.type === "video" && media.spoiler
250
+ spoiler: media.type === "video" && media.spoiler,
251
+ videoCover,
252
+ videoTimestamp: media.type === "video" ? media.timestamp : void 0
245
253
  };
246
254
  };
247
255
  const input = media.file;
@@ -351,7 +359,9 @@ async function _normalizeInputMedia(client, media, params = {}, uploadMedia = fa
351
359
  mimeType: mime,
352
360
  attributes,
353
361
  ttlSeconds: media.ttlSeconds,
354
- spoiler: media.type === "video" && media.spoiler
362
+ spoiler: media.type === "video" && media.spoiler,
363
+ videoTimestamp: media.type === "video" ? media.timestamp : void 0,
364
+ videoCover
355
365
  },
356
366
  false
357
367
  );
@@ -25,7 +25,8 @@ async function forwardMessagesById(client, params) {
25
25
  sendAs,
26
26
  noAuthor,
27
27
  noCaption,
28
- allowPaidFloodskip
28
+ allowPaidFloodskip,
29
+ videoTimestamp
29
30
  } = params;
30
31
  if (messages.length > 100) {
31
32
  throw new errors.MtArgumentError("You can forward no more than 100 messages at once");
@@ -45,7 +46,8 @@ async function forwardMessagesById(client, params) {
45
46
  noforwards: forbidForwards,
46
47
  sendAs: sendAs ? await resolvePeer.resolvePeer(client, sendAs) : void 0,
47
48
  quickReplyShortcut: sendCommon._normalizeQuickReplyShortcut(params.quickReply),
48
- allowPaidFloodskip
49
+ allowPaidFloodskip,
50
+ videoTimestamp
49
51
  });
50
52
  utils.assertIsUpdatesGroup("messages.forwardMessages", res);
51
53
  client.handleClientUpdate(res, !params.shouldDispatch);
@@ -57,6 +57,8 @@ export interface ForwardMessageOptions {
57
57
  * The Stars will be withdrawn from the bot's balance.
58
58
  */
59
59
  allowPaidFloodskip?: boolean;
60
+ /** Video timestamp to use for the forwarded video */
61
+ videoTimestamp?: number;
60
62
  }
61
63
  /**
62
64
  * Forward one or more messages by their IDs.
@@ -57,6 +57,8 @@ export interface ForwardMessageOptions {
57
57
  * The Stars will be withdrawn from the bot's balance.
58
58
  */
59
59
  allowPaidFloodskip?: boolean;
60
+ /** Video timestamp to use for the forwarded video */
61
+ videoTimestamp?: number;
60
62
  }
61
63
  /**
62
64
  * Forward one or more messages by their IDs.
@@ -18,7 +18,8 @@ async function forwardMessagesById(client, params) {
18
18
  sendAs,
19
19
  noAuthor,
20
20
  noCaption,
21
- allowPaidFloodskip
21
+ allowPaidFloodskip,
22
+ videoTimestamp
22
23
  } = params;
23
24
  if (messages.length > 100) {
24
25
  throw new MtArgumentError("You can forward no more than 100 messages at once");
@@ -38,7 +39,8 @@ async function forwardMessagesById(client, params) {
38
39
  noforwards: forbidForwards,
39
40
  sendAs: sendAs ? await resolvePeer(client, sendAs) : void 0,
40
41
  quickReplyShortcut: _normalizeQuickReplyShortcut(params.quickReply),
41
- allowPaidFloodskip
42
+ allowPaidFloodskip,
43
+ videoTimestamp
42
44
  });
43
45
  assertIsUpdatesGroup("messages.forwardMessages", res);
44
46
  client.handleClientUpdate(res, !params.shouldDispatch);
@@ -0,0 +1,23 @@
1
+ if (typeof globalThis !== "undefined" && !globalThis._MTCUTE_CJS_DEPRECATION_WARNED) {
2
+ globalThis._MTCUTE_CJS_DEPRECATION_WARNED = true;
3
+ console.warn("[@mtcute/core] CommonJS support is deprecated and will be removed in 0.25.0. Please consider switching to ESM, it's " + (/* @__PURE__ */ new Date()).getFullYear() + " already.");
4
+ console.warn("[@mtcute/core] Learn more about switching to ESM: https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c");
5
+ }
6
+ "use strict";
7
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
8
+ const resolvePeer = require("../users/resolve-peer.cjs");
9
+ async function _normalizeInputStarGift(client, gift) {
10
+ if ("message" in gift) {
11
+ return {
12
+ _: "inputSavedStarGiftUser",
13
+ msgId: typeof gift.message === "number" ? gift.message : gift.message.id
14
+ };
15
+ } else {
16
+ return {
17
+ _: "inputSavedStarGiftChat",
18
+ peer: await resolvePeer.resolvePeer(client, gift.owner),
19
+ savedId: gift.savedId
20
+ };
21
+ }
22
+ }
23
+ exports._normalizeInputStarGift = _normalizeInputStarGift;
@@ -0,0 +1,4 @@
1
+ import { tl } from '@mtcute/tl';
2
+ import { ITelegramClient } from '../../client.types.js';
3
+ import { InputStarGift } from '../../types/index.js';
4
+ export declare function _normalizeInputStarGift(client: ITelegramClient, gift: InputStarGift): Promise<tl.TypeInputSavedStarGift>;
@@ -0,0 +1,4 @@
1
+ import { tl } from '@mtcute/tl';
2
+ import { ITelegramClient } from '../../client.types.js';
3
+ import { InputStarGift } from '../../types/index.js';
4
+ export declare function _normalizeInputStarGift(client: ITelegramClient, gift: InputStarGift): Promise<tl.TypeInputSavedStarGift>;
@@ -0,0 +1,18 @@
1
+ import { resolvePeer } from "../users/resolve-peer.js";
2
+ async function _normalizeInputStarGift(client, gift) {
3
+ if ("message" in gift) {
4
+ return {
5
+ _: "inputSavedStarGiftUser",
6
+ msgId: typeof gift.message === "number" ? gift.message : gift.message.id
7
+ };
8
+ } else {
9
+ return {
10
+ _: "inputSavedStarGiftChat",
11
+ peer: await resolvePeer(client, gift.owner),
12
+ savedId: gift.savedId
13
+ };
14
+ }
15
+ }
16
+ export {
17
+ _normalizeInputStarGift
18
+ };
@@ -5,17 +5,18 @@ if (typeof globalThis !== "undefined" && !globalThis._MTCUTE_CJS_DEPRECATION_WAR
5
5
  }
6
6
  "use strict";
7
7
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
8
+ const _normalizeInputStarGift = require("./_normalize-input-star-gift.cjs");
8
9
  async function acceptStarGift(client, params) {
9
10
  const { action } = params;
10
- const message = typeof params.message === "number" ? params.message : params.message.id;
11
+ const inputStarGift = await _normalizeInputStarGift._normalizeInputStarGift(client, params.gift);
11
12
  return client.call(
12
13
  action === "convert" ? {
13
14
  _: "payments.convertStarGift",
14
- msgId: message
15
+ stargift: inputStarGift
15
16
  } : {
16
17
  _: "payments.saveStarGift",
17
18
  unsave: action === "hide",
18
- msgId: message
19
+ stargift: inputStarGift
19
20
  }
20
21
  );
21
22
  }
@@ -1,13 +1,13 @@
1
1
  import { ITelegramClient } from '../../client.types.js';
2
- import { Message } from '../../types/messages/message.js';
2
+ import { InputStarGift } from '../../types/index.js';
3
3
  /**
4
4
  * Accept, hide or convert a star gift.
5
5
  *
6
6
  * @returns Whether the action was successful
7
7
  */
8
8
  export declare function acceptStarGift(client: ITelegramClient, params: {
9
- /** ID of the message containing the gift */
10
- message: number | Message;
9
+ /** Input star gift to accept */
10
+ gift: InputStarGift;
11
11
  /**
12
12
  * Action to perform on the gift.
13
13
  * - `save` - save the gift to your profile