@grammyjs/types 3.6.2 → 3.8.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/inline.d.ts CHANGED
@@ -86,6 +86,8 @@ export interface InlineQueryResultPhoto {
86
86
  description?: string;
87
87
  /** Caption of the photo to be sent, 0-1024 characters after entities parsing */
88
88
  caption?: string;
89
+ /** Pass True, if the caption must be shown above the message media */
90
+ show_caption_above_media?: boolean;
89
91
  /** Mode for parsing entities in the photo caption. See formatting options for more details. */
90
92
  parse_mode?: ParseMode;
91
93
  /** List of special entities that appear in the caption, which can be specified instead of parse_mode */
@@ -117,6 +119,8 @@ export interface InlineQueryResultGif {
117
119
  title?: string;
118
120
  /** Caption of the GIF file to be sent, 0-1024 characters after entities parsing */
119
121
  caption?: string;
122
+ /** Pass True, if the caption must be shown above the message media */
123
+ show_caption_above_media?: boolean;
120
124
  /** Mode for parsing entities in the caption. See formatting options for more details. */
121
125
  parse_mode?: ParseMode;
122
126
  /** List of special entities that appear in the caption, which can be specified instead of parse_mode */
@@ -148,6 +152,8 @@ export interface InlineQueryResultMpeg4Gif {
148
152
  title?: string;
149
153
  /** Caption of the MPEG-4 file to be sent, 0-1024 characters after entities parsing */
150
154
  caption?: string;
155
+ /** Pass True, if the caption must be shown above the message media */
156
+ show_caption_above_media?: boolean;
151
157
  /** Mode for parsing entities in the caption. See formatting options for more details. */
152
158
  parse_mode?: ParseMode;
153
159
  /** List of special entities that appear in the caption, which can be specified instead of parse_mode */
@@ -175,6 +181,8 @@ export interface InlineQueryResultVideo {
175
181
  title: string;
176
182
  /** Caption of the video to be sent, 0-1024 characters after entities parsing */
177
183
  caption?: string;
184
+ /** Pass True, if the caption must be shown above the message media */
185
+ show_caption_above_media?: boolean;
178
186
  /** Mode for parsing entities in the video caption. See formatting options for more details. */
179
187
  parse_mode?: ParseMode;
180
188
  /** List of special entities that appear in the caption, which can be specified instead of parse_mode */
@@ -285,7 +293,7 @@ export interface InlineQueryResultLocation {
285
293
  title: string;
286
294
  /** The radius of uncertainty for the location, measured in meters; 0-1500 */
287
295
  horizontal_accuracy?: number;
288
- /** Period in seconds for which the location can be updated, should be between 60 and 86400. */
296
+ /** Period in seconds during which the location can be updated, should be between 60 and 86400, or 0x7FFFFFFF for live locations that can be edited indefinitely. */
289
297
  live_period?: number;
290
298
  /** For live locations, a direction in which the user is moving, in degrees. Must be between 1 and 360 if specified. */
291
299
  heading?: number;
@@ -385,6 +393,8 @@ export interface InlineQueryResultCachedPhoto {
385
393
  description?: string;
386
394
  /** Caption of the photo to be sent, 0-1024 characters after entities parsing */
387
395
  caption?: string;
396
+ /** Pass True, if the caption must be shown above the message media */
397
+ show_caption_above_media?: boolean;
388
398
  /** Mode for parsing entities in the photo caption. See formatting options for more details. */
389
399
  parse_mode?: ParseMode;
390
400
  /** List of special entities that appear in the caption, which can be specified instead of parse_mode */
@@ -406,6 +416,8 @@ export interface InlineQueryResultCachedGif {
406
416
  title?: string;
407
417
  /** Caption of the GIF file to be sent, 0-1024 characters after entities parsing */
408
418
  caption?: string;
419
+ /** Pass True, if the caption must be shown above the message media */
420
+ show_caption_above_media?: boolean;
409
421
  /** Mode for parsing entities in the caption. See formatting options for more details. */
410
422
  parse_mode?: ParseMode;
411
423
  /** List of special entities that appear in the caption, which can be specified instead of parse_mode */
@@ -427,6 +439,8 @@ export interface InlineQueryResultCachedMpeg4Gif {
427
439
  title?: string;
428
440
  /** Caption of the MPEG-4 file to be sent, 0-1024 characters after entities parsing */
429
441
  caption?: string;
442
+ /** Pass True, if the caption must be shown above the message media */
443
+ show_caption_above_media?: boolean;
430
444
  /** Mode for parsing entities in the caption. See formatting options for more details. */
431
445
  parse_mode?: ParseMode;
432
446
  /** List of special entities that appear in the caption, which can be specified instead of parse_mode */
@@ -486,6 +500,8 @@ export interface InlineQueryResultCachedVideo {
486
500
  description?: string;
487
501
  /** Caption of the video to be sent, 0-1024 characters after entities parsing */
488
502
  caption?: string;
503
+ /** Pass True, if the caption must be shown above the message media */
504
+ show_caption_above_media?: boolean;
489
505
  /** Mode for parsing entities in the video caption. See formatting options for more details. */
490
506
  parse_mode?: ParseMode;
491
507
  /** List of special entities that appear in the caption, which can be specified instead of parse_mode */
@@ -562,7 +578,7 @@ export interface InputLocationMessageContent {
562
578
  longitude: number;
563
579
  /** The radius of uncertainty for the location, measured in meters; 0-1500 */
564
580
  horizontal_accuracy?: number;
565
- /** Period in seconds for which the location can be updated, should be between 60 and 86400. */
581
+ /** Period in seconds during which the location can be updated, should be between 60 and 86400, or 0x7FFFFFFF for live locations that can be edited indefinitely. */
566
582
  live_period?: number;
567
583
  /** For live locations, a direction in which the user is moving, in degrees. Must be between 1 and 360 if specified. */
568
584
  heading?: number;
@@ -607,13 +623,13 @@ export interface InputInvoiceMessageContent {
607
623
  description: string;
608
624
  /** Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use for your internal processes. */
609
625
  payload: string;
610
- /** Payment provider token, obtained via BotFather */
611
- provider_token: string;
612
- /** Three-letter ISO 4217 currency code, see more on currencies */
626
+ /** Payment provider token, obtained via @BotFather. Pass an empty string for payments in Telegram Stars. */
627
+ provider_token?: string;
628
+ /** Three-letter ISO 4217 currency code, see more on currencies. Pass “XTR” for payments in Telegram Stars. */
613
629
  currency: string;
614
- /** Price breakdown, a list of components (e.g. product price, tax, discount, delivery cost, delivery tax, bonus, etc.) */
630
+ /** Price breakdown, a JSON-serialized list of components (e.g. product price, tax, discount, delivery cost, delivery tax, bonus, etc.). Must contain exactly one item for payments in Telegram Stars. */
615
631
  prices: LabeledPrice[];
616
- /** The maximum accepted amount for tips in the smallest units of the currency (integer, not float/double). For example, for a maximum tip of US$ 1.45 pass max_tip_amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies). Defaults to 0 */
632
+ /** The maximum accepted amount for tips in the smallest units of the currency (integer, not float/double). For example, for a maximum tip of US$ 1.45 pass max_tip_amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies). Defaults to 0. Not supported for payments in Telegram Stars. */
617
633
  max_tip_amount?: number;
618
634
  /** An array of suggested amounts of tip in the smallest units of the currency (integer, not float/double). At most 4 suggested tip amounts can be specified. The suggested tip amounts must be positive, passed in a strictly increased order and must not exceed max_tip_amount. */
619
635
  suggested_tip_amounts?: number[];
@@ -627,19 +643,19 @@ export interface InputInvoiceMessageContent {
627
643
  photo_width?: number;
628
644
  /** Photo height */
629
645
  photo_height?: number;
630
- /** Pass True if you require the user's full name to complete the order */
646
+ /** Pass True if you require the user's full name to complete the order. Ignored for payments in Telegram Stars. */
631
647
  need_name?: boolean;
632
- /** Pass True if you require the user's phone number to complete the order */
648
+ /** Pass True if you require the user's phone number to complete the order. Ignored for payments in Telegram Stars. */
633
649
  need_phone_number?: boolean;
634
- /** Pass True if you require the user's email address to complete the order */
650
+ /** Pass True if you require the user's email address to complete the order. Ignored for payments in Telegram Stars. */
635
651
  need_email?: boolean;
636
- /** Pass True if you require the user's shipping address to complete the order */
652
+ /** Pass True if you require the user's shipping address to complete the order. Ignored for payments in Telegram Stars. */
637
653
  need_shipping_address?: boolean;
638
- /** Pass True if the user's phone number should be sent to provider */
654
+ /** Pass True if the user's phone number should be sent to provider. Ignored for payments in Telegram Stars. */
639
655
  send_phone_number_to_provider?: boolean;
640
- /** Pass True if the user's email address should be sent to provider */
656
+ /** Pass True if the user's email address should be sent to provider. Ignored for payments in Telegram Stars. */
641
657
  send_email_to_provider?: boolean;
642
- /** Pass True if the final price depends on the shipping method */
658
+ /** Pass True if the final price depends on the shipping method. Ignored for payments in Telegram Stars. */
643
659
  is_flexible?: boolean;
644
660
  }
645
661
  /** Represents a result of an inline query that was chosen by the user and sent to their chat partner.