@telegram.ts/types 1.7.0 → 1.9.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.
@@ -17,11 +17,11 @@ export declare namespace InlineKeyboardButton {
17
17
  url: string;
18
18
  }
19
19
  export interface CallbackButton extends AbstractInlineKeyboardButton {
20
- /** Data to be sent in a callback query to the bot when button is pressed, 1-64 bytes */
20
+ /** Data to be sent in a callback query to the bot when button is pressed, 1-64 bytes. Not supported for messages sent on behalf of a Telegram Business account. */
21
21
  callback_data: string;
22
22
  }
23
23
  export interface WebAppButton extends AbstractInlineKeyboardButton {
24
- /** Description of the Web App that will be launched when the user presses the button. The Web App will be able to send an arbitrary message on behalf of the user using the method answerWebAppQuery. Available only in private chats between a user and the bot. */
24
+ /** Description of the Web App that will be launched when the user presses the button. The Web App will be able to send an arbitrary message on behalf of the user using the method answerWebAppQuery. Available only in private chats between a user and the bot. Not supported for messages sent on behalf of a Telegram Business account. */
25
25
  web_app: WebAppInfo;
26
26
  }
27
27
  export interface LoginButton extends AbstractInlineKeyboardButton {
@@ -29,19 +29,19 @@ export declare namespace InlineKeyboardButton {
29
29
  login_url: LoginUrl;
30
30
  }
31
31
  export interface SwitchInlineButton extends AbstractInlineKeyboardButton {
32
- /** If set, pressing the button will prompt the user to select one of their chats, open that chat and insert the bot's username and the specified inline query in the input field. Can be empty, in which case just the bot's username will be inserted. */
32
+ /** If set, pressing the button will prompt the user to select one of their chats, open that chat and insert the bot's username and the specified inline query in the input field. May be empty, in which case just the bot's username will be inserted. Not supported for messages sent on behalf of a Telegram Business account. */
33
33
  switch_inline_query: string;
34
34
  }
35
35
  export interface SwitchInlineCurrentChatButton
36
36
  extends AbstractInlineKeyboardButton {
37
37
  /** If set, pressing the button will insert the bot's username and the specified inline query in the current chat's input field. Can be empty, in which case only the bot's username will be inserted.
38
38
 
39
- This offers a quick way for the user to open your bot in inline mode in the same chat – good for selecting something from multiple options. */
39
+ This offers a quick way for the user to open your bot in inline mode in the same chat – good for selecting something from multiple options. Not supported in channels and for messages sent on behalf of a Telegram Business account. */
40
40
  switch_inline_query_current_chat: string;
41
41
  }
42
42
  export interface SwitchInlineChosenChatButton
43
43
  extends AbstractInlineKeyboardButton {
44
- /** If set, pressing the button will prompt the user to select one of their chats of the specified type, open that chat and insert the bot's username and the specified inline query in the input field */
44
+ /** If set, pressing the button will prompt the user to select one of their chats of the specified type, open that chat and insert the bot's username and the specified inline query in the input field. Not supported for messages sent on behalf of a Telegram Business account. */
45
45
  switch_inline_query_chosen_chat: SwitchInlineQueryChosenChat;
46
46
  }
47
47
  export interface GameButton extends AbstractInlineKeyboardButton {
@@ -122,7 +122,7 @@ export interface CallbackQuery {
122
122
  game_short_name?: string;
123
123
  }
124
124
 
125
- /** This object represents a custom keyboard with reply options (see Introduction to bots for details and examples). */
125
+ /** This object represents a custom keyboard with reply options (see Introduction to bots for details and examples). Not supported in channels and for messages sent on behalf of a Telegram Business account. */
126
126
  export interface ReplyKeyboardMarkup {
127
127
  /** Array of button rows, each represented by an Array of KeyboardButton objects */
128
128
  keyboard: KeyboardButton[][];
@@ -188,7 +188,7 @@ export interface KeyboardButtonPollType {
188
188
  type?: "quiz" | "regular";
189
189
  }
190
190
 
191
- /** Upon receiving a message with this object, Telegram clients will remove the current custom keyboard and display the default letter-keyboard. By default, custom keyboards are displayed until a new keyboard is sent by a bot. An exception is made for one-time keyboards that are hidden immediately after the user presses a button (see ReplyKeyboardMarkup). */
191
+ /** Upon receiving a message with this object, Telegram clients will remove the current custom keyboard and display the default letter-keyboard. By default, custom keyboards are displayed until a new keyboard is sent by a bot. An exception is made for one-time keyboards that are hidden immediately after the user presses a button (see ReplyKeyboardMarkup). Not supported in channels and for messages sent on behalf of a Telegram Business account. */
192
192
  export interface ReplyKeyboardRemove {
193
193
  /** Requests clients to remove the custom keyboard (user will not be able to summon this keyboard; if you want to hide the keyboard from sight but keep it accessible, use one_time_keyboard in ReplyKeyboardMarkup) */
194
194
  remove_keyboard: true;
@@ -198,7 +198,7 @@ export interface ReplyKeyboardRemove {
198
198
  selective?: boolean;
199
199
  }
200
200
 
201
- /** Upon receiving a message with this object, Telegram clients will display a reply interface to the user (act as if the user has selected the bot's message and tapped 'Reply'). This can be extremely useful if you want to create user-friendly step-by-step interfaces without having to sacrifice privacy mode.
201
+ /** Upon receiving a message with this object, Telegram clients will display a reply interface to the user (act as if the user has selected the bot's message and tapped 'Reply'). This can be extremely useful if you want to create user-friendly step-by-step interfaces without having to sacrifice privacy mode. Not supported in channels and for messages sent on behalf of a Telegram Business account.
202
202
 
203
203
  Example: A poll bot for groups runs in privacy mode (only receives commands, replies to its messages and mentions). There could be two ways to create a new poll:
204
204
 
@@ -222,7 +222,7 @@ export interface WebAppInfo {
222
222
  url: string;
223
223
  }
224
224
 
225
- /** This object defines the criteria used to request suitable users. The identifiers of the selected users will be shared with the bot when the corresponding button is pressed. */
225
+ /** This object defines the criteria used to request suitable users. Information about the selected users will be shared with the bot when the corresponding button is pressed. */
226
226
  export interface KeyboardButtonRequestUsers {
227
227
  /** Signed 32-bit identifier of the request that will be received back in the UsersShared object. Must be unique within the message */
228
228
  request_id: number;
@@ -232,9 +232,15 @@ export interface KeyboardButtonRequestUsers {
232
232
  user_is_premium?: boolean;
233
233
  /** The maximum number of users to be selected; 1-10. Defaults to 1. */
234
234
  max_quantity?: boolean;
235
+ /** Pass True to request the users' first and last names */
236
+ request_name?: boolean;
237
+ /** Pass True to request the users' usernames */
238
+ request_username?: boolean;
239
+ /** Pass True to request the users' photos */
240
+ request_photo?: boolean;
235
241
  }
236
242
 
237
- /** This object defines the criteria used to request a suitable chat. The identifier of the selected chat will be shared with the bot when the corresponding button is pressed. */
243
+ /** This object defines the criteria used to request a suitable chat. Information about the selected chat will be shared with the bot when the corresponding button is pressed. The bot will be granted requested rights in the chat if appropriate */
238
244
  export interface KeyboardButtonRequestChat {
239
245
  /** Signed 32-bit identifier of the request, which will be received back in the ChatShared object. Must be unique within the message */
240
246
  request_id: number;
@@ -252,4 +258,10 @@ export interface KeyboardButtonRequestChat {
252
258
  bot_administrator_rights?: ChatAdministratorRights;
253
259
  /** Pass True to request a chat with the bot as a member. Otherwise, no additional restrictions are applied. */
254
260
  bot_is_member?: boolean;
261
+ /** Pass True to request the chat's title */
262
+ request_title?: boolean;
263
+ /** Pass True to request the chat's username */
264
+ request_username?: boolean;
265
+ /** Pass True to request the chat's photo */
266
+ request_photo?: boolean;
255
267
  }
@@ -17,6 +17,8 @@ export declare namespace Message {
17
17
  sender_chat?: Chat;
18
18
  /** Date the message was sent in Unix time. It is always a positive number, representing a valid date. */
19
19
  date: number;
20
+ /** Unique identifier of the business connection from which the message was received. If non-empty, the message belongs to a chat of the corresponding business account that is independent from any potential bot chat which might share the same identifier. */
21
+ business_connection_id?: string;
20
22
  /** Chat the message belongs to */
21
23
  chat: Chat;
22
24
  /** True, if the message is sent to a forum topic */
@@ -25,6 +27,8 @@ export declare namespace Message {
25
27
  export interface CommonMessage extends ServiceMessage {
26
28
  /** If the sender of the message boosted the chat, the number of boosts added by the user */
27
29
  sender_boost_count?: number;
30
+ /** The bot that actually sent the message on behalf of the business account. Available only for outgoing messages sent on behalf of the connected business account. */
31
+ sender_business_bot?: User;
28
32
  /** Information about the original message for forwarded messages */
29
33
  forward_origin?: MessageOrigin;
30
34
  /** True, if the message is a channel post that was automatically forwarded to the connected discussion group */
@@ -43,6 +47,8 @@ export declare namespace Message {
43
47
  edit_date?: number;
44
48
  /** True, if the message can't be forwarded */
45
49
  has_protected_content?: true;
50
+ /** True, if the message was sent by an implicit action, for example, as an away or a greeting business message, or as a scheduled message */
51
+ is_from_offline?: true;
46
52
  /** Signature of the post author for messages in channels, or the custom title of an anonymous group administrator */
47
53
  author_signature?: string;
48
54
  /** Options used for link preview generation for the message, if it is a text message and link preview options were changed */
@@ -113,6 +119,8 @@ export declare namespace Message {
113
119
  export type ProximityAlertTriggeredMessage = ServiceMessage &
114
120
  MsgWith<"proximity_alert_triggered">;
115
121
  export type BoostAddedMessage = ServiceMessage & MsgWith<"boost_added">;
122
+ export type ChatBackgroundSetMessage = ServiceMessage &
123
+ MsgWith<"chat_background_set">;
116
124
  export type ForumTopicCreatedMessage = ServiceMessage &
117
125
  MsgWith<"forum_topic_created">;
118
126
  export type ForumTopicEditedMessage = ServiceMessage &
@@ -222,6 +230,8 @@ export interface Message extends Message.MediaMessage {
222
230
  proximity_alert_triggered?: ProximityAlertTriggered;
223
231
  /** Service message: user boosted the chat */
224
232
  boost_added?: ChatBoostAdded;
233
+ /* Service message: chat background set */
234
+ chat_background_set?: ChatBackground;
225
235
  /** Service message: forum topic created */
226
236
  forum_topic_created?: ForumTopicCreated;
227
237
  /** Service message: forum topic edited */
@@ -518,9 +528,9 @@ export interface ExternalReplyInfo {
518
528
  export interface ReplyParameters {
519
529
  /** Identifier of the message that will be replied to in the current chat, or in the chat chat_id if it is specified */
520
530
  message_id: number;
521
- /** If the message to be replied to is from a different chat, unique identifier for the chat or username of the channel (in the format @channelusername) */
531
+ /** If the message to be replied to is from a different chat, unique identifier for the chat or username of the channel (in the format @channelusername). Not supported for messages sent on behalf of a business account. */
522
532
  chat_id?: number | string;
523
- /** Pass True if the message should be sent even if the specified message to be replied to is not found; can be used only for replies in the same chat and forum topic. */
533
+ /** Pass True if the message should be sent even if the specified message to be replied to is not found; can be used only for replies in the same chat and forum topic. Always True for messages sent on behalf of a business account. */
524
534
  allow_sending_without_reply?: boolean;
525
535
  /** Quoted part of the message to be replied to; 0-1024 characters after entities parsing. The quote must be an exact substring of the message to be replied to, including bold, italic, underline, strikethrough, spoiler, and custom_emoji entities. The message will fail to send if the quote isn't found in the original message. */
526
536
  quote?: string;
@@ -741,10 +751,22 @@ export interface Dice {
741
751
  export interface PollOption {
742
752
  /** Option text, 1-100 characters */
743
753
  text: string;
754
+ /** Special entities that appear in the option text. Currently, only custom emoji entities are allowed in poll option texts */
755
+ text_entities?: MessageEntity[];
744
756
  /** Number of users that voted for this option */
745
757
  voter_count: number;
746
758
  }
747
759
 
760
+ /** This object contains information about one answer option in a poll to send. */
761
+ export interface InputPollOption {
762
+ /** Option text, 1-100 characters */
763
+ text: string;
764
+ /** Mode for parsing entities in the text. See formatting options for more details. Currently, only custom emoji entities are allowed */
765
+ text_parse_mode?: string;
766
+ /** A list of special entities that appear in the poll option text. It can be specified instead of text_parse_mode */
767
+ text_entities?: MessageEntity[];
768
+ }
769
+
748
770
  /** This object represents an answer of a user in a non-anonymous poll. */
749
771
  export interface PollAnswer {
750
772
  /** Unique poll identifier */
@@ -763,6 +785,8 @@ export interface Poll {
763
785
  id: string;
764
786
  /** Poll question, 1-300 characters */
765
787
  question: string;
788
+ /** Special entities that appear in the question. Currently, only custom emoji entities are allowed in poll questions */
789
+ question_entities?: MessageEntity[];
766
790
  /** List of poll options */
767
791
  options: PollOption[];
768
792
  /** Total number of users that voted in the poll */
@@ -789,10 +813,10 @@ export interface Poll {
789
813
 
790
814
  /** This object represents a point on the map. */
791
815
  export interface Location {
792
- /** Longitude as defined by sender */
793
- longitude: number;
794
816
  /** Latitude as defined by sender */
795
817
  latitude: number;
818
+ /** Longitude as defined by sender */
819
+ longitude: number;
796
820
  /** The radius of uncertainty for the location, measured in meters; 0-1500 */
797
821
  horizontal_accuracy?: number;
798
822
  /** Time relative to the message sending date, during which the location can be updated; in seconds. For active live locations only. */
@@ -829,6 +853,14 @@ export interface Story {
829
853
  id: number;
830
854
  }
831
855
 
856
+ /** Describes data sent from a Web App to the bot. */
857
+ export interface WebAppData {
858
+ /** The data. Be aware that a bad client can send arbitrary data in this field. */
859
+ data: string;
860
+ /** Text of the web_app keyboard button from which the Web App was opened. Be aware that a bad client can send arbitrary data in this field. */
861
+ button_text: string;
862
+ }
863
+
832
864
  /** This object represents the content of a service message, sent whenever a user in the chat triggers a proximity alert set by another user. */
833
865
  export interface ProximityAlertTriggered {
834
866
  /** User that triggered the alert */
@@ -863,6 +895,115 @@ export interface ForumTopicEdited {
863
895
  icon_custom_emoji_id?: string;
864
896
  }
865
897
 
898
+ /** This object represents a service message about a user boosting a chat. */
899
+ export interface ChatBoostAdded {
900
+ /** Number of boosts added by the user */
901
+ boost_count: number;
902
+ }
903
+
904
+ /** This object describes the way a background is filled based on the selected colors. Currently, it can be one of
905
+ - BackgroundFillSolid
906
+ - BackgroundFillGradient
907
+ - BackgroundFillFreeformGradient */
908
+ export type BackgroundFill =
909
+ | BackgroundFillSolid
910
+ | BackgroundFillGradient
911
+ | BackgroundFillFreeformGradient;
912
+
913
+ /** The background is filled using the selected color. */
914
+ export interface BackgroundFillSolid {
915
+ /** Type of the background fill, always “solid” */
916
+ type: "solid";
917
+ /** The color of the background fill in the RGB24 format */
918
+ color: number;
919
+ }
920
+
921
+ /** The background is a gradient fill. */
922
+ export interface BackgroundFillGradient {
923
+ /** Type of the background fill, always “gradient” */
924
+ type: "gradient";
925
+ /** Top color of the gradient in the RGB24 format */
926
+ top_color: number;
927
+ /** Bottom color of the gradient in the RGB24 format */
928
+ bottom_color: number;
929
+ /** Clockwise rotation angle of the background fill in degrees; 0-359 */
930
+ rotation_angle: number;
931
+ }
932
+
933
+ /** The background is a freeform gradient that rotates after every message in the chat. */
934
+ export interface BackgroundFillFreeformGradient {
935
+ /** Type of the background fill, always “freeform_gradient” */
936
+ type: "freeform_gradient";
937
+ /** A list of the 3 or 4 base colors that are used to generate the freeform gradient in the RGB24 format */
938
+ colors: number[];
939
+ }
940
+
941
+ /** This object describes the type of a background. Currently, it can be one of
942
+ - BackgroundTypeFill
943
+ - BackgroundTypeWallpaper
944
+ - BackgroundTypePattern
945
+ - BackgroundTypeChatTheme
946
+ - BackgroundTypeFill */
947
+ export type BackgroundType =
948
+ | BackgroundTypeFill
949
+ | BackgroundTypeWallpaper
950
+ | BackgroundTypePattern
951
+ | BackgroundTypeChatTheme;
952
+
953
+ /** The background is automatically filled based on the selected colors. */
954
+ export interface BackgroundTypeFill {
955
+ /** Type of the background, always “fill” */
956
+ type: "fill";
957
+ /** The background fill */
958
+ fill: BackgroundFill;
959
+ /** Dimming of the background in dark themes, as a percentage; 0-100 */
960
+ dark_theme_dimming: number;
961
+ }
962
+
963
+ /** The background is a wallpaper in the JPEG format. */
964
+ export interface BackgroundTypeWallpaper {
965
+ /** Type of the background, always “wallpaper” */
966
+ type: "wallpaper";
967
+ /** Document with the wallpaper */
968
+ document: Document;
969
+ /** Dimming of the background in dark themes, as a percentage; 0-100 */
970
+ dark_theme_dimming: number;
971
+ /** True, if the wallpaper is downscaled to fit in a 450x450 square and then box-blurred with radius 12 */
972
+ is_blurred?: true;
973
+ /** True, if the background moves slightly when the device is tilted */
974
+ is_moving?: true;
975
+ }
976
+
977
+ /** The background is a PNG or TGV (gzipped subset of SVG with MIME type “application/x-tgwallpattern”) pattern to be combined with the background fill chosen by the user. */
978
+ export interface BackgroundTypePattern {
979
+ /** Type of the background, always “pattern” */
980
+ type: "pattern";
981
+ /** Document with the pattern */
982
+ document: Document;
983
+ /** The background fill that is combined with the pattern */
984
+ fill: BackgroundFill;
985
+ /** Intensity of the pattern when it is shown above the filled background; 0-100 */
986
+ intensity: number;
987
+ /** True, if the background fill must be applied only to the pattern itself. All other pixels are black in this case. For dark themes only */
988
+ is_inverted?: true;
989
+ /** True, if the background moves slightly when the device is tilted */
990
+ is_moving?: true;
991
+ }
992
+
993
+ /** The background is taken directly from a built-in chat theme. */
994
+ export interface BackgroundTypeChatTheme {
995
+ /** Type of the background, always “chat_theme” */
996
+ type: "chat_theme";
997
+ /** Name of the chat theme, which is usually an emoji */
998
+ theme_name: string;
999
+ }
1000
+
1001
+ /** This object represents a chat background. */
1002
+ export interface ChatBackground {
1003
+ /** Type of the background*/
1004
+ type: BackgroundType;
1005
+ }
1006
+
866
1007
  /** This object represents a service message about a forum topic closed in the chat. Currently holds no information. */
867
1008
  export interface ForumTopicClosed {}
868
1009
 
@@ -885,16 +1026,22 @@ export interface ChatBoostAdded {
885
1026
  export interface UsersShared {
886
1027
  /** Identifier of the request */
887
1028
  request_id: number;
888
- /** Identifiers of the shared users. The bot may not have access to the users and could be unable to use these identifiers, unless the users are already known to the bot by some other means. */
889
- user_ids: number[];
1029
+ /** Information about users shared with the bot. */
1030
+ users: SharedUser[];
890
1031
  }
891
1032
 
892
- /** This object contains information about the chat whose identifier was shared with the bot using a KeyboardButtonRequestChat button. */
1033
+ /** This object contains information about a chat that was shared with the bot using a KeyboardButtonRequestChat button. */
893
1034
  export interface ChatShared {
894
1035
  /** Identifier of the request */
895
1036
  request_id: number;
896
1037
  /** Identifier of the shared chat. The bot may not have access to the chat and could be unable to use this identifier, unless the chat is already known to the bot by some other means. */
897
1038
  chat_id: number;
1039
+ /** Title of the chat, if the title was requested by the bot. */
1040
+ title?: string;
1041
+ /** Username of the chat, if the username was requested by the bot and available. */
1042
+ username?: string;
1043
+ /** Available sizes of the chat photo, if the photo was requested by the bot */
1044
+ photo?: PhotoSize[];
898
1045
  }
899
1046
 
900
1047
  /** This object represents a service message about a user allowing a bot to write messages after adding it to the attachment menu, launching a Web App from a link, or accepting an explicit request from a Web App sent by the method requestWriteAccess. */
@@ -928,6 +1075,20 @@ export interface VideoChatParticipantsInvited {
928
1075
  users: User[];
929
1076
  }
930
1077
 
1078
+ /** This object contains information about a user that was shared with the bot using a KeyboardButtonRequestUser button. */
1079
+ export interface SharedUser {
1080
+ /** Identifier of the shared user. The bot may not have access to the user and could be unable to use this identifier, unless the user is already known to the bot by some other means. */
1081
+ user_id: number;
1082
+ /** First name of the user, if the name was requested by the bot */
1083
+ first_name?: string;
1084
+ /** Last name of the user, if the name was requested by the bot */
1085
+ last_name?: string;
1086
+ /** Username of the user, if the username was requested by the bot */
1087
+ username?: string;
1088
+ /** Available sizes of the chat photo, if the photo was requested by the bot */
1089
+ photo?: PhotoSize[];
1090
+ }
1091
+
931
1092
  /** This object represents a service message about the creation of a scheduled giveaway. Currently holds no information. */
932
1093
  export interface GiveawayCreated {}
933
1094
 
@@ -1049,10 +1210,6 @@ export interface StickerSet {
1049
1210
  title: string;
1050
1211
  /** Type of stickers in the set, currently one of “regular”, “mask”, “custom_emoji” */
1051
1212
  sticker_type: "regular" | "mask" | "custom_emoji";
1052
- /** True, if the sticker set contains animated stickers */
1053
- is_animated: boolean;
1054
- /** True, if the sticker set contains video stickers */
1055
- is_video: boolean;
1056
1213
  /** List of all set stickers */
1057
1214
  stickers: Sticker[];
1058
1215
  /** Sticker set thumbnail in the .WEBP, .TGS, or .WEBM format */
@@ -1109,7 +1266,9 @@ export interface File {
1109
1266
  file_path?: string;
1110
1267
  }
1111
1268
 
1112
- /** This object describes the type of a reaction. Currently, it can be one of */
1269
+ /** This object describes the type of a reaction. Currently, it can be one of
1270
+ - ReactionTypeEmoji
1271
+ - ReactionTypeCustomEmoji */
1113
1272
  export type ReactionType = ReactionTypeEmoji | ReactionTypeCustomEmoji;
1114
1273
 
1115
1274
  /** The reaction is based on an emoji. */
@@ -35,21 +35,21 @@ export interface EncryptedPassportElement {
35
35
  | "temporary_registration"
36
36
  | "phone_number"
37
37
  | "email";
38
- /** Base64-encoded encrypted Telegram Passport element data provided by the user. This data is available for types "personal_details", "passport", "driver_license", "identity_card", "internal_passport", and "address". It can be decrypted and verified using the accompanying EncryptedCredentials. */
38
+ /** Base64-encoded encrypted Telegram Passport element data provided by the user; available only for personal_details”, passport”, driver_license”, identity_card”, internal_passport and address” types. Can be decrypted and verified using the accompanying EncryptedCredentials. */
39
39
  data?: string;
40
- /** User's verified phone number, available only for type "phone_number". */
40
+ /** User's verified phone number; available only for type "phone_number". */
41
41
  phone_number?: string;
42
- /** User's verified email address, available only for type "email". */
42
+ /** User's verified email address; available only for type "email". */
43
43
  email?: string;
44
- /** Array of encrypted files with documents provided by the user. This array is available for types "utility_bill", "bank_statement", "rental_agreement", "passport_registration", and "temporary_registration". The files can be decrypted and verified using the accompanying EncryptedCredentials. */
44
+ /** Array of encrypted files with documents provided by the user; This array is available only for types "utility_bill", "bank_statement", "rental_agreement", "passport_registration", and "temporary_registration". The files can be decrypted and verified using the accompanying EncryptedCredentials. */
45
45
  files?: PassportFile[];
46
- /** Encrypted file with the front side of the document, provided by the user. This file is available for types "passport", "driver_license", "identity_card", and "internal_passport". It can be decrypted and verified using the accompanying EncryptedCredentials. */
46
+ /** Encrypted file with the front side of the document, provided by the user; This file is available only for types "passport", "driver_license", "identity_card", and "internal_passport". It can be decrypted and verified using the accompanying EncryptedCredentials. */
47
47
  front_side?: PassportFile;
48
- /** Encrypted file with the reverse side of the document, provided by the user. This file is available for types "driver_license" and "identity_card". It can be decrypted and verified using the accompanying EncryptedCredentials. */
48
+ /** Encrypted file with the reverse side of the document, provided by the user; This file is available only for types "driver_license" and "identity_card". It can be decrypted and verified using the accompanying EncryptedCredentials. */
49
49
  reverse_side?: PassportFile;
50
- /** Encrypted file with the selfie of the user holding a document, provided by the user. This file is available for types "passport", "driver_license", "identity_card", and "internal_passport". It can be decrypted and verified using the accompanying EncryptedCredentials. */
50
+ /** Encrypted file with the selfie of the user holding a document, provided by the user. This file is available if requested for types "passport", "driver_license", "identity_card", and "internal_passport". It can be decrypted and verified using the accompanying EncryptedCredentials. */
51
51
  selfie?: PassportFile;
52
- /** Array of encrypted files with translated versions of documents provided by the user. This array is available for types "passport", "driver_license", "identity_card", "internal_passport", "utility_bill", "bank_statement", "rental_agreement", "passport_registration", and "temporary_registration". The
52
+ /** Array of encrypted files with translated versions of documents provided by the user; This array is available only for types "passport", "driver_license", "identity_card", "internal_passport", "utility_bill", "bank_statement", "rental_agreement", "passport_registration", and "temporary_registration". The
53
53
 
54
54
  files can be decrypted and verified using the accompanying EncryptedCredentials. */
55
55
  translation?: PassportFile[];
@@ -1,11 +1,13 @@
1
1
  import type { ChosenInlineResult, InlineQuery } from "./inlineTypes";
2
2
  import type {
3
+ User,
3
4
  Chat,
4
5
  ChatJoinRequest,
5
6
  ChatMemberUpdated,
6
7
  ChatBoostRemoved,
7
8
  ChatBoostUpdated,
8
- User,
9
+ BusinessConnection,
10
+ BusinessMessagesDeleted,
9
11
  } from "./manageTypes";
10
12
  import type { CallbackQuery } from "./markupTypes";
11
13
  import type {
@@ -21,6 +23,11 @@ import type { PreCheckoutQuery, ShippingQuery } from "./invoiceTypes";
21
23
  * Namespace used internally to define more accurate message update types.
22
24
  */
23
25
  export declare namespace Update {
26
+ /** Internal type holding properties that message updates in private chats share. */
27
+ interface Private {
28
+ chat: Chat.PrivateChat;
29
+ }
30
+
24
31
  /**
25
32
  * Internal type holding properties that message updates in channels share.
26
33
  */
@@ -79,6 +86,18 @@ export interface Update {
79
86
  */
80
87
  edited_channel_post?: Message & Update.Edited & Update.Channel;
81
88
 
89
+ /** The bot was connected to or disconnected from a business account, or a user edited an existing connection with the bot */
90
+ business_connection?: BusinessConnection;
91
+
92
+ /** New message from a connected business account */
93
+ business_message?: Message & Update.Private;
94
+
95
+ /** New version of a message from a connected business account */
96
+ edited_business_message?: Message & Update.Edited & Update.Private;
97
+
98
+ /** Messages were deleted from a connected business account */
99
+ deleted_business_messages?: BusinessMessagesDeleted;
100
+
82
101
  /** A reaction to a message was changed by a user. The bot must be an administrator in the chat and must explicitly specify "message_reaction" in the list of allowed_updates to receive these updates. The update isn't received for reactions set by bots. */
83
102
  message_reaction?: MessageReactionUpdated;
84
103