@telegram.ts/types 1.8.0 → 1.10.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.
@@ -111,6 +111,8 @@ export interface InlineQueryResultPhoto {
111
111
  description?: string;
112
112
  /** Caption of the photo to be sent, 0-1024 characters after entities parsing */
113
113
  caption?: string;
114
+ /** Pass True, if the caption must be shown above the message media */
115
+ show_caption_above_media?: boolean;
114
116
  /** Mode for parsing entities in the photo caption. See formatting options for more details. */
115
117
  parse_mode?: ParseMode;
116
118
  /** List of special entities that appear in the caption, which can be specified instead of parse_mode */
@@ -142,6 +144,8 @@ export interface InlineQueryResultGif {
142
144
  title?: string;
143
145
  /** Caption of the GIF file to be sent, 0-1024 characters after entities parsing */
144
146
  caption?: string;
147
+ /** Pass True, if the caption must be shown above the message media */
148
+ show_caption_above_media?: boolean;
145
149
  /** Mode for parsing entities in the caption. See formatting options for more details. */
146
150
  parse_mode?: ParseMode;
147
151
  /** List of special entities that appear in the caption, which can be specified instead of parse_mode */
@@ -173,6 +177,8 @@ export interface InlineQueryResultMpeg4Gif {
173
177
  title?: string;
174
178
  /** Caption of the MPEG-4 file to be sent, 0-1024 characters after entities parsing */
175
179
  caption?: string;
180
+ /** Pass True, if the caption must be shown above the message media */
181
+ show_caption_above_media?: boolean;
176
182
  /** Mode for parsing entities in the caption. See formatting options for more details. */
177
183
  parse_mode?: ParseMode;
178
184
  /** List of special entities that appear in the caption, which can be specified instead of parse_mode */
@@ -200,6 +206,8 @@ export interface InlineQueryResultVideo {
200
206
  title: string;
201
207
  /** Caption of the video to be sent, 0-1024 characters after entities parsing */
202
208
  caption?: string;
209
+ /** Pass True, if the caption must be shown above the message media */
210
+ show_caption_above_media?: boolean;
203
211
  /** Mode for parsing entities in the video caption. See formatting options for more details. */
204
212
  parse_mode?: ParseMode;
205
213
  /** List of special entities that appear in the caption, which can be specified instead of parse_mode */
@@ -318,7 +326,7 @@ export interface InlineQueryResultLocation {
318
326
  title: string;
319
327
  /** The radius of uncertainty for the location, measured in meters; 0-1500 */
320
328
  horizontal_accuracy?: number;
321
- /** Period in seconds for which the location can be updated, should be between 60 and 86400. */
329
+ /** 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. */
322
330
  live_period?: number;
323
331
  /** For live locations, a direction in which the user is moving, in degrees. Must be between 1 and 360 if specified. */
324
332
  heading?: number;
@@ -424,6 +432,8 @@ export interface InlineQueryResultCachedPhoto {
424
432
  description?: string;
425
433
  /** Caption of the photo to be sent, 0-1024 characters after entities parsing */
426
434
  caption?: string;
435
+ /** Pass True, if the caption must be shown above the message media */
436
+ show_caption_above_media?: boolean;
427
437
  /** Mode for parsing entities in the photo caption. See formatting options for more details. */
428
438
  parse_mode?: ParseMode;
429
439
  /** List of special entities that appear in the caption, which can be specified instead of parse_mode */
@@ -445,6 +455,8 @@ export interface InlineQueryResultCachedGif {
445
455
  title?: string;
446
456
  /** Caption of the GIF file to be sent, 0-1024 characters after entities parsing */
447
457
  caption?: string;
458
+ /** Pass True, if the caption must be shown above the message media */
459
+ show_caption_above_media?: boolean;
448
460
  /** Mode for parsing entities in the caption. See formatting options for more details. */
449
461
  parse_mode?: ParseMode;
450
462
  /** List of special entities that appear in the caption, which can be specified instead of parse_mode */
@@ -466,6 +478,8 @@ export interface InlineQueryResultCachedMpeg4Gif {
466
478
  title?: string;
467
479
  /** Caption of the MPEG-4 file to be sent, 0-1024 characters after entities parsing */
468
480
  caption?: string;
481
+ /** Pass True, if the caption must be shown above the message media */
482
+ show_caption_above_media?: boolean;
469
483
  /** Mode for parsing entities in the caption. See formatting options for more details. */
470
484
  parse_mode?: ParseMode;
471
485
  /** List of special entities that appear in the caption, which can be specified instead of parse_mode */
@@ -530,6 +544,8 @@ export interface InlineQueryResultCachedVideo {
530
544
  description?: string;
531
545
  /** Caption of the video to be sent, 0-1024 characters after entities parsing */
532
546
  caption?: string;
547
+ /** Pass True, if the caption must be shown above the message media */
548
+ show_caption_above_media?: boolean;
533
549
  /** Mode for parsing entities in the video caption. See formatting options for more details. */
534
550
  parse_mode?: ParseMode;
535
551
  /** List of special entities that appear in the caption, which can be specified instead of parse_mode */
@@ -615,7 +631,7 @@ export interface InputLocationMessageContent {
615
631
  longitude: number;
616
632
  /** The radius of uncertainty for the location, measured in meters; 0-1500 */
617
633
  horizontal_accuracy?: number;
618
- /** Period in seconds for which the location can be updated, should be between 60 and 86400. */
634
+ /** 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. */
619
635
  live_period?: number;
620
636
  /** For live locations, a direction in which the user is moving, in degrees. Must be between 1 and 360 if specified. */
621
637
  heading?: number;
@@ -660,13 +676,13 @@ export interface InputInvoiceMessageContent {
660
676
  description: string;
661
677
  /** Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use for your internal processes. */
662
678
  payload: string;
663
- /** Payment provider token, obtained via BotFather */
664
- provider_token: string;
665
- /** Three-letter ISO 4217 currency code, see more on currencies */
679
+ /** Payment provider token, obtained via @BotFather. Pass an empty string for payments in Telegram Stars. */
680
+ provider_token?: string;
681
+ /** Three-letter ISO 4217 currency code, see more on currencies. Pass “XTR” for payments in Telegram Stars. */
666
682
  currency: string;
667
- /** Price breakdown, a list of components (e.g. product price, tax, discount, delivery cost, delivery tax, bonus, etc.) */
683
+ /** 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. */
668
684
  prices: LabeledPrice[];
669
- /** 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 */
685
+ /** 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. */
670
686
  max_tip_amount?: number;
671
687
  /** 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. */
672
688
  suggested_tip_amounts?: number[];
@@ -680,19 +696,19 @@ export interface InputInvoiceMessageContent {
680
696
  photo_width?: number;
681
697
  /** Photo height */
682
698
  photo_height?: number;
683
- /** Pass True if you require the user's full name to complete the order */
699
+ /** Pass True if you require the user's full name to complete the order. Ignored for payments in Telegram Stars. */
684
700
  need_name?: boolean;
685
- /** Pass True if you require the user's phone number to complete the order */
701
+ /** Pass True if you require the user's phone number to complete the order. Ignored for payments in Telegram Stars. */
686
702
  need_phone_number?: boolean;
687
- /** Pass True if you require the user's email address to complete the order */
703
+ /** Pass True if you require the user's email address to complete the order. Ignored for payments in Telegram Stars. */
688
704
  need_email?: boolean;
689
- /** Pass True if you require the user's shipping address to complete the order */
705
+ /** Pass True if you require the user's shipping address to complete the order. Ignored for payments in Telegram Stars. */
690
706
  need_shipping_address?: boolean;
691
- /** Pass True if the user's phone number should be sent to provider */
707
+ /** Pass True if the user's phone number should be sent to provider. Ignored for payments in Telegram Stars. */
692
708
  send_phone_number_to_provider?: boolean;
693
- /** Pass True if the user's email address should be sent to provider */
709
+ /** Pass True if the user's email address should be sent to provider. Ignored for payments in Telegram Stars. */
694
710
  send_email_to_provider?: boolean;
695
- /** Pass True if the final price depends on the shipping method */
711
+ /** Pass True if the final price depends on the shipping method. Ignored for payments in Telegram Stars. */
696
712
  is_flexible?: boolean;
697
713
  }
698
714
  /** Represents a result of an inline query that was chosen by the user and sent to their chat partner.
@@ -25,7 +25,7 @@ export interface Invoice {
25
25
  description: string;
26
26
  /** A unique bot deep-linking parameter that can be used to generate this invoice. */
27
27
  start_parameter: string;
28
- /** The three-letter ISO 4217 currency code. */
28
+ /** Three-letter ISO 4217 currency code, or “XTR” for payments in Telegram Stars. */
29
29
  currency: string;
30
30
  /**
31
31
  * The total price in the smallest units of the currency (integer, not float/double).
@@ -84,7 +84,7 @@ export interface ShippingOption {
84
84
  * This interface contains basic information about a successful payment.
85
85
  */
86
86
  export interface SuccessfulPayment {
87
- /** The three-letter ISO 4217 currency code. */
87
+ /** Three-letter ISO 4217 currency code, or “XTR” for payments in Telegram Stars. */
88
88
  currency: string;
89
89
  /**
90
90
  * The total price in the smallest units of the currency (integer, not float/double).
@@ -127,7 +127,7 @@ export interface PreCheckoutQuery {
127
127
  id: string;
128
128
  /** The user who sent the query. */
129
129
  from: User;
130
- /** The three-letter ISO 4217 currency code. */
130
+ /** Three-letter ISO 4217 currency code, or “XTR” for payments in Telegram Stars. */
131
131
  currency: string;
132
132
  /**
133
133
  * The total price in the smallest units of the currency (integer, not float/double).