Comparing version 3.1.9 to 3.1.10
@@ -1,2 +0,1 @@ | ||
import { Boolean, String, True } from "./alias"; | ||
import { User } from "./manage"; | ||
@@ -10,9 +9,9 @@ import { Message } from "./message"; | ||
/** Requests clients to resize the keyboard vertically for optimal fit (e.g., make the keyboard smaller if there are just two rows of buttons). Defaults to false, in which case the custom keyboard is always of the same height as the app's standard keyboard. */ | ||
resize_keyboard?: Boolean; | ||
resize_keyboard?: boolean; | ||
/** Requests clients to hide the keyboard as soon as it's been used. The keyboard will still be available, but clients will automatically display the usual letter-keyboard in the chat – the user can press a special button in the input field to see the custom keyboard again. Defaults to false. */ | ||
one_time_keyboard?: Boolean; | ||
one_time_keyboard?: boolean; | ||
/** Use this parameter if you want to show the keyboard to specific users only. Targets: 1) users that are @mentioned in the text of the Message object; 2) if the bot's message is a reply (has reply_to_message_id), sender of the original message. | ||
Example: A user requests to change the bot's language, bot replies to the request with a keyboard to select the new language. Other users in the group don't see the keyboard. */ | ||
selective?: Boolean; | ||
selective?: boolean; | ||
} | ||
@@ -23,11 +22,11 @@ | ||
/** Text of the button. If none of the optional fields are used, it will be sent as a message when the button is pressed */ | ||
text: String; | ||
text: string; | ||
} | ||
export interface RequestContactButton extends CommonButton { | ||
/** If True, the user's phone number will be sent as a contact when the button is pressed. Available in private chats only */ | ||
request_contact: Boolean; | ||
request_contact: boolean; | ||
} | ||
export interface RequestLocationButton extends CommonButton { | ||
/** If True, the user's current location will be sent when the button is pressed. Available in private chats only */ | ||
request_location: Boolean; | ||
request_location: boolean; | ||
} | ||
@@ -51,3 +50,3 @@ export interface RequestPollButton extends CommonButton { | ||
/** If quiz is passed, the user will be allowed to create only polls in the quiz mode. If regular is passed, only regular polls will be allowed. Otherwise, the user will be allowed to create a poll of any type. */ | ||
type?: String; | ||
type?: "quiz" | "regular"; | ||
} | ||
@@ -58,7 +57,7 @@ | ||
/** 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) */ | ||
remove_keyboard: True; | ||
remove_keyboard: true; | ||
/** Use this parameter if you want to remove the keyboard for specific users only. Targets: 1) users that are @mentioned in the text of the Message object; 2) if the bot's message is a reply (has reply_to_message_id), sender of the original message. | ||
Example: A user votes in a poll, bot returns confirmation message in reply to the vote and removes the keyboard for that user, while still showing the keyboard with poll options to users who haven't voted yet. */ | ||
selective?: Boolean; | ||
selective?: boolean; | ||
} | ||
@@ -69,3 +68,3 @@ | ||
/** Unique identifier for this query */ | ||
id: String; | ||
id: string; | ||
/** Sender */ | ||
@@ -76,13 +75,13 @@ from: User; | ||
/** Identifier of the message sent via the bot in inline mode, that originated the query. */ | ||
inline_message_id?: String; | ||
inline_message_id?: string; | ||
/** Global identifier, uniquely corresponding to the chat to which the message with the callback button was sent. Useful for high scores in games. */ | ||
chat_instance: String; | ||
chat_instance: string; | ||
} | ||
export interface DataCallbackQuery extends AbstractCallbackQuery { | ||
/** Data associated with the callback button. Be aware that a bad client can send arbitrary data in this field. */ | ||
data: String; | ||
data: string; | ||
} | ||
export interface GameShortGameCallbackQuery extends AbstractCallbackQuery { | ||
/** Short name of a Game to be returned, serves as the unique identifier for the game */ | ||
game_short_name: String; | ||
game_short_name: string; | ||
} | ||
@@ -109,5 +108,5 @@ } | ||
/** Shows reply interface to the user, as if they manually selected the bot's message and tapped 'Reply' */ | ||
force_reply: True; | ||
force_reply: true; | ||
/** Use this parameter if you want to force reply from specific users only. Targets: 1) users that are @mentioned in the text of the Message object; 2) if the bot's message is a reply (has reply_to_message_id), sender of the original message. */ | ||
selective?: Boolean; | ||
selective?: boolean; | ||
} |
@@ -1,2 +0,1 @@ | ||
export * from "./alias"; | ||
export * from "./api"; | ||
@@ -3,0 +2,0 @@ export * from "./callback"; |
323
inline.d.ts
@@ -1,2 +0,1 @@ | ||
import { Boolean, Float, Integer, String } from "./alias"; | ||
import { User } from "./manage"; | ||
@@ -8,3 +7,3 @@ import { Location, MessageEntity, ParseMode } from "./message"; | ||
/** Unique identifier for this query */ | ||
id: String; | ||
id: string; | ||
/** Sender */ | ||
@@ -15,5 +14,5 @@ from: User; | ||
/** Text of the query (up to 256 characters) */ | ||
query: String; | ||
query: string; | ||
/** Offset of the results to be returned, can be controlled by the bot */ | ||
offset: String; | ||
offset: string; | ||
} | ||
@@ -30,7 +29,7 @@ | ||
/** Label text on the button */ | ||
text: String; | ||
text: string; | ||
} | ||
export interface UrlButton extends AbstractInlineKeyboardButton { | ||
/** HTTP or tg:// url to be opened when button is pressed */ | ||
url: String; | ||
url: string; | ||
} | ||
@@ -43,3 +42,3 @@ export interface LoginButton extends AbstractInlineKeyboardButton { | ||
/** Data to be sent in a callback query to the bot when button is pressed, 1-64 bytes */ | ||
callback_data: String; | ||
callback_data: string; | ||
} | ||
@@ -50,3 +49,3 @@ export interface SwitchInlineButton extends AbstractInlineKeyboardButton { | ||
Note: This offers an easy way for users to start using your bot in inline mode when they are currently in a private chat with it. Especially useful when combined with switch_pm… actions – in this case the user will be automatically returned to the chat they switched from, skipping the chat selection screen. */ | ||
switch_inline_query: String; | ||
switch_inline_query: string; | ||
} | ||
@@ -58,3 +57,3 @@ export interface SwitchInlineCurrentChatButton | ||
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. */ | ||
switch_inline_query_current_chat: String; | ||
switch_inline_query_current_chat: string; | ||
} | ||
@@ -71,3 +70,3 @@ export interface GameButton extends AbstractInlineKeyboardButton { | ||
NOTE: This type of button must always be the first button in the first row. */ | ||
pay: Boolean; | ||
pay: boolean; | ||
} | ||
@@ -92,9 +91,9 @@ } | ||
NOTE: You must always check the hash of the received data to verify the authentication and the integrity of the data as described in Checking authorization. */ | ||
url: String; | ||
url: string; | ||
/** New text of the button in forwarded messages. */ | ||
forward_text?: String; | ||
forward_text?: string; | ||
/** Username of a bot, which will be used for user authorization. See Setting up a bot for more details. If not specified, the current bot's username will be assumed. The url's domain must be the same as the domain linked with the bot. See Linking your domain to the bot for more details. */ | ||
bot_username?: String; | ||
bot_username?: string; | ||
/** Pass True to request the permission for your bot to send messages to the user. */ | ||
request_write_access?: Boolean; | ||
request_write_access?: boolean; | ||
} | ||
@@ -155,5 +154,5 @@ | ||
/** Unique identifier for this result, 1-64 Bytes */ | ||
id: String; | ||
id: string; | ||
/** Title of the result */ | ||
title: String; | ||
title: string; | ||
/** Content of the message to be sent */ | ||
@@ -164,13 +163,13 @@ input_message_content: InputMessageContent; | ||
/** URL of the result */ | ||
url?: String; | ||
url?: string; | ||
/** Pass True, if you don't want the URL to be shown in the message */ | ||
hide_url?: Boolean; | ||
hide_url?: boolean; | ||
/** Short description of the result */ | ||
description?: String; | ||
description?: string; | ||
/** Url of the thumbnail for the result */ | ||
thumb_url?: String; | ||
thumb_url?: string; | ||
/** Thumbnail width */ | ||
thumb_width?: Integer; | ||
thumb_width?: number; | ||
/** Thumbnail height */ | ||
thumb_height?: Integer; | ||
thumb_height?: number; | ||
} | ||
@@ -183,17 +182,17 @@ | ||
/** Unique identifier for this result, 1-64 bytes */ | ||
id: String; | ||
id: string; | ||
/** A valid URL of the photo. Photo must be in jpeg format. Photo size must not exceed 5MB */ | ||
photo_url: String; | ||
photo_url: string; | ||
/** URL of the thumbnail for the photo */ | ||
thumb_url: String; | ||
thumb_url: string; | ||
/** Width of the photo */ | ||
photo_width?: Integer; | ||
photo_width?: number; | ||
/** Height of the photo */ | ||
photo_height?: Integer; | ||
photo_height?: number; | ||
/** Title for the result */ | ||
title?: String; | ||
title?: string; | ||
/** Short description of the result */ | ||
description?: String; | ||
description?: string; | ||
/** Caption of the photo to be sent, 0-1024 characters after entities parsing */ | ||
caption?: String; | ||
caption?: string; | ||
/** Mode for parsing entities in the photo caption. See formatting options for more details. */ | ||
@@ -214,19 +213,19 @@ parse_mode?: ParseMode; | ||
/** Unique identifier for this result, 1-64 bytes */ | ||
id: String; | ||
id: string; | ||
/** A valid URL for the GIF file. File size must not exceed 1MB */ | ||
gif_url: String; | ||
gif_url: string; | ||
/** Width of the GIF */ | ||
gif_width?: Integer; | ||
gif_width?: number; | ||
/** Height of the GIF */ | ||
gif_height?: Integer; | ||
gif_height?: number; | ||
/** Duration of the GIF */ | ||
gif_duration?: Integer; | ||
gif_duration?: number; | ||
/** URL of the static (JPEG or GIF) or animated (MPEG4) thumbnail for the result */ | ||
thumb_url: String; | ||
thumb_url: string; | ||
/** MIME type of the thumbnail, must be one of “image/jpeg”, “image/gif”, or “video/mp4”. Defaults to “image/jpeg” */ | ||
thumb_mime_type?: "image/jpeg" | "image/gif" | "video/mp4"; | ||
/** Title for the result */ | ||
title?: String; | ||
title?: string; | ||
/** Caption of the GIF file to be sent, 0-1024 characters after entities parsing */ | ||
caption?: String; | ||
caption?: string; | ||
/** Mode for parsing entities in the caption. See formatting options for more details. */ | ||
@@ -245,19 +244,19 @@ parse_mode?: ParseMode; | ||
/** Unique identifier for this result, 1-64 bytes */ | ||
id: String; | ||
id: string; | ||
/** A valid URL for the MP4 file. File size must not exceed 1MB */ | ||
mpeg4_url: String; | ||
mpeg4_url: string; | ||
/** Video width */ | ||
mpeg4_width?: Integer; | ||
mpeg4_width?: number; | ||
/** Video height */ | ||
mpeg4_height?: Integer; | ||
mpeg4_height?: number; | ||
/** Video duration */ | ||
mpeg4_duration?: Integer; | ||
mpeg4_duration?: number; | ||
/** URL of the static (JPEG or GIF) or animated (MPEG4) thumbnail for the result */ | ||
thumb_url: String; | ||
thumb_url: string; | ||
/** MIME type of the thumbnail, must be one of “image/jpeg”, “image/gif”, or “video/mp4”. Defaults to “image/jpeg” */ | ||
thumb_mime_type?: "image/jpeg" | "image/gif" | "video/mp4"; | ||
/** Title for the result */ | ||
title?: String; | ||
title?: string; | ||
/** Caption of the MPEG-4 file to be sent, 0-1024 characters after entities parsing */ | ||
caption?: String; | ||
caption?: string; | ||
/** Mode for parsing entities in the caption. See formatting options for more details. */ | ||
@@ -278,13 +277,13 @@ parse_mode?: ParseMode; | ||
/** Unique identifier for this result, 1-64 bytes */ | ||
id: String; | ||
id: string; | ||
/** A valid URL for the embedded video player or video file */ | ||
video_url: String; | ||
video_url: string; | ||
/** Mime type of the content of video url, “text/html” or “video/mp4” */ | ||
mime_type: "text/html" | "video/mp4"; | ||
/** URL of the thumbnail (jpeg only) for the video */ | ||
thumb_url: String; | ||
thumb_url: string; | ||
/** Title for the result */ | ||
title: String; | ||
title: string; | ||
/** Caption of the video to be sent, 0-1024 characters after entities parsing */ | ||
caption?: String; | ||
caption?: string; | ||
/** Mode for parsing entities in the video caption. See formatting options for more details. */ | ||
@@ -295,9 +294,9 @@ parse_mode?: ParseMode; | ||
/** Video width */ | ||
video_width?: Integer; | ||
video_width?: number; | ||
/** Video height */ | ||
video_height?: Integer; | ||
video_height?: number; | ||
/** Video duration in seconds */ | ||
video_duration?: Integer; | ||
video_duration?: number; | ||
/** Short description of the result */ | ||
description?: String; | ||
description?: string; | ||
/** Inline keyboard attached to the message */ | ||
@@ -316,9 +315,9 @@ reply_markup?: InlineKeyboardMarkup; | ||
/** Unique identifier for this result, 1-64 bytes */ | ||
id: String; | ||
id: string; | ||
/** A valid URL for the audio file */ | ||
audio_url: String; | ||
audio_url: string; | ||
/** Title */ | ||
title: String; | ||
title: string; | ||
/** Caption, 0-1024 characters after entities parsing */ | ||
caption?: String; | ||
caption?: string; | ||
/** Mode for parsing entities in the audio caption. See formatting options for more details. */ | ||
@@ -329,5 +328,5 @@ parse_mode?: ParseMode; | ||
/** Performer */ | ||
performer?: String; | ||
performer?: string; | ||
/** Audio duration in seconds */ | ||
audio_duration?: Integer; | ||
audio_duration?: number; | ||
/** Inline keyboard attached to the message */ | ||
@@ -346,13 +345,13 @@ reply_markup?: InlineKeyboardMarkup; | ||
/** Unique identifier for this result, 1-64 bytes */ | ||
id: String; | ||
id: string; | ||
/** A valid URL for the voice recording */ | ||
voice_url: String; | ||
voice_url: string; | ||
/** Recording title */ | ||
title: String; | ||
title: string; | ||
/** Caption, 0-1024 characters after entities parsing */ | ||
caption?: String; | ||
caption?: string; | ||
/** Mode for parsing entities in the voice message caption. See formatting options for more details. */ | ||
parse_mode?: ParseMode; | ||
/** Recording duration in seconds */ | ||
voice_duration?: Integer; | ||
voice_duration?: number; | ||
/** Inline keyboard attached to the message */ | ||
@@ -371,7 +370,7 @@ reply_markup?: InlineKeyboardMarkup; | ||
/** Unique identifier for this result, 1-64 bytes */ | ||
id: String; | ||
id: string; | ||
/** Title for the result */ | ||
title: String; | ||
title: string; | ||
/** Caption of the document to be sent, 0-1024 characters after entities parsing */ | ||
caption?: String; | ||
caption?: string; | ||
/** Mode for parsing entities in the document caption. See formatting options for more details. */ | ||
@@ -382,7 +381,7 @@ parse_mode?: ParseMode; | ||
/** A valid URL for the file */ | ||
document_url: String; | ||
document_url: string; | ||
/** Mime type of the content of the file, either “application/pdf” or “application/zip” */ | ||
mime_type: "application/pdf" | "application/zip"; | ||
/** Short description of the result */ | ||
description?: String; | ||
description?: string; | ||
/** Inline keyboard attached to the message */ | ||
@@ -393,7 +392,7 @@ reply_markup?: InlineKeyboardMarkup; | ||
/** URL of the thumbnail (jpeg only) for the file */ | ||
thumb_url?: String; | ||
thumb_url?: string; | ||
/** Thumbnail width */ | ||
thumb_width?: Integer; | ||
thumb_width?: number; | ||
/** Thumbnail height */ | ||
thumb_height?: Integer; | ||
thumb_height?: number; | ||
} | ||
@@ -408,17 +407,17 @@ | ||
/** Unique identifier for this result, 1-64 Bytes */ | ||
id: String; | ||
id: string; | ||
/** Location latitude in degrees */ | ||
latitude: Float; | ||
latitude: number; | ||
/** Location longitude in degrees */ | ||
longitude: Float; | ||
longitude: number; | ||
/** Location title */ | ||
title: String; | ||
title: string; | ||
/** The radius of uncertainty for the location, measured in meters; 0-1500 */ | ||
horizontal_accuracy?: Float; | ||
horizontal_accuracy?: number; | ||
/** Period in seconds for which the location can be updated, should be between 60 and 86400. */ | ||
live_period?: Integer; | ||
live_period?: number; | ||
/** The direction in which user is moving, in degrees; 1-360. For active live locations only. */ | ||
heading?: Integer; | ||
heading?: number; | ||
/** Maximum distance for proximity alerts about approaching another chat member, in meters. For sent live locations only. */ | ||
proximity_alert_radius?: Integer; | ||
proximity_alert_radius?: number; | ||
/** Inline keyboard attached to the message */ | ||
@@ -429,7 +428,7 @@ reply_markup?: InlineKeyboardMarkup; | ||
/** Url of the thumbnail for the result */ | ||
thumb_url?: String; | ||
thumb_url?: string; | ||
/** Thumbnail width */ | ||
thumb_width?: Integer; | ||
thumb_width?: number; | ||
/** Thumbnail height */ | ||
thumb_height?: Integer; | ||
thumb_height?: number; | ||
} | ||
@@ -444,19 +443,19 @@ | ||
/** Unique identifier for this result, 1-64 Bytes */ | ||
id: String; | ||
id: string; | ||
/** Latitude of the venue location in degrees */ | ||
latitude: Float; | ||
latitude: number; | ||
/** Longitude of the venue location in degrees */ | ||
longitude: Float; | ||
longitude: number; | ||
/** Title of the venue */ | ||
title: String; | ||
title: string; | ||
/** Address of the venue */ | ||
address: String; | ||
address: string; | ||
/** Foursquare identifier of the venue if known */ | ||
foursquare_id?: String; | ||
foursquare_id?: string; | ||
/** Foursquare type of the venue, if known. (For example, “arts_entertainment/default”, “arts_entertainment/aquarium” or “food/icecream”.) */ | ||
foursquare_type?: String; | ||
foursquare_type?: string; | ||
/** Google Places identifier of the venue */ | ||
google_place_id?: String; | ||
google_place_id?: string; | ||
/** Google Places type of the venue. (See supported types.) */ | ||
google_place_type?: String; | ||
google_place_type?: string; | ||
/** Inline keyboard attached to the message */ | ||
@@ -467,7 +466,7 @@ reply_markup?: InlineKeyboardMarkup; | ||
/** Url of the thumbnail for the result */ | ||
thumb_url?: String; | ||
thumb_url?: string; | ||
/** Thumbnail width */ | ||
thumb_width?: Integer; | ||
thumb_width?: number; | ||
/** Thumbnail height */ | ||
thumb_height?: Integer; | ||
thumb_height?: number; | ||
} | ||
@@ -482,11 +481,11 @@ | ||
/** Unique identifier for this result, 1-64 Bytes */ | ||
id: String; | ||
id: string; | ||
/** Contact's phone number */ | ||
phone_number: String; | ||
phone_number: string; | ||
/** Contact's first name */ | ||
first_name: String; | ||
first_name: string; | ||
/** Contact's last name */ | ||
last_name?: String; | ||
last_name?: string; | ||
/** Additional data about the contact in the form of a vCard, 0-2048 bytes */ | ||
vcard?: String; | ||
vcard?: string; | ||
/** Inline keyboard attached to the message */ | ||
@@ -497,7 +496,7 @@ reply_markup?: InlineKeyboardMarkup; | ||
/** Url of the thumbnail for the result */ | ||
thumb_url?: String; | ||
thumb_url?: string; | ||
/** Thumbnail width */ | ||
thumb_width?: Integer; | ||
thumb_width?: number; | ||
/** Thumbnail height */ | ||
thumb_height?: Integer; | ||
thumb_height?: number; | ||
} | ||
@@ -512,5 +511,5 @@ | ||
/** Unique identifier for this result, 1-64 bytes */ | ||
id: String; | ||
id: string; | ||
/** Short name of the game */ | ||
game_short_name: String; | ||
game_short_name: string; | ||
/** Inline keyboard attached to the message */ | ||
@@ -525,11 +524,11 @@ reply_markup?: InlineKeyboardMarkup; | ||
/** Unique identifier for this result, 1-64 bytes */ | ||
id: String; | ||
id: string; | ||
/** A valid file identifier of the photo */ | ||
photo_file_id: String; | ||
photo_file_id: string; | ||
/** Title for the result */ | ||
title?: String; | ||
title?: string; | ||
/** Short description of the result */ | ||
description?: String; | ||
description?: string; | ||
/** Caption of the photo to be sent, 0-1024 characters after entities parsing */ | ||
caption?: String; | ||
caption?: string; | ||
/** Mode for parsing entities in the photo caption. See formatting options for more details. */ | ||
@@ -550,9 +549,9 @@ parse_mode?: ParseMode; | ||
/** Unique identifier for this result, 1-64 bytes */ | ||
id: String; | ||
id: string; | ||
/** A valid file identifier for the GIF file */ | ||
gif_file_id: String; | ||
gif_file_id: string; | ||
/** Title for the result */ | ||
title?: String; | ||
title?: string; | ||
/** Caption of the GIF file to be sent, 0-1024 characters after entities parsing */ | ||
caption?: String; | ||
caption?: string; | ||
/** Mode for parsing entities in the caption. See formatting options for more details. */ | ||
@@ -571,9 +570,9 @@ parse_mode?: ParseMode; | ||
/** Unique identifier for this result, 1-64 bytes */ | ||
id: String; | ||
id: string; | ||
/** A valid file identifier for the MP4 file */ | ||
mpeg4_file_id: String; | ||
mpeg4_file_id: string; | ||
/** Title for the result */ | ||
title?: String; | ||
title?: string; | ||
/** Caption of the MPEG-4 file to be sent, 0-1024 characters after entities parsing */ | ||
caption?: String; | ||
caption?: string; | ||
/** Mode for parsing entities in the caption. See formatting options for more details. */ | ||
@@ -595,5 +594,5 @@ parse_mode?: ParseMode; | ||
/** Unique identifier for this result, 1-64 bytes */ | ||
id: String; | ||
id: string; | ||
/** A valid file identifier of the sticker */ | ||
sticker_file_id: String; | ||
sticker_file_id: string; | ||
/** Inline keyboard attached to the message */ | ||
@@ -612,11 +611,11 @@ reply_markup?: InlineKeyboardMarkup; | ||
/** Unique identifier for this result, 1-64 bytes */ | ||
id: String; | ||
id: string; | ||
/** Title for the result */ | ||
title: String; | ||
title: string; | ||
/** A valid file identifier for the file */ | ||
document_file_id: String; | ||
document_file_id: string; | ||
/** Short description of the result */ | ||
description?: String; | ||
description?: string; | ||
/** Caption of the document to be sent, 0-1024 characters after entities parsing */ | ||
caption?: String; | ||
caption?: string; | ||
/** Mode for parsing entities in the document caption. See formatting options for more details. */ | ||
@@ -637,11 +636,11 @@ parse_mode?: ParseMode; | ||
/** Unique identifier for this result, 1-64 bytes */ | ||
id: String; | ||
id: string; | ||
/** A valid file identifier for the video file */ | ||
video_file_id: String; | ||
video_file_id: string; | ||
/** Title for the result */ | ||
title: String; | ||
title: string; | ||
/** Short description of the result */ | ||
description?: String; | ||
description?: string; | ||
/** Caption of the video to be sent, 0-1024 characters after entities parsing */ | ||
caption?: String; | ||
caption?: string; | ||
/** Mode for parsing entities in the video caption. See formatting options for more details. */ | ||
@@ -664,9 +663,9 @@ parse_mode?: ParseMode; | ||
/** Unique identifier for this result, 1-64 bytes */ | ||
id: String; | ||
id: string; | ||
/** A valid file identifier for the voice message */ | ||
voice_file_id: String; | ||
voice_file_id: string; | ||
/** Voice message title */ | ||
title: String; | ||
title: string; | ||
/** Caption, 0-1024 characters after entities parsing */ | ||
caption?: String; | ||
caption?: string; | ||
/** Mode for parsing entities in the voice message caption. See formatting options for more details. */ | ||
@@ -687,7 +686,7 @@ parse_mode?: ParseMode; | ||
/** Unique identifier for this result, 1-64 bytes */ | ||
id: String; | ||
id: string; | ||
/** A valid file identifier for the audio file */ | ||
audio_file_id: String; | ||
audio_file_id: string; | ||
/** Caption, 0-1024 characters after entities parsing */ | ||
caption?: String; | ||
caption?: string; | ||
/** Mode for parsing entities in the audio caption. See formatting options for more details. */ | ||
@@ -718,3 +717,3 @@ parse_mode?: ParseMode; | ||
/** Text of the message to be sent, 1-4096 characters */ | ||
message_text: String; | ||
message_text: string; | ||
/** Mode for parsing entities in the message text. See formatting options for more details. */ | ||
@@ -725,3 +724,3 @@ parse_mode?: ParseMode; | ||
/** Disables link previews for links in the sent message */ | ||
disable_web_page_preview?: Boolean; | ||
disable_web_page_preview?: boolean; | ||
} | ||
@@ -732,13 +731,13 @@ | ||
/** Latitude of the location in degrees */ | ||
latitude: Float; | ||
latitude: number; | ||
/** Longitude of the location in degrees */ | ||
longitude: Float; | ||
longitude: number; | ||
/** The radius of uncertainty for the location, measured in meters; 0-1500 */ | ||
horizontal_accuracy?: Float; | ||
horizontal_accuracy?: number; | ||
/** Period in seconds for which the location can be updated, should be between 60 and 86400. */ | ||
live_period?: Integer; | ||
live_period?: number; | ||
/** For live locations, a direction in which the user is moving, in degrees. Must be between 1 and 360 if specified. */ | ||
heading?: Integer; | ||
heading?: number; | ||
/** For live locations, a maximum distance for proximity alerts about approaching another chat member, in meters. Must be between 1 and 100000 if specified. */ | ||
proximity_alert_radius?: Integer; | ||
proximity_alert_radius?: number; | ||
} | ||
@@ -749,17 +748,17 @@ | ||
/** Latitude of the venue in degrees */ | ||
latitude: Float; | ||
latitude: number; | ||
/** Longitude of the venue in degrees */ | ||
longitude: Float; | ||
longitude: number; | ||
/** Name of the venue */ | ||
title: String; | ||
title: string; | ||
/** Address of the venue */ | ||
address: String; | ||
address: string; | ||
/** Foursquare identifier of the venue, if known */ | ||
foursquare_id?: String; | ||
foursquare_id?: string; | ||
/** Foursquare type of the venue, if known. (For example, “arts_entertainment/default”, “arts_entertainment/aquarium” or “food/icecream”.) */ | ||
foursquare_type?: String; | ||
foursquare_type?: string; | ||
/** Google Places identifier of the venue */ | ||
google_place_id?: String; | ||
google_place_id?: string; | ||
/** Google Places type of the venue. (See supported types.) */ | ||
google_place_type?: String; | ||
google_place_type?: string; | ||
} | ||
@@ -770,9 +769,9 @@ | ||
/** Contact's phone number */ | ||
phone_number: String; | ||
phone_number: string; | ||
/** Contact's first name */ | ||
first_name: String; | ||
first_name: string; | ||
/** Contact's last name */ | ||
last_name?: String; | ||
last_name?: string; | ||
/** Additional data about the contact in the form of a vCard, 0-2048 bytes */ | ||
vcard?: String; | ||
vcard?: string; | ||
} | ||
@@ -783,3 +782,3 @@ | ||
/** The unique identifier for the result that was chosen */ | ||
result_id: String; | ||
result_id: string; | ||
/** The user that chose the result */ | ||
@@ -790,5 +789,5 @@ from: User; | ||
/** Identifier of the sent inline message. Available only if there is an inline keyboard attached to the message. Will be also received in callback queries and can be used to edit the message. */ | ||
inline_message_id?: String; | ||
inline_message_id?: string; | ||
/** The query that was used to obtain the result */ | ||
query: String; | ||
query: string; | ||
} |
145
manage.d.ts
@@ -1,2 +0,1 @@ | ||
import { Boolean, Integer, String, True } from "./alias"; | ||
import { Location, Message, PhotoSize } from "./message"; | ||
@@ -7,17 +6,17 @@ | ||
/** Webhook URL, may be empty if webhook is not set up */ | ||
url?: String; | ||
url?: string; | ||
/** True, if a custom certificate was provided for webhook certificate checks */ | ||
has_custom_certificate: Boolean; | ||
has_custom_certificate: boolean; | ||
/** Number of updates awaiting delivery */ | ||
pending_update_count: Integer; | ||
pending_update_count: number; | ||
/** Currently used webhook IP address */ | ||
ip_address?: String; | ||
ip_address?: string; | ||
/** Unix time for the most recent error that happened when trying to deliver an update via webhook */ | ||
last_error_date: Integer; | ||
last_error_date: number; | ||
/** Error message in human-readable format for the most recent error that happened when trying to deliver an update via webhook */ | ||
last_error_message: String; | ||
last_error_message: string; | ||
/** Maximum allowed number of simultaneous HTTPS connections to the webhook for update delivery */ | ||
max_connections: Integer; | ||
max_connections: number; | ||
/** A list of update types the bot is subscribed to. Defaults to all update types */ | ||
allowed_updates: String[]; | ||
allowed_updates: string[]; | ||
} | ||
@@ -28,13 +27,13 @@ | ||
/** Unique identifier for this user or bot */ | ||
id: Integer; | ||
id: number; | ||
/** True, if this user is a bot */ | ||
is_bot: Boolean; | ||
is_bot: boolean; | ||
/** User's or bot's first name */ | ||
first_name: String; | ||
first_name: string; | ||
/** User's or bot's last name */ | ||
last_name?: String; | ||
last_name?: string; | ||
/** User's or bot's username */ | ||
username?: String; | ||
username?: string; | ||
/** IETF language tag of the user's language */ | ||
language_code?: String; | ||
language_code?: string; | ||
} | ||
@@ -44,10 +43,10 @@ | ||
export interface UserFromGetMe extends User { | ||
is_bot: True; | ||
username: String; | ||
is_bot: true; | ||
username: string; | ||
/** True, if the bot can be invited to groups. Returned only in getMe. */ | ||
can_join_groups: Boolean; | ||
can_join_groups: boolean; | ||
/** True, if privacy mode is disabled for the bot. Returned only in getMe. */ | ||
can_read_all_group_messages: Boolean; | ||
can_read_all_group_messages: boolean; | ||
/** True, if the bot supports inline queries. Returned only in getMe. */ | ||
supports_inline_queries: Boolean; | ||
supports_inline_queries: boolean; | ||
} | ||
@@ -60,5 +59,5 @@ | ||
/** Type of chat, can be either “private”, “group”, “supergroup” or “channel” */ | ||
type: String; | ||
type: string; | ||
/** Unique identifier for this chat. This number may be greater than 32 bits and some programming languages may have difficulty/silent defects in interpreting it. But it is smaller than 52 bits, so a signed 64 bit integer or double-precision float type are safe for storing this identifier. */ | ||
id: Integer; | ||
id: number; | ||
} | ||
@@ -70,3 +69,3 @@ | ||
/** Username, for private chats, supergroups and channels if available */ | ||
username?: String; | ||
username?: string; | ||
} | ||
@@ -76,3 +75,3 @@ /** Internal type holding properties that those chats with titles share. */ | ||
/** Title, for supergroups, channels and group chats */ | ||
title: String; | ||
title: string; | ||
} | ||
@@ -85,5 +84,5 @@ | ||
/** First name of the other party in a private chat */ | ||
first_name: String; | ||
first_name: string; | ||
/** Last name of the other party in a private chat */ | ||
last_name?: String; | ||
last_name?: string; | ||
} | ||
@@ -117,5 +116,5 @@ /** Internal type representing group chats. */ | ||
/** Description, for groups, supergroups and channel chats. Returned only in getChat. */ | ||
description?: String; | ||
description?: string; | ||
/** Chat invite link, for groups, supergroups and channel chats. Each administrator in a chat generates their own invite links, so the bot must first generate the link using exportChatInviteLink. Returned only in getChat. */ | ||
invite_link?: String; | ||
invite_link?: string; | ||
} | ||
@@ -127,3 +126,3 @@ /** Internal type holding properties that those group and supergroup chats returned from `getChat` share. */ | ||
/** True, if the bot can change the group sticker set. Returned only in getChat. */ | ||
can_set_sticker_set?: Boolean; | ||
can_set_sticker_set?: boolean; | ||
} | ||
@@ -133,3 +132,3 @@ /** Internal type holding properties that those supergroup and channel chats returned from `getChat` share. */ | ||
/** Unique identifier for the linked chat, i.e. the discussion group identifier for a channel and vice versa; for supergroups and channel chats. This identifier may be greater than 32 bits and some programming languages may have difficulty/silent defects in interpreting it. But it is smaller than 52 bits, so a signed 64 bit integer or double-precision float type are safe for storing this identifier. Returned only in getChat. */ | ||
linked_chat_id?: Integer; | ||
linked_chat_id?: number; | ||
} | ||
@@ -141,3 +140,3 @@ | ||
/** Bio of the other party in a private chat. Returned only in getChat. */ | ||
bio?: String; | ||
bio?: string; | ||
} | ||
@@ -152,5 +151,5 @@ /** Internal type representing group chats returned from `getChat`. */ | ||
/** For supergroups, the minimum allowed delay between consecutive messages sent by each unprivileged user. Returned only in getChat. */ | ||
slow_mode_delay?: Integer; | ||
slow_mode_delay?: number; | ||
/** For supergroups, name of group sticker set. Returned only in getChat. */ | ||
sticker_set_name?: String; | ||
sticker_set_name?: string; | ||
/** For supergroups, the location to which the supergroup is connected. Returned only in getChat. */ | ||
@@ -180,3 +179,3 @@ location?: ChatLocation; | ||
/** Total number of profile pictures the target user has */ | ||
total_count: Integer; | ||
total_count: number; | ||
/** Requested profile pictures (in up to 4 sizes each) */ | ||
@@ -189,9 +188,9 @@ photos: PhotoSize[][]; | ||
/** File identifier of small (160x160) chat photo. This file_id can be used only for photo download and only for as long as the photo is not changed. */ | ||
small_file_id: String; | ||
small_file_id: string; | ||
/** Unique file identifier of small (160x160) chat photo, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file. */ | ||
small_file_unique_id: String; | ||
small_file_unique_id: string; | ||
/** File identifier of big (640x640) chat photo. This file_id can be used only for photo download and only for as long as the photo is not changed. */ | ||
big_file_id: String; | ||
big_file_id: string; | ||
/** Unique file identifier of big (640x640) chat photo, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file. */ | ||
big_file_unique_id: String; | ||
big_file_unique_id: string; | ||
} | ||
@@ -212,37 +211,37 @@ | ||
/** Owner and administrators only. Custom title for this user */ | ||
custom_title?: String; | ||
custom_title?: string; | ||
/** Owner and administrators only. True, if the user's presence in the chat is hidden */ | ||
is_anonymous?: Boolean; | ||
is_anonymous?: boolean; | ||
/** Administrators only. True, if the bot is allowed to edit administrator privileges of that user */ | ||
can_be_edited?: Boolean; | ||
can_be_edited?: boolean; | ||
/** Administrators only. True, if the administrator can post in the channel; channels only */ | ||
can_post_messages?: Boolean; | ||
can_post_messages?: boolean; | ||
/** Administrators only. True, if the administrator can edit messages of other users and can pin messages; channels only */ | ||
can_edit_messages?: Boolean; | ||
can_edit_messages?: boolean; | ||
/** Administrators only. True, if the administrator can delete messages of other users */ | ||
can_delete_messages?: Boolean; | ||
can_delete_messages?: boolean; | ||
/** Administrators only. True, if the administrator can restrict, ban or unban chat members */ | ||
can_restrict_members?: Boolean; | ||
can_restrict_members?: boolean; | ||
/** Administrators only. True, if the administrator can add new administrators with a subset of their own privileges or demote administrators that he has promoted, directly or indirectly (promoted by administrators that were appointed by the user) */ | ||
can_promote_members?: Boolean; | ||
can_promote_members?: boolean; | ||
/** Administrators and restricted only. True, if the user is allowed to change the chat title, photo and other settings */ | ||
can_change_info?: Boolean; | ||
can_change_info?: boolean; | ||
/** Administrators and restricted only. True, if the user is allowed to invite new users to the chat */ | ||
can_invite_users?: Boolean; | ||
can_invite_users?: boolean; | ||
/** Administrators and restricted only. True, if the user is allowed to pin messages; groups and supergroups only */ | ||
can_pin_messages?: Boolean; | ||
can_pin_messages?: boolean; | ||
/** Restricted only. True, if the user is a member of the chat at the moment of the request */ | ||
is_member?: Boolean; | ||
is_member?: boolean; | ||
/** Restricted only. True, if the user is allowed to send text messages, contacts, locations and venues */ | ||
can_send_messages?: Boolean; | ||
can_send_messages?: boolean; | ||
/** Restricted only. True, if the user is allowed to send audios, documents, photos, videos, video notes and voice notes */ | ||
can_send_media_messages?: Boolean; | ||
can_send_media_messages?: boolean; | ||
/** Restricted only. True, if the user is allowed to send polls */ | ||
can_send_polls?: Boolean; | ||
can_send_polls?: boolean; | ||
/** Restricted only. True, if the user is allowed to send animations, games, stickers and use inline bots */ | ||
can_send_other_messages?: Boolean; | ||
can_send_other_messages?: boolean; | ||
/** Restricted only. True, if the user is allowed to add web page previews to their messages */ | ||
can_add_web_page_previews?: Boolean; | ||
can_add_web_page_previews?: boolean; | ||
/** Restricted and kicked only. Date when restrictions will be lifted for this user; unix time */ | ||
until_date?: Integer; | ||
until_date?: number; | ||
} | ||
@@ -253,17 +252,17 @@ | ||
/** True, if the user is allowed to send text messages, contacts, locations and venues */ | ||
can_send_messages?: Boolean; | ||
can_send_messages?: boolean; | ||
/** True, if the user is allowed to send audios, documents, photos, videos, video notes and voice notes, implies can_send_messages */ | ||
can_send_media_messages?: Boolean; | ||
can_send_media_messages?: boolean; | ||
/** True, if the user is allowed to send polls, implies can_send_messages */ | ||
can_send_polls?: Boolean; | ||
can_send_polls?: boolean; | ||
/** True, if the user is allowed to send animations, games, stickers and use inline bots, implies can_send_media_messages */ | ||
can_send_other_messages?: Boolean; | ||
can_send_other_messages?: boolean; | ||
/** True, if the user is allowed to add web page previews to their messages, implies can_send_media_messages */ | ||
can_add_web_page_previews?: Boolean; | ||
can_add_web_page_previews?: boolean; | ||
/** True, if the user is allowed to change the chat title, photo and other settings. Ignored in public supergroups */ | ||
can_change_info?: Boolean; | ||
can_change_info?: boolean; | ||
/** True, if the user is allowed to invite new users to the chat */ | ||
can_invite_users?: Boolean; | ||
can_invite_users?: boolean; | ||
/** True, if the user is allowed to pin messages. Ignored in public supergroups */ | ||
can_pin_messages?: Boolean; | ||
can_pin_messages?: boolean; | ||
} | ||
@@ -276,3 +275,3 @@ | ||
/** Location address; 1-64 characters, as defined by the chat owner */ | ||
address: String; | ||
address: string; | ||
} | ||
@@ -283,5 +282,5 @@ | ||
/** Text of the command, 1-32 characters. Can contain only lowercase English letters, digits and underscores. */ | ||
command: String; | ||
command: string; | ||
/** Description of the command, 3-256 characters. */ | ||
description: String; | ||
description: string; | ||
} | ||
@@ -292,5 +291,5 @@ | ||
/** The group has been migrated to a supergroup with the specified identifier. This number may be greater than 32 bits and some programming languages may have difficulty/silent defects in interpreting it. But it is smaller than 52 bits, so a signed 64 bit integer or double-precision float type are safe for storing this identifier. */ | ||
migrate_to_chat_id?: Integer; | ||
migrate_to_chat_id?: number; | ||
/** In case of exceeding flood control, the number of seconds left to wait before the request can be repeated */ | ||
retry_after?: Integer; | ||
retry_after?: number; | ||
} | ||
@@ -301,9 +300,9 @@ | ||
/** Identifier for this file, which can be used to download or reuse the file */ | ||
file_id: String; | ||
file_id: string; | ||
/** Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file. */ | ||
file_unique_id: String; | ||
file_unique_id: string; | ||
/** File size, if known */ | ||
file_size?: Integer; | ||
file_size?: number; | ||
/** File path. Use https://api.telegram.org/file/bot<token>/<file_path> to get the file. */ | ||
file_path?: String; | ||
file_path?: string; | ||
} |
247
message.d.ts
@@ -1,2 +0,1 @@ | ||
import { Boolean, Float, Integer, String, True } from "./alias"; | ||
import { InlineKeyboardMarkup } from "./inline"; | ||
@@ -10,3 +9,3 @@ import { Chat, User } from "./manage"; | ||
/** Unique message identifier inside this chat */ | ||
message_id: Integer; | ||
message_id: number; | ||
/** Sender, empty for messages sent to channels */ | ||
@@ -17,3 +16,3 @@ from?: User; | ||
/** Date the message was sent in Unix time */ | ||
date: Integer; | ||
date: number; | ||
/** Conversation the message belongs to */ | ||
@@ -28,9 +27,9 @@ chat: Chat; | ||
/** For messages forwarded from channels, identifier of the original message in the channel */ | ||
forward_from_message_id?: Integer; | ||
forward_from_message_id?: number; | ||
/** For messages forwarded from channels, signature of the post author if present */ | ||
forward_signature?: String; | ||
forward_signature?: string; | ||
/** Sender's name for messages forwarded from users who disallow adding a link to their account in forwarded messages */ | ||
forward_sender_name?: String; | ||
forward_sender_name?: string; | ||
/** For forwarded messages, date the original message was sent in Unix time */ | ||
forward_date?: Integer; | ||
forward_date?: number; | ||
/** For replies, the original message. Note that the Message object in this field will not contain further reply_to_message fields even if it itself is a reply. */ | ||
@@ -41,5 +40,5 @@ reply_to_message?: ReplyMessage; | ||
/** Date the message was last edited in Unix time */ | ||
edit_date?: Integer; | ||
edit_date?: number; | ||
/** Signature of the post author for messages in channels, or the custom title of an anonymous group administrator */ | ||
author_signature?: String; | ||
author_signature?: string; | ||
/** Inline keyboard attached to the message. login_url buttons are represented as ordinary url buttons. */ | ||
@@ -50,3 +49,3 @@ reply_markup?: InlineKeyboardMarkup; | ||
/** For text messages, the actual UTF-8 text of the message, 0-4096 characters */ | ||
text: String; | ||
text: string; | ||
/** For text messages, special entities like usernames, URLs, bot commands, etc. that appear in the text */ | ||
@@ -57,3 +56,3 @@ entities?: MessageEntity[]; | ||
/** Caption for the animation, audio, document, photo, video or voice, 0-1024 characters */ | ||
caption?: String; | ||
caption?: string; | ||
/** For messages with a caption, special entities like usernames, URLs, bot commands, etc. that appear in the caption */ | ||
@@ -64,3 +63,3 @@ caption_entities?: MessageEntity[]; | ||
/** The unique identifier of a media message group this message belongs to */ | ||
media_group_id?: String; | ||
media_group_id?: string; | ||
} | ||
@@ -133,3 +132,3 @@ export interface AudioMessage extends CaptionableMessage { | ||
/** A chat title was changed to this value */ | ||
new_chat_title: String; | ||
new_chat_title: string; | ||
} | ||
@@ -142,23 +141,23 @@ export interface NewChatPhotoMessage extends ServiceMessage { | ||
/** Service message: the chat photo was deleted */ | ||
delete_chat_photo: True; | ||
delete_chat_photo: true; | ||
} | ||
export interface GroupChatCreatedMessage extends ServiceMessage { | ||
/** Service message: the group has been created */ | ||
group_chat_created: True; | ||
group_chat_created: true; | ||
} | ||
export interface SupergroupChatCreated extends ServiceMessage { | ||
/** Service message: the supergroup has been created. This field can't be received in a message coming through updates, because bot can't be a member of a supergroup when it is created. It can only be found in reply_to_message if someone replies to a very first message in a directly created supergroup. */ | ||
supergroup_chat_created: True; | ||
supergroup_chat_created: true; | ||
} | ||
export interface ChannelChatCreatedMessage extends ServiceMessage { | ||
/** Service message: the channel has been created. This field can't be received in a message coming through updates, because bot can't be a member of a channel when it is created. It can only be found in reply_to_message if someone replies to a very first message in a channel. */ | ||
channel_chat_created: True; | ||
channel_chat_created: true; | ||
} | ||
export interface MigrateToChatIdMessage extends ServiceMessage { | ||
/** The group has been migrated to a supergroup with the specified identifier. This number may be greater than 32 bits and some programming languages may have difficulty/silent defects in interpreting it. But it is smaller than 52 bits, so a signed 64 bit integer or double-precision float type are safe for storing this identifier. */ | ||
migrate_to_chat_id: Integer; | ||
migrate_to_chat_id: number; | ||
} | ||
export interface MigrateFromChatIdMessage extends ServiceMessage { | ||
/** The supergroup has been migrated from a group with the specified identifier. This number may be greater than 32 bits and some programming languages may have difficulty/silent defects in interpreting it. But it is smaller than 52 bits, so a signed 64 bit integer or double-precision float type are safe for storing this identifier. */ | ||
migrate_from_chat_id: Integer; | ||
migrate_from_chat_id: number; | ||
} | ||
@@ -179,3 +178,3 @@ export interface PinnedMessageMessage extends ServiceMessage { | ||
/** The domain name of the website on which the user has logged in. More about Telegram Login » */ | ||
connected_website: String; | ||
connected_website: string; | ||
} | ||
@@ -240,3 +239,3 @@ export interface PassportDataMessage extends ServiceMessage { | ||
/** Unique message identifier */ | ||
message_id: Integer; | ||
message_id: number; | ||
} | ||
@@ -336,7 +335,7 @@ | ||
/** Type of the entity. Can be “mention” (@username), “hashtag” (#hashtag), “cashtag” ($USD), “bot_command” (/start@jobs_bot), “url” (https://telegram.org), “email” (do-not-reply@telegram.org), “phone_number” (+1-212-555-0123), “bold” (bold text), “italic” (italic text), “underline” (underlined text), “strikethrough” (strikethrough text), “code” (monowidth string), “pre” (monowidth block), “text_link” (for clickable text URLs), “text_mention” (for users without usernames) */ | ||
type: String; | ||
type: string; | ||
/** Offset in UTF-16 code units to the start of the entity */ | ||
offset: Integer; | ||
offset: number; | ||
/** Length of the entity in UTF-16 code units */ | ||
length: Integer; | ||
length: number; | ||
} | ||
@@ -361,3 +360,3 @@ export interface CommonMessageEntity extends AbstractMessageEntity { | ||
/** For “text_link” only, url that will be opened after user taps on the text */ | ||
url: String; | ||
url: string; | ||
} | ||
@@ -372,3 +371,3 @@ export interface TextMentionMessageEntity extends AbstractMessageEntity { | ||
/** For “pre” only, the programming language of the entity text */ | ||
language?: String; | ||
language?: string; | ||
} | ||
@@ -387,11 +386,11 @@ } | ||
/** Identifier for this file, which can be used to download or reuse the file */ | ||
file_id: String; | ||
file_id: string; | ||
/** Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file. */ | ||
file_unique_id: String; | ||
file_unique_id: string; | ||
/** Photo width */ | ||
width: Integer; | ||
width: number; | ||
/** Photo height */ | ||
height: Integer; | ||
height: number; | ||
/** File size */ | ||
file_size?: Integer; | ||
file_size?: number; | ||
} | ||
@@ -402,19 +401,19 @@ | ||
/** Identifier for this file, which can be used to download or reuse the file */ | ||
file_id: String; | ||
file_id: string; | ||
/** Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file. */ | ||
file_unique_id: String; | ||
file_unique_id: string; | ||
/** Video width as defined by sender */ | ||
width: Integer; | ||
width: number; | ||
/** Video height as defined by sender */ | ||
height: Integer; | ||
height: number; | ||
/** Duration of the video in seconds as defined by sender */ | ||
duration: Integer; | ||
duration: number; | ||
/** Animation thumbnail as defined by sender */ | ||
thumb?: PhotoSize; | ||
/** Original animation filename as defined by sender */ | ||
file_name?: String; | ||
file_name?: string; | ||
/** MIME type of the file as defined by sender */ | ||
mime_type?: String; | ||
mime_type?: string; | ||
/** File size */ | ||
file_size?: Integer; | ||
file_size?: number; | ||
} | ||
@@ -425,17 +424,17 @@ | ||
/** Identifier for this file, which can be used to download or reuse the file */ | ||
file_id: String; | ||
file_id: string; | ||
/** Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file. */ | ||
file_unique_id: String; | ||
file_unique_id: string; | ||
/** Duration of the audio in seconds as defined by sender */ | ||
duration: Integer; | ||
duration: number; | ||
/** Performer of the audio as defined by sender or by audio tags */ | ||
performer?: String; | ||
performer?: string; | ||
/** Title of the audio as defined by sender or by audio tags */ | ||
title?: String; | ||
title?: string; | ||
/** Original filename as defined by sender */ | ||
file_name?: String; | ||
file_name?: string; | ||
/** MIME type of the file as defined by sender */ | ||
mime_type?: String; | ||
mime_type?: string; | ||
/** File size */ | ||
file_size?: Integer; | ||
file_size?: number; | ||
/** Thumbnail of the album cover to which the music file belongs */ | ||
@@ -448,13 +447,13 @@ thumb?: PhotoSize; | ||
/** Identifier for this file, which can be used to download or reuse the file */ | ||
file_id: String; | ||
file_id: string; | ||
/** Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file. */ | ||
file_unique_id: String; | ||
file_unique_id: string; | ||
/** Document thumbnail as defined by sender */ | ||
thumb?: PhotoSize; | ||
/** Original filename as defined by sender */ | ||
file_name?: String; | ||
file_name?: string; | ||
/** MIME type of the file as defined by sender */ | ||
mime_type?: String; | ||
mime_type?: string; | ||
/** File size */ | ||
file_size?: Integer; | ||
file_size?: number; | ||
} | ||
@@ -465,19 +464,19 @@ | ||
/** Identifier for this file, which can be used to download or reuse the file */ | ||
file_id: String; | ||
file_id: string; | ||
/** Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file. */ | ||
file_unique_id: String; | ||
file_unique_id: string; | ||
/** Video width as defined by sender */ | ||
width: Integer; | ||
width: number; | ||
/** Video height as defined by sender */ | ||
height: Integer; | ||
height: number; | ||
/** Duration of the video in seconds as defined by sender */ | ||
duration: Integer; | ||
duration: number; | ||
/** Video thumbnail */ | ||
thumb?: PhotoSize; | ||
/** Original filename as defined by sender */ | ||
file_name?: String; | ||
file_name?: string; | ||
/** Mime type of a file as defined by sender */ | ||
mime_type?: String; | ||
mime_type?: string; | ||
/** File size */ | ||
file_size?: Integer; | ||
file_size?: number; | ||
} | ||
@@ -488,13 +487,13 @@ | ||
/** Identifier for this file, which can be used to download or reuse the file */ | ||
file_id: String; | ||
file_id: string; | ||
/** Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file. */ | ||
file_unique_id: String; | ||
file_unique_id: string; | ||
/** Video width and height (diameter of the video message) as defined by sender */ | ||
length: Integer; | ||
length: number; | ||
/** Duration of the video in seconds as defined by sender */ | ||
duration: Integer; | ||
duration: number; | ||
/** Video thumbnail */ | ||
thumb?: PhotoSize; | ||
/** File size */ | ||
file_size?: Integer; | ||
file_size?: number; | ||
} | ||
@@ -505,11 +504,11 @@ | ||
/** Identifier for this file, which can be used to download or reuse the file */ | ||
file_id: String; | ||
file_id: string; | ||
/** Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file. */ | ||
file_unique_id: String; | ||
file_unique_id: string; | ||
/** Duration of the audio in seconds as defined by sender */ | ||
duration: Integer; | ||
duration: number; | ||
/** MIME type of the file as defined by sender */ | ||
mime_type?: String; | ||
mime_type?: string; | ||
/** File size */ | ||
file_size?: Integer; | ||
file_size?: number; | ||
} | ||
@@ -520,11 +519,11 @@ | ||
/** Contact's phone number */ | ||
phone_number: String; | ||
phone_number: string; | ||
/** Contact's first name */ | ||
first_name: String; | ||
first_name: string; | ||
/** Contact's last name */ | ||
last_name?: String; | ||
last_name?: string; | ||
/** Contact's user identifier in Telegram */ | ||
user_id?: Integer; | ||
user_id?: number; | ||
/** Additional data about the contact in the form of a vCard */ | ||
vcard?: String; | ||
vcard?: string; | ||
} | ||
@@ -535,5 +534,5 @@ | ||
/** Emoji on which the dice throw animation is based */ | ||
emoji: String; | ||
emoji: string; | ||
/** Value of the dice, 1-6 for “🎲” and “🎯” base emoji, 1-5 for “🏀” and “⚽” base emoji, 1-64 for “🎰” base emoji */ | ||
value: Integer; | ||
value: number; | ||
} | ||
@@ -544,5 +543,5 @@ | ||
/** Option text, 1-100 characters */ | ||
text: String; | ||
text: string; | ||
/** Number of users that voted for this option */ | ||
voter_count: Integer; | ||
voter_count: number; | ||
} | ||
@@ -553,7 +552,7 @@ | ||
/** Unique poll identifier */ | ||
poll_id: String; | ||
poll_id: string; | ||
/** The user, who changed the answer to the poll */ | ||
user: User; | ||
/** 0-based identifiers of answer options, chosen by the user. May be empty if the user retracted their vote. */ | ||
option_ids: Integer[]; | ||
option_ids: number[]; | ||
} | ||
@@ -564,27 +563,27 @@ | ||
/** Unique poll identifier */ | ||
id: String; | ||
id: string; | ||
/** Poll question, 1-300 characters */ | ||
question: String; | ||
question: string; | ||
/** List of poll options */ | ||
options: PollOption[]; | ||
/** Total number of users that voted in the poll */ | ||
total_voter_count: Integer; | ||
total_voter_count: number; | ||
/** True, if the poll is closed */ | ||
is_closed: Boolean; | ||
is_closed: boolean; | ||
/** True, if the poll is anonymous */ | ||
is_anonymous: Boolean; | ||
is_anonymous: boolean; | ||
/** Poll type, currently can be “regular” or “quiz” */ | ||
type: "regular" | "quiz"; | ||
/** True, if the poll allows multiple answers */ | ||
allows_multiple_answers: Boolean; | ||
allows_multiple_answers: boolean; | ||
/** 0-based identifier of the correct answer option. Available only for polls in the quiz mode, which are closed, or was sent (not forwarded) by the bot or to the private chat with the bot. */ | ||
correct_option_id?: Integer; | ||
correct_option_id?: number; | ||
/** Text that is shown when a user chooses an incorrect answer or taps on the lamp icon in a quiz-style poll, 0-200 characters */ | ||
explanation?: String; | ||
explanation?: string; | ||
/** Special entities like usernames, URLs, bot commands, etc. that appear in the explanation */ | ||
explanation_entities?: MessageEntity[]; | ||
/** Amount of time in seconds the poll will be active after creation */ | ||
open_period?: Integer; | ||
open_period?: number; | ||
/** Point in time (Unix timestamp) when the poll will be automatically closed */ | ||
close_date?: Integer; | ||
close_date?: number; | ||
} | ||
@@ -595,15 +594,15 @@ | ||
/** Longitude as defined by sender */ | ||
longitude: Float; | ||
longitude: number; | ||
/** Latitude as defined by sender */ | ||
latitude: Float; | ||
latitude: number; | ||
/** The radius of uncertainty for the location, measured in meters; 0-1500 */ | ||
horizontal_accuracy?: Float; | ||
horizontal_accuracy?: number; | ||
} | ||
export interface LiveLocation extends CommonLocation { | ||
/** Time relative to the message sending date, during which the location can be updated, in seconds. For active live locations only. */ | ||
live_period: Integer; | ||
live_period: number; | ||
/** The direction in which user is moving, in degrees; 1-360. For active live locations only. */ | ||
heading: Integer; | ||
heading: number; | ||
/** Maximum distance for proximity alerts about approaching another chat member, in meters. For sent live locations only. */ | ||
proximity_alert_radius?: Integer; | ||
proximity_alert_radius?: number; | ||
} | ||
@@ -620,13 +619,13 @@ } | ||
/** Name of the venue */ | ||
title: String; | ||
title: string; | ||
/** Address of the venue */ | ||
address: String; | ||
address: string; | ||
/** Foursquare identifier of the venue */ | ||
foursquare_id?: String; | ||
foursquare_id?: string; | ||
/** Foursquare type of the venue. (For example, “arts_entertainment/default”, “arts_entertainment/aquarium” or “food/icecream”.) */ | ||
foursquare_type?: String; | ||
foursquare_type?: string; | ||
/** Google Places identifier of the venue */ | ||
google_place_id?: String; | ||
google_place_id?: string; | ||
/** Google Places type of the venue. (See supported types.) */ | ||
google_place_type?: String; | ||
google_place_type?: string; | ||
} | ||
@@ -641,3 +640,3 @@ | ||
/** The distance between the users */ | ||
distance: Integer; | ||
distance: number; | ||
} | ||
@@ -648,21 +647,21 @@ | ||
/** Identifier for this file, which can be used to download or reuse the file */ | ||
file_id: String; | ||
file_id: string; | ||
/** Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file. */ | ||
file_unique_id: String; | ||
file_unique_id: string; | ||
/** Sticker width */ | ||
width: Integer; | ||
width: number; | ||
/** Sticker height */ | ||
height: Integer; | ||
height: number; | ||
/** True, if the sticker is animated */ | ||
is_animated: Boolean; | ||
is_animated: boolean; | ||
/** Sticker thumbnail in the .WEBP or .JPG format */ | ||
thumb?: PhotoSize; | ||
/** Emoji associated with the sticker */ | ||
emoji?: String; | ||
emoji?: string; | ||
/** Name of the sticker set to which the sticker belongs */ | ||
set_name?: String; | ||
set_name?: string; | ||
/** For mask stickers, the position where the mask should be placed */ | ||
mask_position?: MaskPosition; | ||
/** File size */ | ||
file_size?: Integer; | ||
file_size?: number; | ||
} | ||
@@ -673,9 +672,9 @@ | ||
/** Sticker set name */ | ||
name: String; | ||
name: string; | ||
/** Sticker set title */ | ||
title: String; | ||
title: string; | ||
/** True, if the sticker set contains animated stickers */ | ||
is_animated: Boolean; | ||
is_animated: boolean; | ||
/** True, if the sticker set contains masks */ | ||
contains_masks: Boolean; | ||
contains_masks: boolean; | ||
/** List of all set stickers */ | ||
@@ -692,7 +691,7 @@ stickers: Sticker[]; | ||
/** Shift by X-axis measured in widths of the mask scaled to the face size, from left to right. For example, choosing -1.0 will place mask just to the left of the default mask position. */ | ||
x_shift: Float; | ||
x_shift: number; | ||
/** Shift by Y-axis measured in heights of the mask scaled to the face size, from top to bottom. For example, 1.0 will place the mask just below the default mask position. */ | ||
y_shift: Float; | ||
y_shift: number; | ||
/** Mask scaling coefficient. For example, 2.0 means double size. */ | ||
scale: Float; | ||
scale: number; | ||
} | ||
@@ -703,9 +702,9 @@ | ||
/** Title of the game */ | ||
title: String; | ||
title: string; | ||
/** Description of the game */ | ||
description: String; | ||
description: string; | ||
/** Photo that will be displayed in the game message in chats. */ | ||
photo: PhotoSize[]; | ||
/** Brief description of the game or high scores included in the game message. Can be automatically edited to include current high scores for the game when the bot calls setGameScore, or manually edited using editMessageText. 0-4096 characters. */ | ||
text: String; | ||
text: string; | ||
/** Special entities that appear in text, such as usernames, URLs, bot commands, etc. */ | ||
@@ -720,7 +719,7 @@ text_entities: MessageEntity[]; | ||
/** Position in high score table for the game */ | ||
position: Integer; | ||
position: number; | ||
/** User */ | ||
user: User; | ||
/** Score */ | ||
score: Integer; | ||
score: number; | ||
} |
{ | ||
"name": "typegram", | ||
"version": "3.1.9", | ||
"version": "3.1.10", | ||
"description": "Type declarations for the Telegram API", | ||
"main": "index.js", | ||
"exports": { | ||
".": "./index.js", | ||
"./api": "./index.js", | ||
"./callback": "./index.js", | ||
"./default": "./index.js", | ||
"./inline": "./index.js", | ||
"./manage": "./index.js", | ||
"./message": "./index.js", | ||
"./passport": "./index.js", | ||
"./payment": "./index.js", | ||
"./proxied": "./index.js", | ||
"./update": "./index.js" | ||
}, | ||
"repository": { | ||
@@ -7,0 +20,0 @@ "type": "git", |
@@ -1,3 +0,1 @@ | ||
import { Integer, String } from "./alias"; | ||
/** Contains information about Telegram Passport data shared with the bot by the user. */ | ||
@@ -14,9 +12,9 @@ export interface PassportData { | ||
/** Identifier for this file, which can be used to download or reuse the file */ | ||
file_id: String; | ||
file_id: string; | ||
/** Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file. */ | ||
file_unique_id: String; | ||
file_unique_id: string; | ||
/** File size */ | ||
file_size: Integer; | ||
file_size: number; | ||
/** Unix time when the file was uploaded */ | ||
file_date: Integer; | ||
file_date: number; | ||
} | ||
@@ -42,7 +40,7 @@ | ||
/** Base64-encoded encrypted Telegram Passport element data provided by the user, available for “personal_details”, “passport”, “driver_license”, “identity_card”, “internal_passport” and “address” types. Can be decrypted and verified using the accompanying EncryptedCredentials. */ | ||
data?: String; | ||
data?: string; | ||
/** User's verified phone number, available only for “phone_number” type */ | ||
phone_number?: String; | ||
phone_number?: string; | ||
/** User's verified email address, available only for “email” type */ | ||
email?: String; | ||
email?: string; | ||
/** Array of encrypted files with documents provided by the user, available for “utility_bill”, “bank_statement”, “rental_agreement”, “passport_registration” and “temporary_registration” types. Files can be decrypted and verified using the accompanying EncryptedCredentials. */ | ||
@@ -59,3 +57,3 @@ files?: PassportFile[]; | ||
/** Base64-encoded element hash for using in PassportElementErrorUnspecified */ | ||
hash: String; | ||
hash: string; | ||
} | ||
@@ -66,7 +64,7 @@ | ||
/** Base64-encoded encrypted JSON-serialized data with unique user's payload, data hashes and secrets required for EncryptedPassportElement decryption and authentication */ | ||
data: String; | ||
data: string; | ||
/** Base64-encoded data hash for data authentication */ | ||
hash: String; | ||
hash: string; | ||
/** Base64-encoded secret, encrypted with the bot's public RSA key, required for data decryption */ | ||
secret: String; | ||
secret: string; | ||
} | ||
@@ -109,7 +107,7 @@ | ||
/** Name of the data field which has the error */ | ||
field_name: String; | ||
field_name: string; | ||
/** Base64-encoded data hash */ | ||
data_hash: String; | ||
data_hash: string; | ||
/** Error message */ | ||
message: String; | ||
message: string; | ||
} | ||
@@ -124,5 +122,5 @@ | ||
/** Base64-encoded hash of the file with the front side of the document */ | ||
file_hash: String; | ||
file_hash: string; | ||
/** Error message */ | ||
message: String; | ||
message: string; | ||
} | ||
@@ -137,5 +135,5 @@ | ||
/** Base64-encoded hash of the file with the reverse side of the document */ | ||
file_hash: String; | ||
file_hash: string; | ||
/** Error message */ | ||
message: String; | ||
message: string; | ||
} | ||
@@ -150,5 +148,5 @@ | ||
/** Base64-encoded hash of the file with the selfie */ | ||
file_hash: String; | ||
file_hash: string; | ||
/** Error message */ | ||
message: String; | ||
message: string; | ||
} | ||
@@ -168,5 +166,5 @@ | ||
/** Base64-encoded file hash */ | ||
file_hash: String; | ||
file_hash: string; | ||
/** Error message */ | ||
message: String; | ||
message: string; | ||
} | ||
@@ -186,5 +184,5 @@ | ||
/** List of base64-encoded file hashes */ | ||
file_hashes: String[]; | ||
file_hashes: string[]; | ||
/** Error message */ | ||
message: String; | ||
message: string; | ||
} | ||
@@ -208,5 +206,5 @@ | ||
/** Base64-encoded file hash */ | ||
file_hash: String; | ||
file_hash: string; | ||
/** Error message */ | ||
message: String; | ||
message: string; | ||
} | ||
@@ -230,5 +228,5 @@ | ||
/** List of base64-encoded file hashes */ | ||
file_hashes: String[]; | ||
file_hashes: string[]; | ||
/** Error message */ | ||
message: String; | ||
message: string; | ||
} | ||
@@ -241,7 +239,7 @@ | ||
/** Type of element of the user's Telegram Passport which has the issue */ | ||
type: String; | ||
type: string; | ||
/** Base64-encoded element hash */ | ||
element_hash: String; | ||
element_hash: string; | ||
/** Error message */ | ||
message: String; | ||
message: string; | ||
} |
@@ -1,2 +0,1 @@ | ||
import { Integer, String } from "./alias"; | ||
import { User } from "./manage"; | ||
@@ -7,5 +6,5 @@ | ||
/** Portion label */ | ||
label: String; | ||
label: string; | ||
/** Price of the product in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass 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). */ | ||
amount: Integer; | ||
amount: number; | ||
} | ||
@@ -16,11 +15,11 @@ | ||
/** Product name */ | ||
title: String; | ||
title: string; | ||
/** Product description */ | ||
description: String; | ||
description: string; | ||
/** Unique bot deep-linking parameter that can be used to generate this invoice */ | ||
start_parameter: String; | ||
start_parameter: string; | ||
/** Three-letter ISO 4217 currency code */ | ||
currency: String; | ||
currency: string; | ||
/** Total price in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass 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). */ | ||
total_amount: Integer; | ||
total_amount: number; | ||
} | ||
@@ -31,13 +30,13 @@ | ||
/** ISO 3166-1 alpha-2 country code */ | ||
country_code: String; | ||
country_code: string; | ||
/** State, if applicable */ | ||
state: String; | ||
state: string; | ||
/** City */ | ||
city: String; | ||
city: string; | ||
/** First line for the address */ | ||
street_line1: String; | ||
street_line1: string; | ||
/** Second line for the address */ | ||
street_line2: String; | ||
street_line2: string; | ||
/** Address post code */ | ||
post_code: String; | ||
post_code: string; | ||
} | ||
@@ -48,7 +47,7 @@ | ||
/** User name */ | ||
name?: String; | ||
name?: string; | ||
/** User's phone number */ | ||
phone_number?: String; | ||
phone_number?: string; | ||
/** User email */ | ||
email?: String; | ||
email?: string; | ||
/** User shipping address */ | ||
@@ -61,5 +60,5 @@ shipping_address?: ShippingAddress; | ||
/** Shipping option identifier */ | ||
id: String; | ||
id: string; | ||
/** Option title */ | ||
title: String; | ||
title: string; | ||
/** List of price portions */ | ||
@@ -72,15 +71,15 @@ prices: LabeledPrice[]; | ||
/** Three-letter ISO 4217 currency code */ | ||
currency: String; | ||
currency: string; | ||
/** Total price in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass 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). */ | ||
total_amount: Integer; | ||
total_amount: number; | ||
/** Bot specified invoice payload */ | ||
invoice_payload: String; | ||
invoice_payload: string; | ||
/** Identifier of the shipping option chosen by the user */ | ||
shipping_option_id?: String; | ||
shipping_option_id?: string; | ||
/** Order info provided by the user */ | ||
order_info?: OrderInfo; | ||
/** Telegram payment identifier */ | ||
telegram_payment_charge_id: String; | ||
telegram_payment_charge_id: string; | ||
/** Provider payment identifier */ | ||
provider_payment_charge_id: String; | ||
provider_payment_charge_id: string; | ||
} | ||
@@ -91,7 +90,7 @@ | ||
/** Unique query identifier */ | ||
id: String; | ||
id: string; | ||
/** User who sent the query */ | ||
from: User; | ||
/** Bot specified invoice payload */ | ||
invoice_payload: String; | ||
invoice_payload: string; | ||
/** User specified shipping address */ | ||
@@ -104,15 +103,15 @@ shipping_address: ShippingAddress; | ||
/** Unique query identifier */ | ||
id: String; | ||
id: string; | ||
/** User who sent the query */ | ||
from: User; | ||
/** Three-letter ISO 4217 currency code */ | ||
currency: String; | ||
currency: string; | ||
/** Total price in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass 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). */ | ||
total_amount: Integer; | ||
total_amount: number; | ||
/** Bot specified invoice payload */ | ||
invoice_payload: String; | ||
invoice_payload: string; | ||
/** Identifier of the shipping option chosen by the user */ | ||
shipping_option_id?: String; | ||
shipping_option_id?: string; | ||
/** Order info provided by the user */ | ||
order_info?: OrderInfo; | ||
} |
@@ -1,2 +0,1 @@ | ||
import { Integer, String } from "./alias"; | ||
import { CallbackQuery } from "./callback"; | ||
@@ -12,3 +11,3 @@ import { ChosenInlineResult, InlineQuery } from "./inline"; | ||
chat: Chat.ChannelChat; | ||
author_signature?: String; | ||
author_signature?: string; | ||
from?: never; | ||
@@ -29,3 +28,3 @@ } | ||
/** Date the message was last edited in Unix time */ | ||
edit_date: Integer; | ||
edit_date: number; | ||
forward_from?: never; | ||
@@ -41,3 +40,3 @@ forward_from_chat?: never; | ||
/** The update's unique identifier. Update identifiers start from a certain positive number and increase sequentially. This ID becomes especially handy if you're using Webhooks, since it allows you to ignore repeated updates or to restore the correct update sequence, should they get out of order. If there are no new updates for at least a week, then identifier of the next update will be chosen randomly instead of sequentially. */ | ||
update_id: Integer; | ||
update_id: number; | ||
} | ||
@@ -44,0 +43,0 @@ export interface MessageUpdate extends AbstractMessageUpdate { |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
212708
16
3464