@telegram.ts/types 1.24.0 → 1.25.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.
@@ -1,4 +1,4 @@
1
- import type { User } from "./manageTypes";
1
+ import type { Chat, User } from "./manageTypes";
2
2
  import type { Message, MessageEntity, ParseMode } from "./messageTypes";
3
3
 
4
4
  /** Describes a task in a checklist. */
@@ -9,8 +9,10 @@ export interface ChecklistTask {
9
9
  text: string;
10
10
  /** Special entities that appear in the task text */
11
11
  text_entities?: MessageEntity[];
12
- /** User that completed the task; omitted if the task wasn't completed */
12
+ /** User that completed the task; omitted if the task wasn't completed by a user */
13
13
  completed_by_user?: User;
14
+ /** Chat that completed the task; omitted if the task wasn't completed by a chat */
15
+ completed_by_chat?: Chat;
14
16
  /** Point in time (Unix timestamp) when the task was completed; 0 if the task wasn't completed */
15
17
  completion_date?: number;
16
18
  }
@@ -7,6 +7,7 @@ import type {
7
7
  ParseMode,
8
8
  } from "./messageTypes";
9
9
  import type { LabeledPrice } from "./invoiceTypes";
10
+
10
11
  /** This object represents an incoming inline query. When the user sends an empty query, your bot could return some default or trending results. */
