@telegram.ts/types 1.19.1 → 1.20.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/apiMethodsTypes.d.ts +35 -5
- package/src/inlineTypes.d.ts +2 -4
- package/src/invoiceTypes.d.ts +2 -0
- package/src/messageTypes.d.ts +1 -1
package/package.json
CHANGED
package/src/apiMethodsTypes.d.ts
CHANGED
|
@@ -77,11 +77,11 @@ export type ApiMethods = {
|
|
|
77
77
|
timeout?: number;
|
|
78
78
|
/** A list of the update types you want your bot to receive. For example, specify ["message", "edited_channel_post", "callback_query"] to only receive updates of these types. See Update for a complete list of available update types. Specify an empty list to receive all update types except chat_member, message_reaction, and message_reaction_count (default). If not specified, the previous setting will be used.
|
|
79
79
|
|
|
80
|
-
Please note that this parameter doesn't affect updates created before the call to
|
|
80
|
+
Please note that this parameter doesn't affect updates created before the call to getUpdates, so unwanted updates may be received for a short period of time. */
|
|
81
81
|
allowed_updates?: ReadonlyArray<Exclude<keyof Update, "update_id">>;
|
|
82
82
|
}): Update[];
|
|
83
83
|
|
|
84
|
-
/** Use this method to specify a URL and receive incoming updates via an outgoing webhook. Whenever there is an update for the bot, we will send an HTTPS POST request to the specified URL, containing a JSON-serialized Update. In case of an unsuccessful request, we will give up after a reasonable amount of attempts. Returns True on success.
|
|
84
|
+
/** Use this method to specify a URL and receive incoming updates via an outgoing webhook. Whenever there is an update for the bot, we will send an HTTPS POST request to the specified URL, containing a JSON-serialized Update. In case of an unsuccessful request (a request with response HTTP status code different from 2XY), we will repeat the request and give up after a reasonable amount of attempts. Returns True on success.
|
|
85
85
|
|
|
86
86
|
If you'd like to make sure that the webhook was set by you, you can specify secret data in the parameter secret_token. If specified, the request will contain a header “X-Telegram-Bot-Api-Secret-Token” with the secret token as content.
|
|
87
87
|
|
|
@@ -1689,9 +1689,9 @@ export type ApiMethods = {
|
|
|
1689
1689
|
name: string;
|
|
1690
1690
|
/** User identifier of the sticker set owner */
|
|
1691
1691
|
user_id: number;
|
|
1692
|
-
/** A .WEBP or .PNG image with the thumbnail, must be up to 128 kilobytes in size and have a width and height of exactly 100px, or a .TGS animation with a thumbnail up to 32 kilobytes in size (see https://core.telegram.org/stickers#animation-requirements for animated sticker technical requirements), or a WEBM video with the thumbnail up to 32 kilobytes in size; see https://core.telegram.org/stickers#video-requirements for video sticker technical requirements. Pass a file_id as a String to send a file that already exists on the Telegram servers, pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data. More information on Sending Files ». Animated and video sticker set thumbnails can't be uploaded via HTTP URL. If omitted, then the thumbnail is dropped and the first sticker is used as the thumbnail. */
|
|
1692
|
+
/** A .WEBP or .PNG image with the thumbnail, must be up to 128 kilobytes in size and have a width and height of exactly 100px, or a .TGS animation with a thumbnail up to 32 kilobytes in size (see https://core.telegram.org/stickers#animation-requirements for animated sticker technical requirements), or a .WEBM video with the thumbnail up to 32 kilobytes in size; see https://core.telegram.org/stickers#video-requirements for video sticker technical requirements. Pass a file_id as a String to send a file that already exists on the Telegram servers, pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data. More information on Sending Files ». Animated and video sticker set thumbnails can't be uploaded via HTTP URL. If omitted, then the thumbnail is dropped and the first sticker is used as the thumbnail. */
|
|
1693
1693
|
thumbnail?: Buffer | ReadStream | string;
|
|
1694
|
-
/** Format of the thumbnail, must be one of “static” for a .WEBP or .PNG image, “animated” for a .TGS animation, or “video” for a WEBM video */
|
|
1694
|
+
/** Format of the thumbnail, must be one of “static” for a .WEBP or .PNG image, “animated” for a .TGS animation, or “video” for a .WEBM video */
|
|
1695
1695
|
format: "static" | "animated" | "video";
|
|
1696
1696
|
}): true;
|
|
1697
1697
|
|
|
@@ -1712,6 +1712,8 @@ export type ApiMethods = {
|
|
|
1712
1712
|
user_id: number;
|
|
1713
1713
|
/** Identifier of the gift */
|
|
1714
1714
|
gift_id: string;
|
|
1715
|
+
/** Pass True to pay for the gift upgrade from the bot's balance, thereby making the upgrade free for the receiver */
|
|
1716
|
+
pay_for_upgrade?: boolean;
|
|
1715
1717
|
/** Text that will be shown along with the gift; 0-255 characters */
|
|
1716
1718
|
text?: string;
|
|
1717
1719
|
/** Mode for parsing entities in the text. See formatting options for more details. Entities other than “bold”, “italic”, “underline”, “strikethrough”, “spoiler”, and “custom_emoji” are ignored. */
|
|
@@ -1883,6 +1885,34 @@ export type ApiMethods = {
|
|
|
1883
1885
|
is_canceled: boolean;
|
|
1884
1886
|
}): true;
|
|
1885
1887
|
|
|
1888
|
+
/** Verifies a user on behalf of the organization which is represented by the bot. Returns True on success. */
|
|
1889
|
+
verifyUser(args: {
|
|
1890
|
+
/** Unique identifier of the target user */
|
|
1891
|
+
user_id: number;
|
|
1892
|
+
/** Custom description for the verification; 0-70 characters. Must be empty if the organization isn't allowed to provide a custom verification description. */
|
|
1893
|
+
custom_description?: string;
|
|
1894
|
+
}): true;
|
|
1895
|
+
|
|
1896
|
+
/** Verifies a chat on behalf of the organization which is represented by the bot. Returns True on success. */
|
|
1897
|
+
verifyChat(args: {
|
|
1898
|
+
/** Unique identifier for the target chat or username of the target channel (in the format @channelusername) */
|
|
1899
|
+
chat_id: number | string;
|
|
1900
|
+
/** Custom description for the verification; 0-70 characters. Must be empty if the organization isn't allowed to provide a custom verification description. */
|
|
1901
|
+
custom_description?: string;
|
|
1902
|
+
}): true;
|
|
1903
|
+
|
|
1904
|
+
/** Removes verification from a user who is currently verified on behalf of the organization represented by the bot. Returns True on success. */
|
|
1905
|
+
removeUserVerification(args: {
|
|
1906
|
+
/** Unique identifier of the target user */
|
|
1907
|
+
user_id: number;
|
|
1908
|
+
}): true;
|
|
1909
|
+
|
|
1910
|
+
/** Removes verification from a chat that is currently verified on behalf of the organization represented by the bot. Returns True on success. */
|
|
1911
|
+
removeChatVerification(args: {
|
|
1912
|
+
/** Unique identifier for the target chat or username of the target channel (in the format @channelusername) */
|
|
1913
|
+
chat_id: number | string;
|
|
1914
|
+
}): true;
|
|
1915
|
+
|
|
1886
1916
|
/** If you sent an invoice requesting a shipping address and the parameter is_flexible was specified, the Bot API will send an Update with a shipping_query field to the bot. Use this method to reply to shipping queries. On success, True is returned. */
|
|
1887
1917
|
answerShippingQuery(args: {
|
|
1888
1918
|
/** Unique identifier for the query to be answered */
|
|
@@ -1992,7 +2022,7 @@ export type ApiMethods = {
|
|
|
1992
2022
|
export interface InputSticker {
|
|
1993
2023
|
/** The added sticker. Pass a file_id as a String to send a file that already exists on the Telegram servers, pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data. Animated and video stickers can't be uploaded via HTTP URL. */
|
|
1994
2024
|
sticker: Buffer | ReadStream | string;
|
|
1995
|
-
/** Format of the added sticker, must be one of “static” for a .WEBP or .PNG image, “animated” for a .TGS animation, “video” for a WEBM video */
|
|
2025
|
+
/** Format of the added sticker, must be one of “static” for a .WEBP or .PNG image, “animated” for a .TGS animation, “video” for a .WEBM video */
|
|
1996
2026
|
format: "static" | "animated" | "video";
|
|
1997
2027
|
/** List of 1-20 emoji associated with the sticker */
|
|
1998
2028
|
emoji_list: string[];
|
package/src/inlineTypes.d.ts
CHANGED
|
@@ -80,8 +80,6 @@ export interface InlineQueryResultArticle {
|
|
|
80
80
|
reply_markup?: InlineKeyboardMarkup;
|
|
81
81
|
/** URL of the result */
|
|
82
82
|
url?: string;
|
|
83
|
-
/** Pass True if you don't want the URL to be shown in the message */
|
|
84
|
-
hide_url?: boolean;
|
|
85
83
|
/** Short description of the result */
|
|
86
84
|
description?: string;
|
|
87
85
|
/** Url of the thumbnail for the result */
|
|
@@ -128,7 +126,7 @@ export interface InlineQueryResultGif {
|
|
|
128
126
|
type: "gif";
|
|
129
127
|
/** Unique identifier for this result, 1-64 bytes */
|
|
130
128
|
id: string;
|
|
131
|
-
/** A valid URL for the GIF file
|
|
129
|
+
/** A valid URL for the GIF file */
|
|
132
130
|
gif_url: string;
|
|
133
131
|
/** Width of the GIF */
|
|
134
132
|
gif_width?: number;
|
|
@@ -161,7 +159,7 @@ export interface InlineQueryResultMpeg4Gif {
|
|
|
161
159
|
type: "mpeg4_gif";
|
|
162
160
|
/** Unique identifier for this result, 1-64 bytes */
|
|
163
161
|
id: string;
|
|
164
|
-
/** A valid URL for the MPEG4 file
|
|
162
|
+
/** A valid URL for the MPEG4 file */
|
|
165
163
|
mpeg4_url: string;
|
|
166
164
|
/** Video width */
|
|
167
165
|
mpeg4_width?: number;
|
package/src/invoiceTypes.d.ts
CHANGED
|
@@ -287,6 +287,8 @@ export interface Gift {
|
|
|
287
287
|
sticker: Sticker;
|
|
288
288
|
/** The number of Telegram Stars that must be paid to send the sticker */
|
|
289
289
|
star_count: number;
|
|
290
|
+
/** The number of Telegram Stars that must be paid to upgrade the gift to a unique one */
|
|
291
|
+
upgrade_star_count?: number;
|
|
290
292
|
/** The total number of the gifts of this type that can be sent; for limited gifts only */
|
|
291
293
|
total_count?: number;
|
|
292
294
|
/** The number of remaining gifts of this type that can be sent; for limited gifts only */
|
package/src/messageTypes.d.ts
CHANGED
|
@@ -1041,7 +1041,7 @@ export interface BackgroundTypeWallpaper {
|
|
|
1041
1041
|
is_moving?: true;
|
|
1042
1042
|
}
|
|
1043
1043
|
|
|
1044
|
-
/** 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. */
|
|
1044
|
+
/** 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. */
|
|
1045
1045
|
export interface BackgroundTypePattern {
|
|
1046
1046
|
/** Type of the background, always “pattern” */
|
|
1047
1047
|
type: "pattern";
|