@mtcute/core 0.27.2 → 0.27.3
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.
- package/client.cjs +80 -68
- package/client.js +80 -68
- package/highlevel/base.cjs +4 -0
- package/highlevel/base.d.cts +1 -0
- package/highlevel/base.d.ts +1 -0
- package/highlevel/base.js +4 -0
- package/highlevel/client.d.cts +322 -278
- package/highlevel/client.d.ts +322 -278
- package/highlevel/methods/gifts/get-star-gift-upgrade-options.cjs +30 -0
- package/highlevel/methods/gifts/get-star-gift-upgrade-options.d.cts +12 -0
- package/highlevel/methods/gifts/get-star-gift-upgrade-options.d.ts +12 -0
- package/highlevel/methods/gifts/get-star-gift-upgrade-options.js +25 -0
- package/highlevel/methods/gifts/resolve-star-gift-offer.cjs +17 -0
- package/highlevel/methods/gifts/resolve-star-gift-offer.d.cts +18 -0
- package/highlevel/methods/gifts/resolve-star-gift-offer.d.ts +18 -0
- package/highlevel/methods/gifts/resolve-star-gift-offer.js +12 -0
- package/highlevel/methods/gifts/send-star-gift-offer.cjs +26 -0
- package/highlevel/methods/gifts/send-star-gift-offer.d.cts +26 -0
- package/highlevel/methods/gifts/send-star-gift-offer.d.ts +26 -0
- package/highlevel/methods/gifts/send-star-gift-offer.js +21 -0
- package/highlevel/methods/{premium → gifts}/set-gift-resale-price.cjs +2 -5
- package/highlevel/methods/{premium → gifts}/set-gift-resale-price.d.cts +2 -2
- package/highlevel/methods/{premium → gifts}/set-gift-resale-price.d.ts +2 -2
- package/highlevel/methods/{premium → gifts}/set-gift-resale-price.js +2 -5
- package/highlevel/methods/premium/_normalize-stars-amount.cjs +18 -0
- package/highlevel/methods/premium/_normalize-stars-amount.d.cts +12 -0
- package/highlevel/methods/premium/_normalize-stars-amount.d.ts +12 -0
- package/highlevel/methods/premium/_normalize-stars-amount.js +13 -0
- package/highlevel/methods.d.cts +23 -18
- package/highlevel/methods.d.ts +23 -18
- package/highlevel/types/messages/message-action.cjs +27 -4
- package/highlevel/types/messages/message-action.d.cts +28 -1
- package/highlevel/types/messages/message-action.d.ts +28 -1
- package/highlevel/types/messages/message-action.js +27 -4
- package/highlevel/types/premium/saved-star-gift.cjs +4 -0
- package/highlevel/types/premium/saved-star-gift.d.cts +2 -0
- package/highlevel/types/premium/saved-star-gift.d.ts +2 -0
- package/highlevel/types/premium/saved-star-gift.js +4 -0
- package/highlevel/types/premium/star-gift-unique.cjs +8 -0
- package/highlevel/types/premium/star-gift-unique.d.cts +4 -0
- package/highlevel/types/premium/star-gift-unique.d.ts +4 -0
- package/highlevel/types/premium/star-gift-unique.js +8 -0
- package/highlevel/types/premium/star-gift.cjs +12 -3
- package/highlevel/types/premium/star-gift.d.cts +5 -0
- package/highlevel/types/premium/star-gift.d.ts +5 -0
- package/highlevel/types/premium/star-gift.js +12 -3
- package/highlevel/types/premium/stars-transaction.cjs +6 -0
- package/highlevel/types/premium/stars-transaction.d.cts +6 -0
- package/highlevel/types/premium/stars-transaction.d.ts +6 -0
- package/highlevel/types/premium/stars-transaction.js +6 -0
- package/highlevel/updates/manager.cjs +7 -0
- package/highlevel/updates/manager.js +7 -0
- package/methods.cjs +40 -34
- package/methods.js +23 -17
- package/network/middlewares/internal-errors.cjs +5 -0
- package/network/middlewares/internal-errors.js +5 -0
- package/network/network-manager.cjs +1 -1
- package/network/network-manager.js +1 -1
- package/package.json +2 -2
- package/utils/binary/compat.cjs +12 -0
- package/utils/binary/compat.js +12 -0
- /package/highlevel/methods/{premium → gifts}/_normalize-input-star-gift.cjs +0 -0
- /package/highlevel/methods/{premium → gifts}/_normalize-input-star-gift.d.cts +0 -0
- /package/highlevel/methods/{premium → gifts}/_normalize-input-star-gift.d.ts +0 -0
- /package/highlevel/methods/{premium → gifts}/_normalize-input-star-gift.js +0 -0
- /package/highlevel/methods/{premium → gifts}/accept-star-gift.cjs +0 -0
- /package/highlevel/methods/{premium → gifts}/accept-star-gift.d.cts +0 -0
- /package/highlevel/methods/{premium → gifts}/accept-star-gift.d.ts +0 -0
- /package/highlevel/methods/{premium → gifts}/accept-star-gift.js +0 -0
- /package/highlevel/methods/{premium → gifts}/buy-resale-gift.cjs +0 -0
- /package/highlevel/methods/{premium → gifts}/buy-resale-gift.d.cts +0 -0
- /package/highlevel/methods/{premium → gifts}/buy-resale-gift.d.ts +0 -0
- /package/highlevel/methods/{premium → gifts}/buy-resale-gift.js +0 -0
- /package/highlevel/methods/{premium → gifts}/get-resale-star-gifts.cjs +0 -0
- /package/highlevel/methods/{premium → gifts}/get-resale-star-gifts.d.cts +0 -0
- /package/highlevel/methods/{premium → gifts}/get-resale-star-gifts.d.ts +0 -0
- /package/highlevel/methods/{premium → gifts}/get-resale-star-gifts.js +0 -0
- /package/highlevel/methods/{premium → gifts}/get-saved-star-gifts-by-id.cjs +0 -0
- /package/highlevel/methods/{premium → gifts}/get-saved-star-gifts-by-id.d.cts +0 -0
- /package/highlevel/methods/{premium → gifts}/get-saved-star-gifts-by-id.d.ts +0 -0
- /package/highlevel/methods/{premium → gifts}/get-saved-star-gifts-by-id.js +0 -0
- /package/highlevel/methods/{premium → gifts}/get-saved-star-gifts.cjs +0 -0
- /package/highlevel/methods/{premium → gifts}/get-saved-star-gifts.d.cts +0 -0
- /package/highlevel/methods/{premium → gifts}/get-saved-star-gifts.d.ts +0 -0
- /package/highlevel/methods/{premium → gifts}/get-saved-star-gifts.js +0 -0
- /package/highlevel/methods/{premium → gifts}/get-star-gift-options.cjs +0 -0
- /package/highlevel/methods/{premium → gifts}/get-star-gift-options.d.cts +0 -0
- /package/highlevel/methods/{premium → gifts}/get-star-gift-options.d.ts +0 -0
- /package/highlevel/methods/{premium → gifts}/get-star-gift-options.js +0 -0
- /package/highlevel/methods/{premium → gifts}/get-star-gift-value.cjs +0 -0
- /package/highlevel/methods/{premium → gifts}/get-star-gift-value.d.cts +0 -0
- /package/highlevel/methods/{premium → gifts}/get-star-gift-value.d.ts +0 -0
- /package/highlevel/methods/{premium → gifts}/get-star-gift-value.js +0 -0
- /package/highlevel/methods/{premium → gifts}/get-star-gift-withdrawal-url.cjs +0 -0
- /package/highlevel/methods/{premium → gifts}/get-star-gift-withdrawal-url.d.cts +0 -0
- /package/highlevel/methods/{premium → gifts}/get-star-gift-withdrawal-url.d.ts +0 -0
- /package/highlevel/methods/{premium → gifts}/get-star-gift-withdrawal-url.js +0 -0
- /package/highlevel/methods/{premium → gifts}/get-unique-star-gift.cjs +0 -0
- /package/highlevel/methods/{premium → gifts}/get-unique-star-gift.d.cts +0 -0
- /package/highlevel/methods/{premium → gifts}/get-unique-star-gift.d.ts +0 -0
- /package/highlevel/methods/{premium → gifts}/get-unique-star-gift.js +0 -0
- /package/highlevel/methods/{premium → gifts}/iter-saved-star-gifts.cjs +0 -0
- /package/highlevel/methods/{premium → gifts}/iter-saved-star-gifts.d.cts +0 -0
- /package/highlevel/methods/{premium → gifts}/iter-saved-star-gifts.d.ts +0 -0
- /package/highlevel/methods/{premium → gifts}/iter-saved-star-gifts.js +0 -0
- /package/highlevel/methods/{premium → gifts}/pin-star-gift.cjs +0 -0
- /package/highlevel/methods/{premium → gifts}/pin-star-gift.d.cts +0 -0
- /package/highlevel/methods/{premium → gifts}/pin-star-gift.d.ts +0 -0
- /package/highlevel/methods/{premium → gifts}/pin-star-gift.js +0 -0
- /package/highlevel/methods/{premium → gifts}/prepay-star-gift-upgrade.cjs +0 -0
- /package/highlevel/methods/{premium → gifts}/prepay-star-gift-upgrade.d.cts +0 -0
- /package/highlevel/methods/{premium → gifts}/prepay-star-gift-upgrade.d.ts +0 -0
- /package/highlevel/methods/{premium → gifts}/prepay-star-gift-upgrade.js +0 -0
- /package/highlevel/methods/{premium → gifts}/send-star-gift.cjs +0 -0
- /package/highlevel/methods/{premium → gifts}/send-star-gift.d.cts +0 -0
- /package/highlevel/methods/{premium → gifts}/send-star-gift.d.ts +0 -0
- /package/highlevel/methods/{premium → gifts}/send-star-gift.js +0 -0
- /package/highlevel/methods/{premium → gifts}/transfer-star-gift.cjs +0 -0
- /package/highlevel/methods/{premium → gifts}/transfer-star-gift.d.cts +0 -0
- /package/highlevel/methods/{premium → gifts}/transfer-star-gift.d.ts +0 -0
- /package/highlevel/methods/{premium → gifts}/transfer-star-gift.js +0 -0
- /package/highlevel/methods/{premium → gifts}/upgrade-star-gift.cjs +0 -0
- /package/highlevel/methods/{premium → gifts}/upgrade-star-gift.d.cts +0 -0
- /package/highlevel/methods/{premium → gifts}/upgrade-star-gift.d.ts +0 -0
- /package/highlevel/methods/{premium → gifts}/upgrade-star-gift.js +0 -0
package/highlevel/client.d.ts
CHANGED
|
@@ -7,6 +7,8 @@ import { ITelegramClient } from './client.types.js';
|
|
|
7
7
|
import { LogOutResult } from './methods/auth/log-out.js';
|
|
8
8
|
import { CreateGroupResult } from './methods/chats/create-group.js';
|
|
9
9
|
import { GetForumTopicsOffset, getForumTopics } from './methods/forums/get-forum-topics.js';
|
|
10
|
+
import { InputStarGiftAttributeIds, ResaleStarGiftsMeta } from './methods/gifts/get-resale-star-gifts.js';
|
|
11
|
+
import { StarGiftUpgradeOptions } from './methods/gifts/get-star-gift-upgrade-options.js';
|
|
10
12
|
import { GetInviteLinksOffset, getInviteLinks } from './methods/invite-links/get-invite-links.js';
|
|
11
13
|
import { DeleteMessagesParams } from './methods/messages/delete-messages.js';
|
|
12
14
|
import { ForwardMessageOptions } from './methods/messages/forward-messages.js';
|
|
@@ -20,8 +22,8 @@ import { CommonSendParams } from './methods/messages/send-common.js';
|
|
|
20
22
|
import { SendCopyGroupParams } from './methods/messages/send-copy-group.js';
|
|
21
23
|
import { SendCopyParams } from './methods/messages/send-copy.js';
|
|
22
24
|
import { QuoteParamsFrom } from './methods/messages/send-quote.js';
|
|
25
|
+
import { InputStarsAmount } from './methods/premium/_normalize-stars-amount.js';
|
|
23
26
|
import { CanApplyBoostResult } from './methods/premium/can-apply-boost.js';
|
|
24
|
-
import { InputStarGiftAttributeIds, ResaleStarGiftsMeta } from './methods/premium/get-resale-star-gifts.js';
|
|
25
27
|
import { CanSendStoryResult } from './methods/stories/can-send-story.js';
|
|
26
28
|
import { ITelegramStorageProvider } from './storage/provider.js';
|
|
27
29
|
import { AllStories, ArrayPaginated, ArrayPaginatedWithMeta, ArrayWithTotal, Audio, 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, InputDocumentId, InputFileLike, InputInlineResult, InputMediaAudio, InputMediaLike, InputMediaSticker, InputMessageId, InputPeerLike, InputPrivacyRule, InputReaction, InputStarGift, InputStickerSet, InputStickerSetItem, InputText, InputWebview, MaybeDynamic, Message, MessageEffect, MessageMedia, MessageReactions, ParametersSkip2, ParsedUpdate, Peer, PeerReaction, PeerSettings, PeerStories, Photo, Poll, PollUpdate, PollVoteUpdate, PreCheckoutQuery, RawDocument, ReplyMarkup, SavedStarGift, SentCode, StarGift, StarGiftUnique, StarGiftValue, StarsStatus, StarsTransaction, Sticker, StickerSet, StickerType, StoriesStealthMode, Story, StoryInteractions, StoryUpdate, StoryViewer, StoryViewersList, TakeoutSession, TextWithEntities, TypingStatus, UploadedFile, UploadFileLike, User, UserStatusUpdate, UserTypingUpdate, WebPageMedia, WebviewResult } from './types/index.js';
|
|
@@ -31,12 +33,12 @@ import { InputStringSessionData } from './utils/string-session.js';
|
|
|
31
33
|
import { Emitter } from '@fuman/utils';
|
|
32
34
|
import { getChatEventLog } from './methods/chats/get-chat-event-log.js';
|
|
33
35
|
import { getChatMembers } from './methods/chats/get-chat-members.js';
|
|
36
|
+
import { getSavedStarGifts } from './methods/gifts/get-saved-star-gifts.js';
|
|
34
37
|
import { getInviteLinkMembers } from './methods/invite-links/get-invite-link-members.js';
|
|
35
38
|
import { sendMediaGroup } from './methods/messages/send-media-group.js';
|
|
36
39
|
import { sendMedia } from './methods/messages/send-media.js';
|
|
37
40
|
import { sendText } from './methods/messages/send-text.js';
|
|
38
41
|
import { getBoosts } from './methods/premium/get-boosts.js';
|
|
39
|
-
import { getSavedStarGifts } from './methods/premium/get-saved-star-gifts.js';
|
|
40
42
|
import { getStarsTransactions } from './methods/premium/get-stars-transactions.js';
|
|
41
43
|
import { getAllStories } from './methods/stories/get-all-stories.js';
|
|
42
44
|
import { getProfileStories } from './methods/stories/get-profile-stories.js';
|
|
@@ -2378,6 +2380,313 @@ export interface TelegramClient extends ITelegramClient {
|
|
|
2378
2380
|
*/
|
|
2379
2381
|
shouldDispatch?: true;
|
|
2380
2382
|
}): Promise<Message>;
|
|
2383
|
+
_normalizeInputStarGift(gift: InputStarGift): Promise<tl.TypeInputSavedStarGift>;
|
|
2384
|
+
/**
|
|
2385
|
+
* Accept, hide or convert a star gift.
|
|
2386
|
+
*
|
|
2387
|
+
* **Available**: 👤 users only
|
|
2388
|
+
*
|
|
2389
|
+
* @returns Whether the action was successful
|
|
2390
|
+
*/
|
|
2391
|
+
acceptStarGift(params: {
|
|
2392
|
+
/** Input star gift to accept */
|
|
2393
|
+
gift: InputStarGift;
|
|
2394
|
+
/**
|
|
2395
|
+
* Action to perform on the gift.
|
|
2396
|
+
* - `save` - save the gift to your profile
|
|
2397
|
+
* - `hide` - hide the gift from your profile
|
|
2398
|
+
* - `convert` - convert the gift to stars (can't be undone)
|
|
2399
|
+
*/
|
|
2400
|
+
action: 'save' | 'hide' | 'convert';
|
|
2401
|
+
}): Promise<boolean>;
|
|
2402
|
+
buyResaleGift(params: {
|
|
2403
|
+
/** Slug of the star gift to buy */
|
|
2404
|
+
slug: string;
|
|
2405
|
+
/** ID of the user to buy the gift for */
|
|
2406
|
+
recipient: InputPeerLike;
|
|
2407
|
+
/**
|
|
2408
|
+
* Whether to dispatch the new message event
|
|
2409
|
+
* to the client's update handler.
|
|
2410
|
+
*/
|
|
2411
|
+
shouldDispatch?: true;
|
|
2412
|
+
/** Whether to use TON currency for payment */
|
|
2413
|
+
ton?: boolean;
|
|
2414
|
+
}): Promise<Message | null>;
|
|
2415
|
+
/**
|
|
2416
|
+
* Get a list of star gifts up for resale
|
|
2417
|
+
* **Available**: 👤 users only
|
|
2418
|
+
*
|
|
2419
|
+
*/
|
|
2420
|
+
getStarGiftResaleOptions(params: {
|
|
2421
|
+
/** ID of the gift to get resale options for */
|
|
2422
|
+
giftId: tl.Long;
|
|
2423
|
+
/**
|
|
2424
|
+
* Sorting attribute
|
|
2425
|
+
*
|
|
2426
|
+
* - `price`: Sort by price
|
|
2427
|
+
* - `num`: Sort by its unique number
|
|
2428
|
+
*/
|
|
2429
|
+
sort?: 'price' | 'num';
|
|
2430
|
+
/**
|
|
2431
|
+
* Hash of the `attributes` field, as returned by the server in the first response
|
|
2432
|
+
*/
|
|
2433
|
+
attributesHash?: Long;
|
|
2434
|
+
/** Attributes to filter for */
|
|
2435
|
+
attributes?: tl.TypeStarGiftAttributeId[] | InputStarGiftAttributeIds;
|
|
2436
|
+
/** Offset for pagination */
|
|
2437
|
+
offset?: string;
|
|
2438
|
+
/** Limit for pagination */
|
|
2439
|
+
limit?: number;
|
|
2440
|
+
}): Promise<ArrayPaginatedWithMeta<StarGiftUnique, string, ResaleStarGiftsMeta>>;
|
|
2441
|
+
/** Get one or more saved star gifts by their IDs */
|
|
2442
|
+
getSavedStarGiftsById(gifts: MaybeArray<InputStarGift>): Promise<SavedStarGift[]>;
|
|
2443
|
+
/**
|
|
2444
|
+
* Get a list of saved star gifts of a user/channel
|
|
2445
|
+
*
|
|
2446
|
+
* Note that filters currently only work for channels
|
|
2447
|
+
* **Available**: 👤 users only
|
|
2448
|
+
*
|
|
2449
|
+
*/
|
|
2450
|
+
getSavedStarGifts(params: {
|
|
2451
|
+
/** Peer to get saved gifts from */
|
|
2452
|
+
owner: InputPeerLike;
|
|
2453
|
+
/** Whether to exclude hidden gifts */
|
|
2454
|
+
excludeHidden?: boolean;
|
|
2455
|
+
/** Whether to exclude publicly visible gifts */
|
|
2456
|
+
excludePublic?: boolean;
|
|
2457
|
+
/** Whether to exclude gifts with unlimited availability */
|
|
2458
|
+
excludeUnlimited?: boolean;
|
|
2459
|
+
/** Whether to exclude unique gifts */
|
|
2460
|
+
excludeUnique?: boolean;
|
|
2461
|
+
/** Whether to exclude gifts that cannot be upgraded (either not limited or already upgraded) */
|
|
2462
|
+
excludeUnupgradable?: boolean;
|
|
2463
|
+
/** Whether to exclude gifts that can be upgraded */
|
|
2464
|
+
excludeUpgradable?: boolean;
|
|
2465
|
+
/** Whether to exclude "hosted" gifts (i.e. those that are actually stored on the TON blockchain) */
|
|
2466
|
+
excludeHosted?: boolean;
|
|
2467
|
+
/** Whether to only return gifts with peer color available */
|
|
2468
|
+
peerColorAvailable?: boolean;
|
|
2469
|
+
/** ID of the collection to get gifts from */
|
|
2470
|
+
collectionId?: number;
|
|
2471
|
+
/** Whether to sort by value */
|
|
2472
|
+
sortByValue?: boolean;
|
|
2473
|
+
/** Offset for pagination */
|
|
2474
|
+
offset?: string;
|
|
2475
|
+
/** Limit for pagination */
|
|
2476
|
+
limit?: number;
|
|
2477
|
+
}): Promise<ArrayPaginated<SavedStarGift, string>>;
|
|
2478
|
+
/**
|
|
2479
|
+
* Get the list of available star gifts.
|
|
2480
|
+
* **Available**: 👤 users only
|
|
2481
|
+
*
|
|
2482
|
+
*/
|
|
2483
|
+
getStarGiftOptions(): Promise<StarGift[]>;
|
|
2484
|
+
/**
|
|
2485
|
+
* Get a list of all possible attributes when upgrading a given star gift
|
|
2486
|
+
*/
|
|
2487
|
+
getStarGiftUpgradeOptions(giftId: tl.Long): Promise<StarGiftUpgradeOptions>;
|
|
2488
|
+
/**
|
|
2489
|
+
* Get the value of a unique star gift
|
|
2490
|
+
* **Available**: 👤 users only
|
|
2491
|
+
*
|
|
2492
|
+
*/
|
|
2493
|
+
getStarGiftValue(params: {
|
|
2494
|
+
/** Slug of the star gift */
|
|
2495
|
+
slug: string;
|
|
2496
|
+
}): Promise<StarGiftValue>;
|
|
2497
|
+
getStarGiftWithdrawalUrl(params: {
|
|
2498
|
+
/** The star gift to withdraw */
|
|
2499
|
+
gift: InputStarGift;
|
|
2500
|
+
/** 2FA password */
|
|
2501
|
+
password: string;
|
|
2502
|
+
}): Promise<string>;
|
|
2503
|
+
/**
|
|
2504
|
+
* Get information about a unique star gift by its slug
|
|
2505
|
+
* **Available**: 👤 users only
|
|
2506
|
+
*
|
|
2507
|
+
*/
|
|
2508
|
+
getUniqueStarGift(slug: string): Promise<StarGiftUnique>;
|
|
2509
|
+
/**
|
|
2510
|
+
* Iterate over saved star gifts of a user,
|
|
2511
|
+
* wrapper over {@link getSavedStarGifts}
|
|
2512
|
+
* **Available**: 👤 users only
|
|
2513
|
+
*
|
|
2514
|
+
*/
|
|
2515
|
+
iterSavedStarGifts(params: Parameters<typeof getSavedStarGifts>[1] & {
|
|
2516
|
+
/**
|
|
2517
|
+
* Number of gifts to fetch per request
|
|
2518
|
+
*
|
|
2519
|
+
* @default 100
|
|
2520
|
+
*/
|
|
2521
|
+
chunkSize?: number;
|
|
2522
|
+
/**
|
|
2523
|
+
* Total number of gifts to fetch
|
|
2524
|
+
*
|
|
2525
|
+
* @default Infinity
|
|
2526
|
+
*/
|
|
2527
|
+
limit?: number;
|
|
2528
|
+
}): AsyncIterableIterator<SavedStarGift>;
|
|
2529
|
+
/**
|
|
2530
|
+
* Toggles whether one or more star gift is pinned to the top of the list
|
|
2531
|
+
* **Available**: 👤 users only
|
|
2532
|
+
*
|
|
2533
|
+
*/
|
|
2534
|
+
togglePinnedStarGifts(params: {
|
|
2535
|
+
/** One or more gifts to pin */
|
|
2536
|
+
gifts: MaybeArray<InputStarGift>;
|
|
2537
|
+
/** Peer where the gift is sent */
|
|
2538
|
+
peer: InputPeerLike;
|
|
2539
|
+
}): Promise<void>;
|
|
2540
|
+
/**
|
|
2541
|
+
* Pay for other user's star gift upgrade.
|
|
2542
|
+
*
|
|
2543
|
+
* > **Note**: this method is not indended to be used by full-fledged clients,
|
|
2544
|
+
* > as this method hides the actual invoice and payment form from the user.
|
|
2545
|
+
* > For GUI clients, you should refer to the method's source code and
|
|
2546
|
+
* > present the payment form to the user.
|
|
2547
|
+
*
|
|
2548
|
+
* **Available**: 👤 users only
|
|
2549
|
+
*
|
|
2550
|
+
* @returns Service message about the payment for the upgrade, if one was generated.
|
|
2551
|
+
*/
|
|
2552
|
+
prepayStarGiftUpgrade(params: {
|
|
2553
|
+
peer: InputPeerLike;
|
|
2554
|
+
/** Prepaid upgrade hash, taken from `SavedStarGift.prepaidUpgradeHash` */
|
|
2555
|
+
hash: string;
|
|
2556
|
+
/**
|
|
2557
|
+
* Whether to dispatch the new message event
|
|
2558
|
+
* to the client's update handler.
|
|
2559
|
+
*/
|
|
2560
|
+
shouldDispatch?: true;
|
|
2561
|
+
}): Promise<Message | null>;
|
|
2562
|
+
/**
|
|
2563
|
+
* Accept or decline a purchase offer for a star gift
|
|
2564
|
+
*
|
|
2565
|
+
* @returns The generated service message
|
|
2566
|
+
*/
|
|
2567
|
+
resolveStarGiftOffer(options: {
|
|
2568
|
+
/** ID of the message containing the offer */
|
|
2569
|
+
message: number;
|
|
2570
|
+
/** Whether to accept or decline the offer */
|
|
2571
|
+
action: 'accept' | 'decline';
|
|
2572
|
+
/**
|
|
2573
|
+
* Whether to dispatch the new message event
|
|
2574
|
+
* to the client's update handler.
|
|
2575
|
+
*/
|
|
2576
|
+
shouldDispatch?: true;
|
|
2577
|
+
}): Promise<Message>;
|
|
2578
|
+
/**
|
|
2579
|
+
* Create a purchase offer for a unique star gift
|
|
2580
|
+
* @param client
|
|
2581
|
+
* @param params
|
|
2582
|
+
*/
|
|
2583
|
+
sendStarGiftOffer(params: {
|
|
2584
|
+
/** ID of the peer to send the offer to */
|
|
2585
|
+
peerId: InputPeerLike;
|
|
2586
|
+
/** Slug of the star gift to create an offer for */
|
|
2587
|
+
slug: string;
|
|
2588
|
+
/** Amount of stars to offer */
|
|
2589
|
+
price: InputStarsAmount;
|
|
2590
|
+
/** Duration of the offer in seconds */
|
|
2591
|
+
duration: number;
|
|
2592
|
+
/** When the recipient has paid messages enabled, the maximum number of stars that you are willing to spend */
|
|
2593
|
+
allowPaidMessages?: tl.Long;
|
|
2594
|
+
/**
|
|
2595
|
+
* Whether to dispatch the new message event
|
|
2596
|
+
* to the client's update handler.
|
|
2597
|
+
*/
|
|
2598
|
+
shouldDispatch?: true;
|
|
2599
|
+
}): Promise<Message>;
|
|
2600
|
+
/**
|
|
2601
|
+
* Send a star gift to a user.
|
|
2602
|
+
*
|
|
2603
|
+
* > **Note**: this method is not indended to be used by full-fledged clients,
|
|
2604
|
+
* > as this method hides the actual invoice and payment form from the user.
|
|
2605
|
+
* > For GUI clients, you should refer to the method's source code and
|
|
2606
|
+
* > present the payment form to the user.
|
|
2607
|
+
*
|
|
2608
|
+
* **Available**: 👤 users only
|
|
2609
|
+
*
|
|
2610
|
+
* @returns Service message about the sent gift, if one was generated.
|
|
2611
|
+
*/
|
|
2612
|
+
sendStarGift(params: {
|
|
2613
|
+
/** ID of the peer to send the gift to */
|
|
2614
|
+
peerId: InputPeerLike;
|
|
2615
|
+
/** ID of the gift to send */
|
|
2616
|
+
gift: Long | StarGift;
|
|
2617
|
+
/**
|
|
2618
|
+
* Whether to send the gift anonymously
|
|
2619
|
+
* (i.e. if the recipient chooses to display the gift
|
|
2620
|
+
* on their profile, your name won't be visible)
|
|
2621
|
+
*/
|
|
2622
|
+
anonymous?: boolean;
|
|
2623
|
+
/** Message to send along with the gift */
|
|
2624
|
+
message?: InputText;
|
|
2625
|
+
/** Whether to automatically upgrade the gift to a unique star gift */
|
|
2626
|
+
withUpgrade?: boolean;
|
|
2627
|
+
/**
|
|
2628
|
+
* Whether to dispatch the new message event
|
|
2629
|
+
* to the client's update handler.
|
|
2630
|
+
*/
|
|
2631
|
+
shouldDispatch?: true;
|
|
2632
|
+
}): Promise<Message | null>;
|
|
2633
|
+
/** Set resale price for an owned star gift */
|
|
2634
|
+
setResaleStarGiftPrice(params: {
|
|
2635
|
+
/** Star gift to update the price of */
|
|
2636
|
+
gift: InputStarGift;
|
|
2637
|
+
/**
|
|
2638
|
+
* New price of the gift (in stars), or `null` to unlist
|
|
2639
|
+
*/
|
|
2640
|
+
price: InputStarsAmount | null;
|
|
2641
|
+
}): Promise<void>;
|
|
2642
|
+
/**
|
|
2643
|
+
* Transfer a unique star gift.
|
|
2644
|
+
*
|
|
2645
|
+
* > **Note**: this method is not indended to be used by full-fledged clients,
|
|
2646
|
+
* > as this method hides the actual invoice and payment form from the user.
|
|
2647
|
+
* > For GUI clients, you should refer to the method's source code and
|
|
2648
|
+
* > present the payment form to the user.
|
|
2649
|
+
*
|
|
2650
|
+
* **Available**: 👤 users only
|
|
2651
|
+
*
|
|
2652
|
+
* @returns Service message about the transferred gift, if one was generated.
|
|
2653
|
+
*/
|
|
2654
|
+
transferStarGift(params: {
|
|
2655
|
+
/** Star gift to transfer */
|
|
2656
|
+
gift: InputStarGift;
|
|
2657
|
+
/** ID of the user to transfer the gift to */
|
|
2658
|
+
recipient: InputPeerLike;
|
|
2659
|
+
/**
|
|
2660
|
+
* Whether to dispatch the new message event
|
|
2661
|
+
* to the client's update handler.
|
|
2662
|
+
*/
|
|
2663
|
+
shouldDispatch?: true;
|
|
2664
|
+
}): Promise<Message | null>;
|
|
2665
|
+
/**
|
|
2666
|
+
* Upgrades a star gift to a unique gift.
|
|
2667
|
+
*
|
|
2668
|
+
* > **Note**: this method is not indended to be used by full-fledged clients,
|
|
2669
|
+
* > as this method hides the actual invoice and payment form from the user.
|
|
2670
|
+
* > For GUI clients, you should refer to the method's source code and
|
|
2671
|
+
* > present the payment form to the user.
|
|
2672
|
+
*
|
|
2673
|
+
* **Available**: 👤 users only
|
|
2674
|
+
*
|
|
2675
|
+
* @returns Service message about the upgraded gift, if one was generated.
|
|
2676
|
+
*/
|
|
2677
|
+
upgradeStarGift(params: {
|
|
2678
|
+
gift: InputStarGift;
|
|
2679
|
+
/**
|
|
2680
|
+
* Whether to retain the original details of the gift
|
|
2681
|
+
* (like sender, recipient, date, message)
|
|
2682
|
+
*/
|
|
2683
|
+
keepOriginalDetails?: boolean;
|
|
2684
|
+
/**
|
|
2685
|
+
* Whether to dispatch the new message event
|
|
2686
|
+
* to the client's update handler.
|
|
2687
|
+
*/
|
|
2688
|
+
shouldDispatch?: true;
|
|
2689
|
+
}): Promise<Message | null>;
|
|
2381
2690
|
/**
|
|
2382
2691
|
* Create an additional invite link for the chat.
|
|
2383
2692
|
*
|
|
@@ -3902,36 +4211,17 @@ export interface TelegramClient extends ITelegramClient {
|
|
|
3902
4211
|
/**
|
|
3903
4212
|
* Cancel the code that was sent to verify an email to use as 2FA recovery method
|
|
3904
4213
|
* **Available**: 👤 users only
|
|
3905
|
-
*
|
|
3906
|
-
*/
|
|
3907
|
-
cancelPasswordEmail(): Promise<void>;
|
|
3908
|
-
/**
|
|
3909
|
-
* Remove 2FA password from your account
|
|
3910
|
-
*
|
|
3911
|
-
* **Available**: 👤 users only
|
|
3912
|
-
*
|
|
3913
|
-
* @param password 2FA password as plaintext
|
|
3914
|
-
*/
|
|
3915
|
-
removeCloudPassword(password: string): Promise<void>;
|
|
3916
|
-
_normalizeInputStarGift(gift: InputStarGift): Promise<tl.TypeInputSavedStarGift>;
|
|
3917
|
-
/**
|
|
3918
|
-
* Accept, hide or convert a star gift.
|
|
3919
|
-
*
|
|
3920
|
-
* **Available**: 👤 users only
|
|
3921
|
-
*
|
|
3922
|
-
* @returns Whether the action was successful
|
|
3923
|
-
*/
|
|
3924
|
-
acceptStarGift(params: {
|
|
3925
|
-
/** Input star gift to accept */
|
|
3926
|
-
gift: InputStarGift;
|
|
3927
|
-
/**
|
|
3928
|
-
* Action to perform on the gift.
|
|
3929
|
-
* - `save` - save the gift to your profile
|
|
3930
|
-
* - `hide` - hide the gift from your profile
|
|
3931
|
-
* - `convert` - convert the gift to stars (can't be undone)
|
|
3932
|
-
*/
|
|
3933
|
-
action: 'save' | 'hide' | 'convert';
|
|
3934
|
-
}): Promise<boolean>;
|
|
4214
|
+
*
|
|
4215
|
+
*/
|
|
4216
|
+
cancelPasswordEmail(): Promise<void>;
|
|
4217
|
+
/**
|
|
4218
|
+
* Remove 2FA password from your account
|
|
4219
|
+
*
|
|
4220
|
+
* **Available**: 👤 users only
|
|
4221
|
+
*
|
|
4222
|
+
* @param password 2FA password as plaintext
|
|
4223
|
+
*/
|
|
4224
|
+
removeCloudPassword(password: string): Promise<void>;
|
|
3935
4225
|
/**
|
|
3936
4226
|
* Boost a given channel
|
|
3937
4227
|
*
|
|
@@ -3940,19 +4230,6 @@ export interface TelegramClient extends ITelegramClient {
|
|
|
3940
4230
|
* @param peerId Peer ID to boost
|
|
3941
4231
|
*/
|
|
3942
4232
|
applyBoost(peerId: InputPeerLike): Promise<void>;
|
|
3943
|
-
buyResaleGift(params: {
|
|
3944
|
-
/** Slug of the star gift to buy */
|
|
3945
|
-
slug: string;
|
|
3946
|
-
/** ID of the user to buy the gift for */
|
|
3947
|
-
recipient: InputPeerLike;
|
|
3948
|
-
/**
|
|
3949
|
-
* Whether to dispatch the new message event
|
|
3950
|
-
* to the client's update handler.
|
|
3951
|
-
*/
|
|
3952
|
-
shouldDispatch?: true;
|
|
3953
|
-
/** Whether to use TON currency for payment */
|
|
3954
|
-
ton?: boolean;
|
|
3955
|
-
}): Promise<Message | null>;
|
|
3956
4233
|
/**
|
|
3957
4234
|
* Check if the current user can apply boost to some channel
|
|
3958
4235
|
*
|
|
@@ -4048,90 +4325,6 @@ export interface TelegramClient extends ITelegramClient {
|
|
|
4048
4325
|
*
|
|
4049
4326
|
*/
|
|
4050
4327
|
getMyBoostSlots(): Promise<BoostSlot[]>;
|
|
4051
|
-
/**
|
|
4052
|
-
* Get a list of star gifts up for resale
|
|
4053
|
-
* **Available**: 👤 users only
|
|
4054
|
-
*
|
|
4055
|
-
*/
|
|
4056
|
-
getStarGiftResaleOptions(params: {
|
|
4057
|
-
/** ID of the gift to get resale options for */
|
|
4058
|
-
giftId: tl.Long;
|
|
4059
|
-
/**
|
|
4060
|
-
* Sorting attribute
|
|
4061
|
-
*
|
|
4062
|
-
* - `price`: Sort by price
|
|
4063
|
-
* - `num`: Sort by its unique number
|
|
4064
|
-
*/
|
|
4065
|
-
sort?: 'price' | 'num';
|
|
4066
|
-
/**
|
|
4067
|
-
* Hash of the `attributes` field, as returned by the server in the first response
|
|
4068
|
-
*/
|
|
4069
|
-
attributesHash?: Long;
|
|
4070
|
-
/** Attributes to filter for */
|
|
4071
|
-
attributes?: tl.TypeStarGiftAttributeId[] | InputStarGiftAttributeIds;
|
|
4072
|
-
/** Offset for pagination */
|
|
4073
|
-
offset?: string;
|
|
4074
|
-
/** Limit for pagination */
|
|
4075
|
-
limit?: number;
|
|
4076
|
-
}): Promise<ArrayPaginatedWithMeta<StarGiftUnique, string, ResaleStarGiftsMeta>>;
|
|
4077
|
-
/** Get one or more saved star gifts by their IDs */
|
|
4078
|
-
getSavedStarGiftsById(gifts: MaybeArray<InputStarGift>): Promise<SavedStarGift[]>;
|
|
4079
|
-
/**
|
|
4080
|
-
* Get a list of saved star gifts of a user/channel
|
|
4081
|
-
*
|
|
4082
|
-
* Note that filters currently only work for channels
|
|
4083
|
-
* **Available**: 👤 users only
|
|
4084
|
-
*
|
|
4085
|
-
*/
|
|
4086
|
-
getSavedStarGifts(params: {
|
|
4087
|
-
/** Peer to get saved gifts from */
|
|
4088
|
-
owner: InputPeerLike;
|
|
4089
|
-
/** Whether to exclude hidden gifts */
|
|
4090
|
-
excludeHidden?: boolean;
|
|
4091
|
-
/** Whether to exclude publicly visible gifts */
|
|
4092
|
-
excludePublic?: boolean;
|
|
4093
|
-
/** Whether to exclude gifts with unlimited availability */
|
|
4094
|
-
excludeUnlimited?: boolean;
|
|
4095
|
-
/** Whether to exclude unique gifts */
|
|
4096
|
-
excludeUnique?: boolean;
|
|
4097
|
-
/** Whether to exclude gifts that cannot be upgraded (either not limited or already upgraded) */
|
|
4098
|
-
excludeUnupgradable?: boolean;
|
|
4099
|
-
/** Whether to exclude gifts that can be upgraded */
|
|
4100
|
-
excludeUpgradable?: boolean;
|
|
4101
|
-
/** Whether to exclude "hosted" gifts (i.e. those that are actually stored on the TON blockchain) */
|
|
4102
|
-
excludeHosted?: boolean;
|
|
4103
|
-
/** Whether to only return gifts with peer color available */
|
|
4104
|
-
peerColorAvailable?: boolean;
|
|
4105
|
-
/** ID of the collection to get gifts from */
|
|
4106
|
-
collectionId?: number;
|
|
4107
|
-
/** Whether to sort by value */
|
|
4108
|
-
sortByValue?: boolean;
|
|
4109
|
-
/** Offset for pagination */
|
|
4110
|
-
offset?: string;
|
|
4111
|
-
/** Limit for pagination */
|
|
4112
|
-
limit?: number;
|
|
4113
|
-
}): Promise<ArrayPaginated<SavedStarGift, string>>;
|
|
4114
|
-
/**
|
|
4115
|
-
* Get the list of available star gifts.
|
|
4116
|
-
* **Available**: 👤 users only
|
|
4117
|
-
*
|
|
4118
|
-
*/
|
|
4119
|
-
getStarGiftOptions(): Promise<StarGift[]>;
|
|
4120
|
-
/**
|
|
4121
|
-
* Get the value of a unique star gift
|
|
4122
|
-
* **Available**: 👤 users only
|
|
4123
|
-
*
|
|
4124
|
-
*/
|
|
4125
|
-
getStarGiftValue(params: {
|
|
4126
|
-
/** Slug of the star gift */
|
|
4127
|
-
slug: string;
|
|
4128
|
-
}): Promise<StarGiftValue>;
|
|
4129
|
-
getStarGiftWithdrawalUrl(params: {
|
|
4130
|
-
/** The star gift to withdraw */
|
|
4131
|
-
gift: InputStarGift;
|
|
4132
|
-
/** 2FA password */
|
|
4133
|
-
password: string;
|
|
4134
|
-
}): Promise<string>;
|
|
4135
4328
|
/**
|
|
4136
4329
|
* Get Telegram Stars transactions for a given peer.
|
|
4137
4330
|
*
|
|
@@ -4167,12 +4360,6 @@ export interface TelegramClient extends ITelegramClient {
|
|
|
4167
4360
|
*/
|
|
4168
4361
|
limit?: number;
|
|
4169
4362
|
}): Promise<StarsStatus>;
|
|
4170
|
-
/**
|
|
4171
|
-
* Get information about a unique star gift by its slug
|
|
4172
|
-
* **Available**: 👤 users only
|
|
4173
|
-
*
|
|
4174
|
-
*/
|
|
4175
|
-
getUniqueStarGift(slug: string): Promise<StarGiftUnique>;
|
|
4176
4363
|
/**
|
|
4177
4364
|
* Iterate over boosters of a channel.
|
|
4178
4365
|
*
|
|
@@ -4195,26 +4382,6 @@ export interface TelegramClient extends ITelegramClient {
|
|
|
4195
4382
|
*/
|
|
4196
4383
|
chunkSize?: number;
|
|
4197
4384
|
}): AsyncIterableIterator<Boost>;
|
|
4198
|
-
/**
|
|
4199
|
-
* Iterate over saved star gifts of a user,
|
|
4200
|
-
* wrapper over {@link getSavedStarGifts}
|
|
4201
|
-
* **Available**: 👤 users only
|
|
4202
|
-
*
|
|
4203
|
-
*/
|
|
4204
|
-
iterSavedStarGifts(params: Parameters<typeof getSavedStarGifts>[1] & {
|
|
4205
|
-
/**
|
|
4206
|
-
* Number of gifts to fetch per request
|
|
4207
|
-
*
|
|
4208
|
-
* @default 100
|
|
4209
|
-
*/
|
|
4210
|
-
chunkSize?: number;
|
|
4211
|
-
/**
|
|
4212
|
-
* Total number of gifts to fetch
|
|
4213
|
-
*
|
|
4214
|
-
* @default Infinity
|
|
4215
|
-
*/
|
|
4216
|
-
limit?: number;
|
|
4217
|
-
}): AsyncIterableIterator<SavedStarGift>;
|
|
4218
4385
|
/**
|
|
4219
4386
|
* Iterate over Telegram Stars transactions for a given peer.
|
|
4220
4387
|
*
|
|
@@ -4243,72 +4410,6 @@ export interface TelegramClient extends ITelegramClient {
|
|
|
4243
4410
|
*/
|
|
4244
4411
|
chunkSize?: number;
|
|
4245
4412
|
}): AsyncIterableIterator<StarsTransaction>;
|
|
4246
|
-
/**
|
|
4247
|
-
* Toggles whether one or more star gift is pinned to the top of the list
|
|
4248
|
-
* **Available**: 👤 users only
|
|
4249
|
-
*
|
|
4250
|
-
*/
|
|
4251
|
-
togglePinnedStarGifts(params: {
|
|
4252
|
-
/** One or more gifts to pin */
|
|
4253
|
-
gifts: MaybeArray<InputStarGift>;
|
|
4254
|
-
/** Peer where the gift is sent */
|
|
4255
|
-
peer: InputPeerLike;
|
|
4256
|
-
}): Promise<void>;
|
|
4257
|
-
/**
|
|
4258
|
-
* Pay for other user's star gift upgrade.
|
|
4259
|
-
*
|
|
4260
|
-
* > **Note**: this method is not indended to be used by full-fledged clients,
|
|
4261
|
-
* > as this method hides the actual invoice and payment form from the user.
|
|
4262
|
-
* > For GUI clients, you should refer to the method's source code and
|
|
4263
|
-
* > present the payment form to the user.
|
|
4264
|
-
*
|
|
4265
|
-
* **Available**: 👤 users only
|
|
4266
|
-
*
|
|
4267
|
-
* @returns Service message about the payment for the upgrade, if one was generated.
|
|
4268
|
-
*/
|
|
4269
|
-
prepayStarGiftUpgrade(params: {
|
|
4270
|
-
peer: InputPeerLike;
|
|
4271
|
-
/** Prepaid upgrade hash, taken from `SavedStarGift.prepaidUpgradeHash` */
|
|
4272
|
-
hash: string;
|
|
4273
|
-
/**
|
|
4274
|
-
* Whether to dispatch the new message event
|
|
4275
|
-
* to the client's update handler.
|
|
4276
|
-
*/
|
|
4277
|
-
shouldDispatch?: true;
|
|
4278
|
-
}): Promise<Message | null>;
|
|
4279
|
-
/**
|
|
4280
|
-
* Send a star gift to a user.
|
|
4281
|
-
*
|
|
4282
|
-
* > **Note**: this method is not indended to be used by full-fledged clients,
|
|
4283
|
-
* > as this method hides the actual invoice and payment form from the user.
|
|
4284
|
-
* > For GUI clients, you should refer to the method's source code and
|
|
4285
|
-
* > present the payment form to the user.
|
|
4286
|
-
*
|
|
4287
|
-
* **Available**: 👤 users only
|
|
4288
|
-
*
|
|
4289
|
-
* @returns Service message about the sent gift, if one was generated.
|
|
4290
|
-
*/
|
|
4291
|
-
sendStarGift(params: {
|
|
4292
|
-
/** ID of the peer to send the gift to */
|
|
4293
|
-
peerId: InputPeerLike;
|
|
4294
|
-
/** ID of the gift to send */
|
|
4295
|
-
gift: Long | StarGift;
|
|
4296
|
-
/**
|
|
4297
|
-
* Whether to send the gift anonymously
|
|
4298
|
-
* (i.e. if the recipient chooses to display the gift
|
|
4299
|
-
* on their profile, your name won't be visible)
|
|
4300
|
-
*/
|
|
4301
|
-
anonymous?: boolean;
|
|
4302
|
-
/** Message to send along with the gift */
|
|
4303
|
-
message?: InputText;
|
|
4304
|
-
/** Whether to automatically upgrade the gift to a unique star gift */
|
|
4305
|
-
withUpgrade?: boolean;
|
|
4306
|
-
/**
|
|
4307
|
-
* Whether to dispatch the new message event
|
|
4308
|
-
* to the client's update handler.
|
|
4309
|
-
*/
|
|
4310
|
-
shouldDispatch?: true;
|
|
4311
|
-
}): Promise<Message | null>;
|
|
4312
4413
|
/**
|
|
4313
4414
|
* Set current user's business introduction.
|
|
4314
4415
|
*
|
|
@@ -4347,63 +4448,6 @@ export interface TelegramClient extends ITelegramClient {
|
|
|
4347
4448
|
/** Business work intervals, raw intervals */
|
|
4348
4449
|
intervals: tl.TypeBusinessWeeklyOpen[];
|
|
4349
4450
|
})) | null): Promise<void>;
|
|
4350
|
-
/** Set resale price for an owned star gift */
|
|
4351
|
-
setResaleStarGiftPrice(params: {
|
|
4352
|
-
/** Star gift to update the price of */
|
|
4353
|
-
gift: InputStarGift;
|
|
4354
|
-
/**
|
|
4355
|
-
* New price of the gift (in stars), or `null` to unlist
|
|
4356
|
-
*/
|
|
4357
|
-
price: tl.Long | number | tl.TypeStarsAmount | null;
|
|
4358
|
-
}): Promise<void>;
|
|
4359
|
-
/**
|
|
4360
|
-
* Transfer a unique star gift.
|
|
4361
|
-
*
|
|
4362
|
-
* > **Note**: this method is not indended to be used by full-fledged clients,
|
|
4363
|
-
* > as this method hides the actual invoice and payment form from the user.
|
|
4364
|
-
* > For GUI clients, you should refer to the method's source code and
|
|
4365
|
-
* > present the payment form to the user.
|
|
4366
|
-
*
|
|
4367
|
-
* **Available**: 👤 users only
|
|
4368
|
-
*
|
|
4369
|
-
* @returns Service message about the transferred gift, if one was generated.
|
|
4370
|
-
*/
|
|
4371
|
-
transferStarGift(params: {
|
|
4372
|
-
/** Star gift to transfer */
|
|
4373
|
-
gift: InputStarGift;
|
|
4374
|
-
/** ID of the user to transfer the gift to */
|
|
4375
|
-
recipient: InputPeerLike;
|
|
4376
|
-
/**
|
|
4377
|
-
* Whether to dispatch the new message event
|
|
4378
|
-
* to the client's update handler.
|
|
4379
|
-
*/
|
|
4380
|
-
shouldDispatch?: true;
|
|
4381
|
-
}): Promise<Message | null>;
|
|
4382
|
-
/**
|
|
4383
|
-
* Upgrades a star gift to a unique gift.
|
|
4384
|
-
*
|
|
4385
|
-
* > **Note**: this method is not indended to be used by full-fledged clients,
|
|
4386
|
-
* > as this method hides the actual invoice and payment form from the user.
|
|
4387
|
-
* > For GUI clients, you should refer to the method's source code and
|
|
4388
|
-
* > present the payment form to the user.
|
|
4389
|
-
*
|
|
4390
|
-
* **Available**: 👤 users only
|
|
4391
|
-
*
|
|
4392
|
-
* @returns Service message about the upgraded gift, if one was generated.
|
|
4393
|
-
*/
|
|
4394
|
-
upgradeStarGift(params: {
|
|
4395
|
-
gift: InputStarGift;
|
|
4396
|
-
/**
|
|
4397
|
-
* Whether to retain the original details of the gift
|
|
4398
|
-
* (like sender, recipient, date, message)
|
|
4399
|
-
*/
|
|
4400
|
-
keepOriginalDetails?: boolean;
|
|
4401
|
-
/**
|
|
4402
|
-
* Whether to dispatch the new message event
|
|
4403
|
-
* to the client's update handler.
|
|
4404
|
-
*/
|
|
4405
|
-
shouldDispatch?: true;
|
|
4406
|
-
}): Promise<Message | null>;
|
|
4407
4451
|
/**
|
|
4408
4452
|
* Add a sticker to a sticker set.
|
|
4409
4453
|
*
|