@grammyjs/types 3.22.1 → 3.23.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/checklist.d.ts +4 -2
- package/inline.d.ts +2 -2
- package/manage.d.ts +56 -14
- package/markup.d.ts +3 -3
- package/message.d.ts +12 -7
- package/methods.d.ts +201 -115
- package/package.json +1 -1
- package/payment.d.ts +63 -9
- package/settings.d.ts +3 -3
package/package.json
CHANGED
package/payment.d.ts
CHANGED
|
@@ -259,6 +259,15 @@ export interface PaidMediaPurchased {
|
|
|
259
259
|
/** Bot-specified paid media payload */
|
|
260
260
|
paid_media_payload: string;
|
|
261
261
|
}
|
|
262
|
+
/** This object describes the background of a gift. */
|
|
263
|
+
export interface GiftBackground {
|
|
264
|
+
/** Center color of the background in RGB format */
|
|
265
|
+
center_color: number;
|
|
266
|
+
/** Edge color of the background in RGB format */
|
|
267
|
+
edge_color: number;
|
|
268
|
+
/** Text color of the background in RGB format */
|
|
269
|
+
text_color: number;
|
|
270
|
+
}
|
|
262
271
|
/** This object represents a gift that can be sent by the bot. */
|
|
263
272
|
export interface Gift {
|
|
264
273
|
/** Unique identifier of the gift */
|
|
@@ -267,14 +276,26 @@ export interface Gift {
|
|
|
267
276
|
publisher_chat?: Chat;
|
|
268
277
|
/** The sticker that represents the gift */
|
|
269
278
|
sticker: Sticker;
|
|
279
|
+
/** Background of the gift */
|
|
280
|
+
background?: GiftBackground;
|
|
281
|
+
/** True, if the gift can only be purchased by Telegram Premium subscribers */
|
|
282
|
+
is_premium?: true;
|
|
283
|
+
/** True, if the gift can be used (after being upgraded) to customize a user's appearance */
|
|
284
|
+
has_colors?: true;
|
|
270
285
|
/** The number of Telegram Stars that must be paid to send the sticker */
|
|
271
286
|
star_count: number;
|
|
272
287
|
/** The number of Telegram Stars that must be paid to upgrade the gift to a unique one */
|
|
273
288
|
upgrade_star_count?: number;
|
|
274
|
-
/** The total number of
|
|
289
|
+
/** The total number of different unique gifts that can be obtained by upgrading the gift */
|
|
290
|
+
unique_gift_variant_count?: number;
|
|
291
|
+
/** The total number of gifts of this type that can be sent by all users; for limited gifts only */
|
|
275
292
|
total_count?: number;
|
|
276
|
-
/** The number of remaining gifts of this type that can be sent; for limited gifts only */
|
|
293
|
+
/** The number of remaining gifts of this type that can be sent by all users; for limited gifts only */
|
|
277
294
|
remaining_count?: number;
|
|
295
|
+
/** The total number of gifts of this type that can be sent by the bot; for limited gifts only */
|
|
296
|
+
personal_total_count?: number;
|
|
297
|
+
/** The number of remaining gifts of this type that can be sent by the bot; for limited gifts only */
|
|
298
|
+
personal_remaining_count?: number;
|
|
278
299
|
}
|
|
279
300
|
/** This object represent a list of gifts. */
|
|
280
301
|
export interface Gifts {
|
|
@@ -321,12 +342,18 @@ export interface UniqueGiftBackdrop {
|
|
|
321
342
|
}
|
|
322
343
|
/** This object describes a unique gift that was upgraded from a regular gift. */
|
|
323
344
|
export interface UniqueGift {
|
|
345
|
+
/** Identifier of the regular gift from which the gift was upgraded */
|
|
346
|
+
gift_id: string;
|
|
324
347
|
/** Human-readable name of the regular gift from which this unique gift was upgraded */
|
|
325
348
|
base_name: string;
|
|
326
349
|
/** Unique name of the gift. This name can be used in https://t.me/nft/... links and story areas */
|
|
327
350
|
name: string;
|
|
328
351
|
/** Information about the chat that published the gift */
|
|
329
352
|
publisher_chat?: Chat;
|
|
353
|
+
/** True, if the original regular gift was exclusively purchaseable by Telegram Premium subscribers */
|
|
354
|
+
is_premium?: true;
|
|
355
|
+
/** True, if the gift is assigned from the TON blockchain and can't be resold or transferred in Telegram */
|
|
356
|
+
is_from_blockchain?: true;
|
|
330
357
|
/** Unique number of the upgraded gift among gifts upgraded from the same regular gift */
|
|
331
358
|
number: number;
|
|
332
359
|
/** Model of the gift */
|
|
@@ -335,6 +362,23 @@ export interface UniqueGift {
|
|
|
335
362
|
symbol: UniqueGiftSymbol;
|
|
336
363
|
/** Backdrop of the gift */
|
|
337
364
|
backdrop: UniqueGiftBackdrop;
|
|
365
|
+
/** The color scheme that can be used by the gift's owner for the chat's name, replies to messages and link previews */
|
|
366
|
+
colors?: UniqueGiftColors;
|
|
367
|
+
}
|
|
368
|
+
/** This object contains information about the color scheme for a user's name, message replies and link previews based on a unique gift. */
|
|
369
|
+
export interface UniqueGiftColors {
|
|
370
|
+
/** Custom emoji identifier of the unique gift's model */
|
|
371
|
+
model_custom_emoji_id: string;
|
|
372
|
+
/** Custom emoji identifier of the unique gift's symbol */
|
|
373
|
+
symbol_custom_emoji_id: string;
|
|
374
|
+
/** Main color used in light themes; RGB format */
|
|
375
|
+
light_theme_main_color: number;
|
|
376
|
+
/** List of 1-3 additional colors used in light themes; RGB format */
|
|
377
|
+
light_theme_other_colors: number[];
|
|
378
|
+
/** Main color used in dark themes; RGB format */
|
|
379
|
+
dark_theme_main_color: number;
|
|
380
|
+
/** List of 1-3 additional colors used in dark themes; RGB format */
|
|
381
|
+
dark_theme_other_colors: number[];
|
|
338
382
|
}
|
|
339
383
|
/** Describes a service message about a regular gift that was sent or received. */
|
|
340
384
|
export interface GiftInfo {
|
|
@@ -348,6 +392,10 @@ export interface GiftInfo {
|
|
|
348
392
|
prepaid_upgrade_star_count?: number;
|
|
349
393
|
/** True, if the gift can be upgraded to a unique gift */
|
|
350
394
|
can_be_upgraded?: true;
|
|
395
|
+
/** True, if the gift's upgrade was purchased after the gift was sent */
|
|
396
|
+
is_upgrade_separate?: true;
|
|
397
|
+
/** Unique number reserved for this gift when upgraded. See the number field in UniqueGift */
|
|
398
|
+
unique_gift_number?: number;
|
|
351
399
|
/** Text of the message that was added to the gift */
|
|
352
400
|
text?: string;
|
|
353
401
|
/** Special entities that appear in the text */
|
|
@@ -359,16 +407,18 @@ export interface GiftInfo {
|
|
|
359
407
|
export interface UniqueGiftInfo {
|
|
360
408
|
/** Information about the gift */
|
|
361
409
|
gift: UniqueGift;
|
|
362
|
-
/** Origin of the gift. Currently, either “upgrade” for gifts upgraded from regular gifts, “transfer” for gifts transferred from other users or channels,
|
|
363
|
-
origin: "upgrade" | "transfer" | "resale";
|
|
410
|
+
/** Origin of the gift. Currently, either “upgrade” for gifts upgraded from regular gifts, “transfer” for gifts transferred from other users or channels, “resale” for gifts bought from other users, “gifted_upgrade” for upgrades purchased after the gift was sent, or “offer” for gifts bought or sold through gift purchase offers */
|
|
411
|
+
origin: "upgrade" | "transfer" | "resale" | "gifted_upgrade" | "offer";
|
|
364
412
|
/** Unique identifier of the received gift for the bot; only present for gifts received on behalf of business accounts */
|
|
365
413
|
owned_gift_id?: string;
|
|
366
414
|
/** Number of Telegram Stars that must be paid to transfer the gift; omitted if the bot cannot transfer the gift */
|
|
367
415
|
transfer_star_count?: number;
|
|
368
|
-
/** For gifts bought from other users, the
|
|
369
|
-
|
|
416
|
+
/** For gifts bought from other users, the currency in which the payment for the gift was done. Currently, one of “XTR” for Telegram Stars or “TON” for toncoins. */
|
|
417
|
+
last_resale_currency?: "XTR" | "TON";
|
|
418
|
+
/** For gifts bought from other users, the price paid for the gift in either Telegram Stars or nanotoncoins */
|
|
419
|
+
last_resale_amount?: number;
|
|
370
420
|
/** Point in time (Unix timestamp) when the gift can be transferred. If it is in the past, then the gift can be transferred now */
|
|
371
|
-
next_transfer_date?:
|
|
421
|
+
next_transfer_date?: number;
|
|
372
422
|
}
|
|
373
423
|
/** Describes a service message about a change in the price of paid messages within a chat. */
|
|
374
424
|
export interface PaidMessagePriceChanged {
|
|
@@ -399,6 +449,8 @@ export interface OwnedGiftRegular {
|
|
|
399
449
|
sender_user?: User;
|
|
400
450
|
/** Date the gift was sent in Unix time */
|
|
401
451
|
send_date: number;
|
|
452
|
+
/** Unique number reserved for this gift when upgraded. See the number field in UniqueGift */
|
|
453
|
+
unique_gift_number?: number;
|
|
402
454
|
/** Text of the message that was added to the gift */
|
|
403
455
|
text?: string;
|
|
404
456
|
/** Special entities that appear in the text */
|
|
@@ -409,6 +461,8 @@ export interface OwnedGiftRegular {
|
|
|
409
461
|
is_saved?: true;
|
|
410
462
|
/** True, if the gift can be upgraded to a unique gift; for gifts received on behalf of business accounts only */
|
|
411
463
|
can_be_upgraded?: true;
|
|
464
|
+
/** True, if the gift's upgrade was purchased after the gift was sent */
|
|
465
|
+
is_upgrade_separate?: true;
|
|
412
466
|
/** True, if the gift was refunded and isn't available anymore */
|
|
413
467
|
was_refunded?: true;
|
|
414
468
|
/** Number of Telegram Stars that can be claimed by the receiver instead of the gift; omitted if the gift cannot be converted to Telegram Stars */
|
|
@@ -435,7 +489,7 @@ export interface OwnedGiftUnique {
|
|
|
435
489
|
/** Number of Telegram Stars that must be paid to transfer the gift; omitted if the bot cannot transfer the gift */
|
|
436
490
|
transfer_star_count?: number;
|
|
437
491
|
/** Point in time (Unix timestamp) when the gift can be transferred. If it is in the past, then the gift can be transferred now */
|
|
438
|
-
next_transfer_date?:
|
|
492
|
+
next_transfer_date?: number;
|
|
439
493
|
}
|
|
440
494
|
/** Contains the list of gifts received and owned by a user or a chat. */
|
|
441
495
|
export interface OwnedGifts {
|
|
@@ -446,7 +500,7 @@ export interface OwnedGifts {
|
|
|
446
500
|
/** Offset for the next request. If empty, then there are no more results */
|
|
447
501
|
next_offset?: string;
|
|
448
502
|
}
|
|
449
|
-
/**
|
|
503
|
+
/** Describes the price of a suggested post. */
|
|
450
504
|
export interface SuggestedPostPrice {
|
|
451
505
|
/** Currency in which the post will be paid. Currently, must be one of “XTR” for Telegram Stars or “TON” for toncoins */
|
|
452
506
|
currency: "XTR" | "TON";
|
package/settings.d.ts
CHANGED
|
@@ -99,21 +99,21 @@ export interface BotCommandScopeAllChatAdministrators {
|
|
|
99
99
|
export interface BotCommandScopeChat {
|
|
100
100
|
/** Scope type, must be chat */
|
|
101
101
|
type: "chat";
|
|
102
|
-
/** Unique identifier for the target chat or username of the target supergroup (in the format
|
|
102
|
+
/** Unique identifier for the target chat or username of the target supergroup (in the format `@supergroupusername`). Channel direct messages chats and channel chats aren't supported. */
|
|
103
103
|
chat_id: number | string;
|
|
104
104
|
}
|
|
105
105
|
/** Represents the scope of bot commands, covering all administrators of a specific group or supergroup chat. */
|
|
106
106
|
export interface BotCommandScopeChatAdministrators {
|
|
107
107
|
/** Scope type, must be chat_administrators */
|
|
108
108
|
type: "chat_administrators";
|
|
109
|
-
/** Unique identifier for the target chat or username of the target supergroup (in the format
|
|
109
|
+
/** Unique identifier for the target chat or username of the target supergroup (in the format `@supergroupusername`). Channel direct messages chats and channel chats aren't supported. */
|
|
110
110
|
chat_id: number | string;
|
|
111
111
|
}
|
|
112
112
|
/** Represents the scope of bot commands, covering a specific member of a group or supergroup chat. */
|
|
113
113
|
export interface BotCommandScopeChatMember {
|
|
114
114
|
/** Scope type, must be chat_member */
|
|
115
115
|
type: "chat_member";
|
|
116
|
-
/** Unique identifier for the target chat or username of the target supergroup (in the format
|
|
116
|
+
/** Unique identifier for the target chat or username of the target supergroup (in the format `@supergroupusername`). Channel direct messages chats and channel chats aren't supported. */
|
|
117
117
|
chat_id: number | string;
|
|
118
118
|
/** Unique identifier of the target user */
|
|
119
119
|
user_id: number;
|