11
12
  export interface InlineQuery {
12
13
  /** Unique identifier for this query */
@@ -66,7 +66,7 @@ export interface ShippingOption {
66
66
  prices: LabeledPrice[];
67
67
  }
68
68
 
69
- /** This object contains basic information about a successful payment. */
69
+ /** This object contains basic information about a successful payment. Note that if the buyer initiates a chargeback with the relevant payment provider following this transaction, the funds may be debited from your balance. This is outside of Telegram's control. */
70
70
  export interface SuccessfulPayment {
71
71
  /** Three-letter ISO 4217 currency code, or “XTR” for payments in Telegram Stars */
72
72
  currency: string;
@@ -184,16 +184,16 @@ export interface AffiliateInfo {
184
184
 
185
185
  - TransactionPartnerUser
186
186
  - TransactionPartnerChat
187
- - TransactionPartnerFragment
188
187
  - TransactionPartnerAffiliateProgram
188
+ - TransactionPartnerFragment
189
189
  - TransactionPartnerTelegramAds
190
- - TransactionPartnerTelegramApi
190
+ - TransactionPartnerTelegramApi
191
191
  - TransactionPartnerOther */
192
192
  export type TransactionPartner =
193
193
  | TransactionPartnerUser
194
194
  | TransactionPartnerChat
195
- | TransactionPartnerFragment
196
195
  | TransactionPartnerAffiliateProgram
196
+ | TransactionPartnerFragment
197
197
  | TransactionPartnerTelegramAds
198
198
  | TransactionPartnerTelegramApi
199
199
  | TransactionPartnerOther;
@@ -213,13 +213,13 @@ export interface TransactionPartnerUser {
213
213
  user: User;
214
214
  /** Information about the affiliate that received a commission via this transaction. Can be available only for “invoice_payment” and “paid_media_payment” transactions. */
215
215
  affiliate?: AffiliateInfo;
216
- /** The duration of the paid subscription. Can be available only for “invoice_payment” transactions. */
217
- subscription_period?: number;
218
216
  /** Bot-specified invoice payload. Can be available only for “invoice_payment” transactions. */
219
217
  invoice_payload?: string;
220
- /** Information about the paid media bought by the user. Can be available only for “invoice_payment” transactions. */
218
+ /** The duration of the paid subscription. Can be available only for “invoice_payment” transactions. */
219
+ subscription_period?: number;
220
+ /** Information about the paid media bought by the user; for “paid_media_payment” transactions only */
221
221
  paid_media?: PaidMedia[];
222
- /** Bot-specified paid media payload. Can be available only for “invoice_payment” transactions. */
222
+ /** Bot-specified paid media payload. Can be available only for “paid_media_payment” transactions. */
223
223
  paid_media_payload?: string;
224
224
  /** The gift sent to the user by the bot; for “gift_purchase” transactions only */
225
225
  gift?: Gift;
@@ -255,6 +255,12 @@ export interface TransactionPartnerFragment {
255
255
  withdrawal_state?: RevenueWithdrawalState;
256
256
  }
257
257
 
258
+ /** Describes a withdrawal transaction to the Telegram Ads platform. */
259
+ export interface TransactionPartnerTelegramAds {
260
+ /** Type of the transaction partner, always “telegram_ads” */
261
+ type: "telegram_ads";
262
+ }
263
+
258
264
  /** Describes a transaction with payment for paid broadcasting. */
259
265
  export interface TransactionPartnerTelegramApi {
260
266
  /** Type of the transaction partner, always “telegram_api” */
@@ -263,21 +269,15 @@ export interface TransactionPartnerTelegramApi {
263
269
  request_count: number;
264
270
  }
265
271
 
266
- /** Describes a withdrawal transaction to the Telegram Ads platform. */
267
- export interface TransactionPartnerTelegramAds {
268
- /** Type of the transaction partner, always “telegram_ads” */
269
- type: "telegram_ads";
270
- }
271
-
272
272
  /** Describes a transaction with an unknown source or recipient. */
273
273
  export interface TransactionPartnerOther {
274
274
  /** Type of the transaction partner, always “other” */
275
275
  type: "other";
276
276
  }
277
277
 
278
- /** Describes a Telegram Star transaction. */
278
+ /** Describes a Telegram Star transaction. Note that if the buyer initiates a chargeback with the payment provider from whom they acquired Stars (e.g., Apple, Google) following this transaction, the refunded Stars will be deducted from the bot's balance. This is outside of Telegram's control. */
279
279
  export interface StarTransaction {
280
- /** Unique identifier of the transaction. Coincides with the identifer of the original transaction for refund transactions. Coincides with SuccessfulPayment.telegram_payment_charge_id for successful incoming payments from users. */
280
+ /** Unique identifier of the transaction. Coincides with the identifier of the original transaction for refund transactions. Coincides with SuccessfulPayment.telegram_payment_charge_id for successful incoming payments from users. */
281
281
  id: string;
282
282
  /** Integer amount of Telegram Stars transferred by the transaction */
283
283
  amount: number;
@@ -305,6 +305,16 @@ export interface PaidMediaPurchased {
305
305
  paid_media_payload: string;
306
306
  }
307
307
 
308
+ /** This object describes the background of a gift. */
309
+ export interface GiftBackground {
310
+ /** Center color of the background in RGB format */
311
+ center_color: number;
312
+ /** Edge color of the background in RGB format */
313
+ edge_color: number;
314
+ /** Text color of the background in RGB format */
315
+ text_color: number;
316
+ }
317
+
308
318
  /** This object represents a gift that can be sent by the bot. */
309
319
  export interface Gift {
310
320
  /** Unique identifier of the gift */
@@ -313,14 +323,26 @@ export interface Gift {
313
323
  publisher_chat?: Chat;
314
324
  /** The sticker that represents the gift */
315
325
  sticker: Sticker;
326
+ /** Background of the gift */
327
+ background?: GiftBackground;
328
+ /** True, if the gift can only be purchased by Telegram Premium subscribers */
329
+ is_premium?: true;
330
+ /** True, if the gift can be used (after being upgraded) to customize a user's appearance */
331
+ has_colors?: true;
316
332
  /** The number of Telegram Stars that must be paid to send the sticker */
317
333
  star_count: number;
318
334
  /** The number of Telegram Stars that must be paid to upgrade the gift to a unique one */
319
335
  upgrade_star_count?: number;
320
- /** The total number of the gifts of this type that can be sent; for limited gifts only */
336
+ /** The total number of different unique gifts that can be obtained by upgrading the gift */
337
+ unique_gift_variant_count?: number;
338
+ /** The total number of gifts of this type that can be sent by all users; for limited gifts only */
321
339
  total_count?: number;
322
- /** The number of remaining gifts of this type that can be sent; for limited gifts only */
340
+ /** The number of remaining gifts of this type that can be sent by all users; for limited gifts only */
323
341
  remaining_count?: number;
342
+ /** The total number of gifts of this type that can be sent by the bot; for limited gifts only */
343
+ personal_total_count?: number;
344
+ /** The number of remaining gifts of this type that can be sent by the bot; for limited gifts only */
345
+ personal_remaining_count?: number;
324
346
  }
325
347
 
326
348
  /** This object represent a list of gifts. */
@@ -333,8 +355,6 @@ export interface Gifts {
333
355
  export interface UniqueGiftModel {
334
356
  /** Name of the model */
335
357
  name: string;
336
- /** Information about the chat that published the gift */
337
- publisher_chat?: Chat;
338
358
  /** The sticker that represents the unique gift */
339
359
  sticker: Sticker;
340
360
  /** The number of unique gifts that receive this model for every 1000 gifts upgraded */
@@ -375,12 +395,18 @@ export interface UniqueGiftBackdrop {
375
395
 
376
396
  /** This object describes a unique gift that was upgraded from a regular gift. */
377
397
  export interface UniqueGift {
398
+ /** Identifier of the regular gift from which the gift was upgraded */
399
+ gift_id: string;
378
400
  /** Human-readable name of the regular gift from which this unique gift was upgraded */
379
401
  base_name: string;
380
402
  /** Unique name of the gift. This name can be used in https://t.me/nft/... links and story areas */
381
403
  name: string;
382
404
  /** Information about the chat that published the gift */
383
405
  publisher_chat?: Chat;
406
+ /** True, if the original regular gift was exclusively purchaseable by Telegram Premium subscribers */
407
+ is_premium?: true;
408
+ /** True, if the gift is assigned from the TON blockchain and can't be resold or transferred in Telegram */
409
+ is_from_blockchain?: true;
384
410
  /** Unique number of the upgraded gift among gifts upgraded from the same regular gift */
385
411
  number: number;
386
412
  /** Model of the gift */
@@ -389,6 +415,24 @@ export interface UniqueGift {
389
415
  symbol: UniqueGiftSymbol;
390
416
  /** Backdrop of the gift */
391
417
  backdrop: UniqueGiftBackdrop;
418
+ /** The color scheme that can be used by the gift's owner for the chat's name, replies to messages and link previews */
419
+ colors?: UniqueGiftColors;
420
+ }
421
+
422
+ /** This object contains information about the color scheme for a user's name, message replies and link previews based on a unique gift. */
423
+ export interface UniqueGiftColors {
424
+ /** Custom emoji identifier of the unique gift's model */
425
+ model_custom_emoji_id: string;
426
+ /** Custom emoji identifier of the unique gift's symbol */
427
+ symbol_custom_emoji_id: string;
428
+ /** Main color used in light themes; RGB format */
429
+ light_theme_main_color: number;
430
+ /** List of 1-3 additional colors used in light themes; RGB format */
431
+ light_theme_other_colors: number[];
432
+ /** Main color used in dark themes; RGB format */
433
+ dark_theme_main_color: number;
434
+ /** List of 1-3 additional colors used in dark themes; RGB format */
435
+ dark_theme_other_colors: number[];
392
436
  }
393
437
 
394
438
  /** Describes a service message about a regular gift that was sent or received. */
@@ -403,6 +447,10 @@ export interface GiftInfo {
403
447
  prepaid_upgrade_star_count?: number;
404
448
  /** True, if the gift can be upgraded to a unique gift */
405
449
  can_be_upgraded?: true;
450
+ /** True, if the gift's upgrade was purchased after the gift was sent */
451
+ is_upgrade_separate?: true;
452
+ /** Unique number reserved for this gift when upgraded. See the number field in UniqueGift */
453
+ unique_gift_number?: number;
406
454
  /** Text of the message that was added to the gift */
407
455
  text?: string;
408
456
  /** Special entities that appear in the text */
@@ -415,14 +463,16 @@ export interface GiftInfo {
415
463
  export interface UniqueGiftInfo {
416
464
  /** Information about the gift */
417
465
  gift: UniqueGift;
418
- /** Origin of the gift. Currently, either “upgrade” for gifts upgraded from regular gifts, “transfer” for gifts transferred from other users or channels, or “resale” for gifts bought from other users */
419
- origin: "upgrade" | "transfer" | "resale";
466
+ /** 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 */
467
+ origin: "upgrade" | "transfer" | "resale" | "gifted_upgrade" | "offer";
420
468
  /** Unique identifier of the received gift for the bot; only present for gifts received on behalf of business accounts */
421
469
  owned_gift_id?: string;
422
470
  /** Number of Telegram Stars that must be paid to transfer the gift; omitted if the bot cannot transfer the gift */
423
471
  transfer_star_count?: number;
424
- /** For gifts bought from other users, the price paid for the gift */
425
- last_resale_star_count?: number;
472
+ /** 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. */
473
+ last_resale_currency?: "XTR" | "TON";
474
+ /** For gifts bought from other users, the price paid for the gift in either Telegram Stars or nanotoncoins */
475
+ last_resale_amount?: number;
426
476
  /** Point in time (Unix timestamp) when the gift can be transferred. If it is in the past, then the gift can be transferred now */
427
477
  next_transfer_date?: number;
428
478
  }
@@ -442,6 +492,7 @@ export interface StarAmount {
442
492
  }
443
493
 
444
494
  /** This object describes a gift received and owned by a user or a chat. Currently, it can be one of
495
+
445
496
  - OwnedGiftRegular
446
497
  - OwnedGiftUnique */
447
498
  export type OwnedGift = OwnedGiftRegular | OwnedGiftUnique;
@@ -458,6 +509,8 @@ export interface OwnedGiftRegular {
458
509
  sender_user?: User;
459
510
  /** Date the gift was sent in Unix time */
460
511
  send_date: number;
512
+ /** Unique number reserved for this gift when upgraded. See the number field in UniqueGift */
513
+ unique_gift_number?: number;
461
514
  /** Text of the message that was added to the gift */
462
515
  text?: string;
463
516
  /** Special entities that appear in the text */
@@ -468,14 +521,14 @@ export interface OwnedGiftRegular {
468
521
  is_saved?: true;
469
522
  /** True, if the gift can be upgraded to a unique gift; for gifts received on behalf of business accounts only */
470
523
  can_be_upgraded?: true;
524
+ /** True, if the gift's upgrade was purchased after the gift was sent */
525
+ is_upgrade_separate?: true;
471
526
  /** True, if the gift was refunded and isn't available anymore */
472
527
  was_refunded?: true;
473
528
  /** 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 */
474
529
  convert_star_count?: number;
475
530
  /** Number of Telegram Stars that were paid by the sender for the ability to upgrade the gift */
476
531
  prepaid_upgrade_star_count?: number;
477
- /** Point in time (Unix timestamp) when the gift can be transferred. If it is in the past, then the gift can be transferred now */
478
- next_transfer_date?: string;
479
532
  }
480
533
 
481
534
  /** Describes a unique gift received and owned by a user or a chat. */
@@ -510,7 +563,7 @@ export interface OwnedGifts {
510
563
  next_offset?: string;
511
564
  }
512
565
 
513
- /** Desribes price of a suggested post. */
566
+ /** Describes the price of a suggested post. */
514
567
  export interface SuggestedPostPrice {
515
568
  /** Currency in which the post will be paid. Currently, must be one of “XTR” for Telegram Stars or “TON” for toncoins */
516
569
  currency: "XTR" | "TON";
@@ -6,6 +6,7 @@ import type {
6
6
  Sticker,
7
7
  } from "./messageTypes";
8
8
  import type { LanguageCode } from "./languageTypes";
9
+ import type { UniqueGiftColors } from "./invoiceTypes";
9
10
  import type { Update } from "./updateTypes";
10
11
 
11
12
  /** Describes the current status of a webhook. */
@@ -40,6 +41,8 @@ export interface AcceptedGiftTypes {
40
41
  unique_gifts: boolean;
41
42
  /** True, if a Telegram Premium subscription is accepted */
42
43
  premium_subscription: boolean;
44
+ /** True, if transfers of unique gifts from channels are accepted */
45
+ gifts_from_channels: boolean;
43
46
  }
44
47
 
45
48
  /** This object represents a Telegram user or bot. */
@@ -76,6 +79,20 @@ export interface UserFromGetMe extends User {
76
79
  can_connect_to_business: boolean;
77
80
  /** True, if the bot has main Web App. Returned only in getMe. */
78
81
  has_main_web_app: boolean;
82
+ /** True, if the bot has forum topic mode enabled in private chats. Returned only in getMe. */
83
+ has_topics_enabled?: boolean;
84
+ }
85
+
86
+ /** This object describes the rating of a user based on their Telegram Star spendings. */
87
+ export interface UserRating {
88
+ /** Current level of the user, indicating their reliability when purchasing digital goods and services. A higher level suggests a more trustworthy customer; a negative level is likely reason for concern. */
89
+ level: number;
90
+ /** Numerical value of the user's rating; the higher the rating, the better */
91
+ rating: number;
92
+ /** The rating value required to get the current level */
93
+ current_level_rating: number;
94
+ /** The rating value required to get to the next level; omitted if the maximum level was reached */
95
+ next_level_rating?: number;
79
96
  }
80
97
 
81
98
  export declare namespace Chat {
@@ -173,14 +190,16 @@ export declare namespace ChatFullInfo {
173
190
  type: "private";
174
191
  /** Title, for supergroups, channels and group chats */
175
192
  title?: undefined;
176
- /** Username, for private chats, supergroups and channels if available */
193
+ /** Username, for private chats, supergroups and channels if available */
177
194
  username?: string;
178
- /** First name of the other party in a private chat */
195
+ /** First name of the other party in a private chat */
179
196
  first_name: string;
180
- /** Last name of the other party in a private chat */
197
+ /** Last name of the other party in a private chat */
181
198
  last_name?: string;
182
199
  /** True, if the supergroup chat is a forum (has topics enabled) */
183
200
  is_forum?: undefined;
201
+ /** True, if the chat is the direct messages chat of a channel */
202
+ is_direct_messages?: undefined;
184
203
  /** Identifier of the accent color for the chat name and backgrounds of the chat photo, reply header, and link preview. See accent colors for more details. */
185
204
  accent_color_id: number;
186
205
  /** The maximum number of reactions that can be set on a message in the chat */
@@ -197,8 +216,14 @@ export declare namespace ChatFullInfo {
197
216
  business_location?: BusinessLocation;
198
217
  /** For private chats with business accounts, the opening hours of the business */
199
218
  business_opening_hours?: BusinessOpeningHours;
219
+ /** For private chats, the rating of the user if any */
220
+ rating?: UserRating;
221
+ /** The color scheme based on a unique gift that must be used for the chat's name, message replies and link previews */
222
+ unique_gift_colors?: UniqueGiftColors;
200
223
  /** For private chats, the personal channel of the user */
201
224
  personal_chat?: Chat;
225
+ /** Information about the corresponding channel chat; for direct messages chats only */
226
+ parent_chat?: undefined;
202
227
  /** List of available reactions allowed in the chat. If omitted, then all emoji reactions are allowed. */
203
228
  available_reactions?: ReactionType[];
204
229
  /** Custom emoji identifier of the emoji chosen by the chat for the reply header and link preview background */
@@ -207,7 +232,7 @@ export declare namespace ChatFullInfo {
207
232
  profile_accent_color_id?: number;
208
233
  /** Custom emoji identifier of the emoji chosen by the chat for its profile background */
209
234
  profile_background_custom_emoji_id?: string;
210
- /** Custom emoji identifier of the emoji status of the chat or the other party in a private chat */
235
+ /** Custom emoji identifier of the emoji status of the chat or the other party in a private chat */
211
236
  emoji_status_custom_emoji_id?: string;
212
237
  /** Expiration date of the emoji status of the chat or the other party in a private chat, in Unix time, if any */
213
238
  emoji_status_expiration_date?: number;
@@ -223,7 +248,7 @@ export declare namespace ChatFullInfo {
223
248
  join_by_request?: undefined;
224
249
  /** Description, for groups, supergroups and channel chats */
225
250
  description?: undefined;
226
- /** Primary invite link, for groups, supergroups and channel chats */
251
+ /** Primary invite link, for groups, supergroups and channel chats */
227
252
  invite_link?: undefined;
228
253
  /** The most recent pinned message (by sending date) */
229
254
  pinned_message?: Message;
@@ -231,11 +256,13 @@ export declare namespace ChatFullInfo {
231
256
  permissions?: undefined;
232
257
  /** Information about types of gifts that are accepted by the chat or by the corresponding user for private chats */
233
258
  accepted_gift_types: AcceptedGiftTypes;
259
+ /** True, if paid media messages can be sent or forwarded to the channel chat. The field is available only for channel chats. */
260
+ can_send_paid_media?: undefined;
234
261
  /** For supergroups, the minimum allowed delay between consecutive messages sent by each unprivileged user; in seconds */
235
262
  slow_mode_delay?: undefined;
236
- /** For supergroups, the minimum number of boosts that a non-administrator user needs to add in order to ignore slow mode and chat permissions */
263
+ /** For supergroups, the minimum number of boosts that a non-administrator user needs to add in order to ignore slow mode and chat permissions */
237
264
  unrestrict_boost_count?: undefined;
238
- /** The time after which all messages sent to the chat will be automatically deleted; in seconds */
265
+ /** The time after which all messages sent to the chat will be automatically deleted; in seconds */
239
266
  message_auto_delete_time?: number;
240
267
  /** True, if aggressive anti-spam checks are enabled in the supergroup. The field is only available to chat administrators. */
241
268
  has_aggressive_anti_spam_enabled?: undefined;
@@ -253,12 +280,8 @@ export declare namespace ChatFullInfo {
253
280
  custom_emoji_sticker_set_name?: undefined;
254
281
  /** Unique identifier for the linked chat, i.e. the discussion group identifier for a channel and vice versa; for supergroups and channel chats. */
255
282
  linked_chat_id?: undefined;
256
- /** Information about the corresponding channel chat; for direct messages chats only */
257
- parent_chat?: undefined;
258
283
  /** For supergroups, the location to which the supergroup is connected */
259
284
  location?: undefined;
260
- /** True, if paid media messages can be sent or forwarded to the channel chat. The field is available only for channel chats. */
261
- can_send_paid_media?: undefined;
262
285
  }
263
286
  /** Internal type for group chats */
264
287
  export interface GroupChat {
@@ -268,14 +291,16 @@ export declare namespace ChatFullInfo {
268
291
  type: "group";
269
292
  /** Title, for supergroups, channels and group chats */
270
293
  title: string;
271
- /** Username, for private chats, supergroups and channels if available */
294
+ /** Username, for private chats, supergroups and channels if available */
272
295
  username?: undefined;
273
- /** First name of the other party in a private chat */
296
+ /** First name of the other party in a private chat */
274
297
  first_name?: undefined;
275
- /** Last name of the other party in a private chat */
298
+ /** Last name of the other party in a private chat */
276
299
  last_name?: undefined;
277
300
  /** True, if the supergroup chat is a forum (has topics enabled) */
278
301
  is_forum?: undefined;
302
+ /** True, if the chat is the direct messages chat of a channel */
303
+ is_direct_messages?: undefined;
279
304
  /** Identifier of the accent color for the chat name and backgrounds of the chat photo, reply header, and link preview. See accent colors for more details. */
280
305
  accent_color_id: number;
281
306
  /** The maximum number of reactions that can be set on a message in the chat */
@@ -292,8 +317,14 @@ export declare namespace ChatFullInfo {
292
317
  business_location?: undefined;
293
318
  /** For private chats with business accounts, the opening hours of the business */
294
319
  business_opening_hours?: undefined;
320
+ /** For private chats, the rating of the user if any */
321
+ rating?: undefined;
322
+ /** The color scheme based on a unique gift that must be used for the chat's name, message replies and link previews */
323
+ unique_gift_colors?: UniqueGiftColors;
295
324
  /** For private chats, the personal channel of the user */
296
325
  personal_chat?: undefined;
326
+ /** Information about the corresponding channel chat; for direct messages chats only */
327
+ parent_chat?: undefined;
297
328
  /** List of available reactions allowed in the chat. If omitted, then all emoji reactions are allowed. */
298
329
  available_reactions?: ReactionType[];
299
330
  /** Custom emoji identifier of the emoji chosen by the chat for the reply header and link preview background */
@@ -302,7 +333,7 @@ export declare namespace ChatFullInfo {
302
333
  profile_accent_color_id?: number;
303
334
  /** Custom emoji identifier of the emoji chosen by the chat for its profile background */
304
335
  profile_background_custom_emoji_id?: string;
305
- /** Custom emoji identifier of the emoji status of the chat or the other party in a private chat */
336
+ /** Custom emoji identifier of the emoji status of the chat or the other party in a private chat */
306
337
  emoji_status_custom_emoji_id?: string;
307
338
  /** Expiration date of the emoji status of the chat or the other party in a private chat, in Unix time, if any */
308
339
  emoji_status_expiration_date?: number;
@@ -318,19 +349,21 @@ export declare namespace ChatFullInfo {
318
349
  join_by_request?: undefined;
319
350
  /** Description, for groups, supergroups and channel chats */
320
351
  description?: string;
321
- /** Primary invite link, for groups, supergroups and channel chats */
352
+ /** Primary invite link, for groups, supergroups and channel chats */
322
353
  invite_link?: string;
323
354
  /** The most recent pinned message (by sending date) */
324
355
  pinned_message?: Message;
325
356
  /** Default chat member permissions, for groups and supergroups */
326
357
  permissions?: ChatPermissions;
327
- /** True, if gifts can be sent to the chat */
328
- can_send_gift?: true;
358
+ /** Information about types of gifts that are accepted by the chat or by the corresponding user for private chats */
359
+ accepted_gift_types: AcceptedGiftTypes;
360
+ /** True, if paid media messages can be sent or forwarded to the channel chat. The field is available only for channel chats. */
361
+ can_send_paid_media?: undefined;
329
362
  /** For supergroups, the minimum allowed delay between consecutive messages sent by each unprivileged user; in seconds */
330
363
  slow_mode_delay?: undefined;
331
- /** For supergroups, the minimum number of boosts that a non-administrator user needs to add in order to ignore slow mode and chat permissions */
364
+ /** For supergroups, the minimum number of boosts that a non-administrator user needs to add in order to ignore slow mode and chat permissions */
332
365
  unrestrict_boost_count?: undefined;
333
- /** The time after which all messages sent to the chat will be automatically deleted; in seconds */
366
+ /** The time after which all messages sent to the chat will be automatically deleted; in seconds */
334
367
  message_auto_delete_time?: number;
335
368
  /** True, if aggressive anti-spam checks are enabled in the supergroup. The field is only available to chat administrators. */
336
369
  has_aggressive_anti_spam_enabled?: undefined;
@@ -348,12 +381,8 @@ export declare namespace ChatFullInfo {
348
381
  custom_emoji_sticker_set_name?: undefined;
349
382
  /** Unique identifier for the linked chat, i.e. the discussion group identifier for a channel and vice versa; for supergroups and channel chats. */
350
383
  linked_chat_id?: undefined;
351
- /** Information about the corresponding channel chat; for direct messages chats only */
352
- parent_chat?: undefined;
353
384
  /** For supergroups, the location to which the supergroup is connected */
354
385
  location?: undefined;
355
- /** True, if paid media messages can be sent or forwarded to the channel chat. The field is available only for channel chats. */
356
- can_send_paid_media?: undefined;
357
386
  }
358
387
  /** Internal type for supergroup chats */
359
388
  export interface SupergroupChat {
@@ -363,14 +392,16 @@ export declare namespace ChatFullInfo {
363
392
  type: "supergroup";
364
393
  /** Title, for supergroups, channels and group chats */
365
394
  title: string;
366
- /** Username, for private chats, supergroups and channels if available */
395
+ /** Username, for private chats, supergroups and channels if available */
367
396
  username?: string;
368
- /** First name of the other party in a private chat */
397
+ /** First name of the other party in a private chat */
369
398
  first_name?: undefined;
370
- /** Last name of the other party in a private chat */
399
+ /** Last name of the other party in a private chat */
371
400
  last_name?: undefined;
372
401
  /** True, if the supergroup chat is a forum (has topics enabled) */
373
402
  is_forum?: true;
403
+ /** True, if the chat is the direct messages chat of a channel */
404
+ is_direct_messages?: true;
374
405
  /** Identifier of the accent color for the chat name and backgrounds of the chat photo, reply header, and link preview. See accent colors for more details. */
375
406
  accent_color_id: number;
376
407
  /** The maximum number of reactions that can be set on a message in the chat */
@@ -387,8 +418,14 @@ export declare namespace ChatFullInfo {
387
418
  business_location?: undefined;
388
419
  /** For private chats with business accounts, the opening hours of the business */
389
420
  business_opening_hours?: undefined;
421
+ /** For private chats, the rating of the user if any */
422
+ rating?: undefined;
423
+ /** The color scheme based on a unique gift that must be used for the chat's name, message replies and link previews */
424
+ unique_gift_colors?: UniqueGiftColors;
390
425
  /** For private chats, the personal channel of the user */
391
426
  personal_chat?: undefined;
427
+ /** Information about the corresponding channel chat; for direct messages chats only */
428
+ parent_chat?: Chat.ChannelChat;
392
429
  /** List of available reactions allowed in the chat. If omitted, then all emoji reactions are allowed. */
393
430
  available_reactions?: ReactionType[];
394
431
  /** Custom emoji identifier of the emoji chosen by the chat for the reply header and link preview background */
@@ -397,7 +434,7 @@ export declare namespace ChatFullInfo {
397
434
  profile_accent_color_id?: number;
398
435
  /** Custom emoji identifier of the emoji chosen by the chat for its profile background */
399
436
  profile_background_custom_emoji_id?: string;
400
- /** Custom emoji identifier of the emoji status of the chat or the other party in a private chat */
437
+ /** Custom emoji identifier of the emoji status of the chat or the other party in a private chat */
401
438
  emoji_status_custom_emoji_id?: string;
402
439
  /** Expiration date of the emoji status of the chat or the other party in a private chat, in Unix time, if any */
403
440
  emoji_status_expiration_date?: number;
@@ -413,19 +450,21 @@ export declare namespace ChatFullInfo {
413
450
  join_by_request?: true;
414
451
  /** Description, for groups, supergroups and channel chats */
415
452
  description?: string;
416
- /** Primary invite link, for groups, supergroups and channel chats */
453
+ /** Primary invite link, for groups, supergroups and channel chats */
417
454
  invite_link?: string;
418
455
  /** The most recent pinned message (by sending date) */
419
456
  pinned_message?: Message;
420
457
  /** Default chat member permissions, for groups and supergroups */
421
458
  permissions?: ChatPermissions;
422
- /** True, if gifts can be sent to the chat */
423
- can_send_gift?: true;
459
+ /** Information about types of gifts that are accepted by the chat or by the corresponding user for private chats */
460
+ accepted_gift_types: AcceptedGiftTypes;
461
+ /** True, if paid media messages can be sent or forwarded to the channel chat. The field is available only for channel chats. */
462
+ can_send_paid_media?: undefined;
424
463
  /** For supergroups, the minimum allowed delay between consecutive messages sent by each unprivileged user; in seconds */
425
464
  slow_mode_delay?: number;
426
- /** For supergroups, the minimum number of boosts that a non-administrator user needs to add in order to ignore slow mode and chat permissions */
465
+ /** For supergroups, the minimum number of boosts that a non-administrator user needs to add in order to ignore slow mode and chat permissions */
427
466
  unrestrict_boost_count?: number;
428
- /** The time after which all messages sent to the chat will be automatically deleted; in seconds */
467
+ /** The time after which all messages sent to the chat will be automatically deleted; in seconds */
429
468
  message_auto_delete_time?: number;
430
469
  /** True, if aggressive anti-spam checks are enabled in the supergroup. The field is only available to chat administrators. */
431
470
  has_aggressive_anti_spam_enabled?: true;
@@ -443,12 +482,8 @@ export declare namespace ChatFullInfo {
443
482
  custom_emoji_sticker_set_name?: string;
444
483
  /** Unique identifier for the linked chat, i.e. the discussion group identifier for a channel and vice versa; for supergroups and channel chats. */
445
484
  linked_chat_id?: number;
446
- /** Information about the corresponding channel chat; for direct messages chats only */
447
- parent_chat?: Chat.ChannelChat;
448
485
  /** For supergroups, the location to which the supergroup is connected */
449
486
  location?: ChatLocation;
450
- /** True, if paid media messages can be sent or forwarded to the channel chat. The field is available only for channel chats. */
451
- can_send_paid_media?: undefined;
452
487
  }
453
488
  /** Internal type for channel chats */
454
489
  export interface ChannelChat {
@@ -458,14 +493,16 @@ export declare namespace ChatFullInfo {
458
493
  type: "channel";
459
494
  /** Title, for supergroups, channels and group chats */
460
495
  title: string;
461
- /** Username, for private chats, supergroups and channels if available */
496
+ /** Username, for private chats, supergroups and channels if available */
462
497
  username?: string;
463
- /** First name of the other party in a private chat */
498
+ /** First name of the other party in a private chat */
464
499
  first_name?: undefined;
465
- /** Last name of the other party in a private chat */
500
+ /** Last name of the other party in a private chat */
466
501
  last_name?: undefined;
467
502
  /** True, if the supergroup chat is a forum (has topics enabled) */
468
503
  is_forum?: undefined;
504
+ /** True, if the chat is the direct messages chat of a channel */
505
+ is_direct_messages?: undefined;
469
506
  /** Identifier of the accent color for the chat name and backgrounds of the chat photo, reply header, and link preview. See accent colors for more details. */
470
507
  accent_color_id: number;
471
508
  /** The maximum number of reactions that can be set on a message in the chat */
@@ -482,8 +519,14 @@ export declare namespace ChatFullInfo {
482
519
  business_location?: undefined;
483
520
  /** For private chats with business accounts, the opening hours of the business */
484
521
  business_opening_hours?: undefined;
522
+ /** For private chats, the rating of the user if any */
523
+ rating?: undefined;
524
+ /** The color scheme based on a unique gift that must be used for the chat's name, message replies and link previews */
525
+ unique_gift_colors?: UniqueGiftColors;
485
526
  /** For private chats, the personal channel of the user */
486
527
  personal_chat?: undefined;
528
+ /** Information about the corresponding channel chat; for direct messages chats only */
529
+ parent_chat?: undefined;
487
530
  /** List of available reactions allowed in the chat. If omitted, then all emoji reactions are allowed. */
488
531
  available_reactions?: ReactionType[];
489
532
  /** Custom emoji identifier of the emoji chosen by the chat for the reply header and link preview background */
@@ -492,7 +535,7 @@ export declare namespace ChatFullInfo {
492
535
  profile_accent_color_id?: number;
493
536
  /** Custom emoji identifier of the emoji chosen by the chat for its profile background */
494
537
  profile_background_custom_emoji_id?: string;
495
- /** Custom emoji identifier of the emoji status of the chat or the other party in a private chat */
538
+ /** Custom emoji identifier of the emoji status of the chat or the other party in a private chat */
496
539
  emoji_status_custom_emoji_id?: string;
497
540
  /** Expiration date of the emoji status of the chat or the other party in a private chat, in Unix time, if any */
498
541
  emoji_status_expiration_date?: number;
@@ -508,19 +551,21 @@ export declare namespace ChatFullInfo {
508
551
  join_by_request?: undefined;
509
552
  /** Description, for groups, supergroups and channel chats */
510
553
  description?: string;
511
- /** Primary invite link, for groups, supergroups and channel chats */
554
+ /** Primary invite link, for groups, supergroups and channel chats */
512
555
  invite_link?: string;
513
556
  /** The most recent pinned message (by sending date) */
514
557
  pinned_message?: Message;
515
558
  /** Default chat member permissions, for groups and supergroups */
516
559
  permissions?: undefined;
517
- /** True, if gifts can be sent to the chat */
518
- can_send_gift?: true;
560
+ /** Information about types of gifts that are accepted by the chat or by the corresponding user for private chats */
561
+ accepted_gift_types: AcceptedGiftTypes;
562
+ /** True, if paid media messages can be sent or forwarded to the channel chat. The field is available only for channel chats. */
563
+ can_send_paid_media?: true;
519
564
  /** For supergroups, the minimum allowed delay between consecutive messages sent by each unprivileged user; in seconds */
520
565
  slow_mode_delay?: undefined;
521
- /** For supergroups, the minimum number of boosts that a non-administrator user needs to add in order to ignore slow mode and chat permissions */
566
+ /** For supergroups, the minimum number of boosts that a non-administrator user needs to add in order to ignore slow mode and chat permissions */
522
567
  unrestrict_boost_count?: undefined;
523
- /** The time after which all messages sent to the chat will be automatically deleted; in seconds */
568
+ /** The time after which all messages sent to the chat will be automatically deleted; in seconds */
524
569
  message_auto_delete_time?: number;
525
570
  /** True, if aggressive anti-spam checks are enabled in the supergroup. The field is only available to chat administrators. */
526
571
  has_aggressive_anti_spam_enabled?: undefined;
@@ -538,12 +583,8 @@ export declare namespace ChatFullInfo {
538
583
  custom_emoji_sticker_set_name?: undefined;
539
584
  /** Unique identifier for the linked chat, i.e. the discussion group identifier for a channel and vice versa; for supergroups and channel chats. */
540
585
  linked_chat_id?: number;
541
- /** Information about the corresponding channel chat; for direct messages chats only */
542
- parent_chat?: undefined;
543
586
  /** For supergroups, the location to which the supergroup is connected */
544
587
  location?: undefined;
545
- /** True, if paid media messages can be sent or forwarded to the channel chat. The field is available only for channel chats. */
546
- can_send_paid_media?: undefined;
547
588
  }
548
589
  }
549
590
 
@@ -903,6 +944,8 @@ export interface ForumTopic {
903
944
  message_thread_id: number;
904
945
  /** Name of the topic */
905
946
  name: string;
947
+ /** True, if the name of the topic wasn't specified explicitly by its creator and likely needs to be changed by the bot */
948
+ is_name_implicit?: true;
906
949
  /** Color of the topic icon in RGB format */
907
950
  icon_color: number;
908
951
  /** Unique identifier of the custom emoji shown as the topic icon */