@grammyjs/types 3.14.0 → 3.15.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/markup.d.ts +10 -1
- package/message.d.ts +3 -3
- package/methods.d.ts +40 -2
- package/package.json +2 -2
- package/payment.d.ts +10 -2
package/markup.d.ts
CHANGED
|
@@ -40,6 +40,10 @@ export declare namespace InlineKeyboardButton {
|
|
|
40
40
|
/** 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. */
|
|
41
41
|
switch_inline_query_chosen_chat: SwitchInlineQueryChosenChat;
|
|
42
42
|
}
|
|
43
|
+
interface CopyTextButtonButton extends AbstractInlineKeyboardButton {
|
|
44
|
+
/** Description of the button that copies the specified text to the clipboard. */
|
|
45
|
+
copy_text: CopyTextButton;
|
|
46
|
+
}
|
|
43
47
|
interface GameButton extends AbstractInlineKeyboardButton {
|
|
44
48
|
/** Description of the game that will be launched when the user presses the button.
|
|
45
49
|
|
|
@@ -54,7 +58,7 @@ export declare namespace InlineKeyboardButton {
|
|
|
54
58
|
}
|
|
55
59
|
}
|
|
56
60
|
/** This object represents one button of an inline keyboard. You must use exactly one of the optional fields. */
|
|
57
|
-
export type InlineKeyboardButton = InlineKeyboardButton.CallbackButton | InlineKeyboardButton.GameButton | InlineKeyboardButton.LoginButton | InlineKeyboardButton.PayButton | InlineKeyboardButton.SwitchInlineButton | InlineKeyboardButton.SwitchInlineCurrentChatButton | InlineKeyboardButton.SwitchInlineChosenChatButton | InlineKeyboardButton.UrlButton | InlineKeyboardButton.WebAppButton;
|
|
61
|
+
export type InlineKeyboardButton = InlineKeyboardButton.CallbackButton | InlineKeyboardButton.GameButton | InlineKeyboardButton.LoginButton | InlineKeyboardButton.PayButton | InlineKeyboardButton.SwitchInlineButton | InlineKeyboardButton.SwitchInlineCurrentChatButton | InlineKeyboardButton.SwitchInlineChosenChatButton | InlineKeyboardButton.CopyTextButtonButton | InlineKeyboardButton.UrlButton | InlineKeyboardButton.WebAppButton;
|
|
58
62
|
/** This object represents a parameter of the inline keyboard button used to automatically authorize a user. Serves as a great replacement for the Telegram Login Widget when the user is coming from Telegram. All the user needs to do is tap/click a button and confirm that they want to log in.
|
|
59
63
|
Telegram apps support these buttons as of version 5.7. */
|
|
60
64
|
export interface LoginUrl {
|
|
@@ -184,6 +188,11 @@ export interface ForceReply {
|
|
|
184
188
|
/** 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 to a message in the same chat and forum topic, sender of the original message. */
|
|
185
189
|
selective?: boolean;
|
|
186
190
|
}
|
|
191
|
+
/** This object represents an inline keyboard button that copies specified text to the clipboard. */
|
|
192
|
+
export interface CopyTextButton {
|
|
193
|
+
/** The text to be copied to the clipboard; 1-256 characters */
|
|
194
|
+
text: string;
|
|
195
|
+
}
|
|
187
196
|
/** Describes a Web App. */
|
|
188
197
|
export interface WebAppInfo {
|
|
189
198
|
/** An HTTPS URL of a Web App to be opened with additional data as specified in Initializing Web Apps */
|
package/message.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ import type { Invoice, RefundedPayment, SuccessfulPayment } from "./payment.js";
|
|
|
5
5
|
type MsgWith<P extends keyof Message> = Record<P, NonNullable<Message[P]>>;
|
|
6
6
|
export declare namespace Message {
|
|
7
7
|
interface ServiceMessage {
|
|
8
|
-
/** Unique message identifier inside this chat */
|
|
8
|
+
/** Unique message identifier inside this chat. In specific instances (e.g., message containing a video sent to a big chat), the server might automatically schedule a message instead of sending it immediately. In such cases, this field will be 0 and the relevant message will be unusable until it is actually sent */
|
|
9
9
|
message_id: number;
|
|
10
10
|
/** Unique identifier of a message thread or a forum topic to which the message belongs; for supergroups only */
|
|
11
11
|
message_thread_id?: number;
|
|
@@ -245,7 +245,7 @@ export interface Message extends Message.MediaMessage {
|
|
|
245
245
|
}
|
|
246
246
|
/** This object represents a unique message identifier. */
|
|
247
247
|
export interface MessageId {
|
|
248
|
-
/** Unique message identifier */
|
|
248
|
+
/** Unique message identifier. In specific instances (e.g., message containing a video sent to a big chat), the server might automatically schedule a message instead of sending it immediately. In such cases, this field will be 0 and the relevant message will be unusable until it is actually sent */
|
|
249
249
|
message_id: number;
|
|
250
250
|
}
|
|
251
251
|
/** Describes an inline message sent by a Web App on behalf of a user. */
|
|
@@ -381,7 +381,7 @@ Please note:
|
|
|
381
381
|
export type ParseMode = "Markdown" | "MarkdownV2" | "HTML";
|
|
382
382
|
export declare namespace MessageEntity {
|
|
383
383
|
interface AbstractMessageEntity {
|
|
384
|
-
/** Type of the entity. Currently, 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), “spoiler” (spoiler message), “blockquote” (block quotation), “expandable_blockquote” (collapsed-by-default block quotation), “code” (monowidth string), “pre” (monowidth block), “text_link” (for clickable text URLs), “text_mention” (for users without usernames), “custom_emoji” (for inline custom emoji stickers) */
|
|
384
|
+
/** Type of the entity. Currently, can be “mention” (@username), “hashtag” (#hashtag or #hashtag@chatusername), “cashtag” ($USD or $USD@chatusername), “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), “spoiler” (spoiler message), “blockquote” (block quotation), “expandable_blockquote” (collapsed-by-default block quotation), “code” (monowidth string), “pre” (monowidth block), “text_link” (for clickable text URLs), “text_mention” (for users without usernames), “custom_emoji” (for inline custom emoji stickers) */
|
|
385
385
|
type: string;
|
|
386
386
|
/** Offset in UTF-16 code units to the start of the entity */
|
|
387
387
|
offset: number;
|
package/methods.d.ts
CHANGED
|
@@ -94,6 +94,8 @@ export type ApiMethods<F> = {
|
|
|
94
94
|
disable_notification?: boolean;
|
|
95
95
|
/** Protects the contents of the sent message from forwarding and saving */
|
|
96
96
|
protect_content?: boolean;
|
|
97
|
+
/** Pass True to allow up to 1000 messages per second, ignoring broadcasting limits for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance */
|
|
98
|
+
allow_paid_broadcast?: boolean;
|
|
97
99
|
/** Unique identifier of the message effect to be added to the message; for private chats only */
|
|
98
100
|
message_effect_id?: string;
|
|
99
101
|
/** Description of the message to reply to */
|
|
@@ -155,6 +157,8 @@ export type ApiMethods<F> = {
|
|
|
155
157
|
disable_notification?: boolean;
|
|
156
158
|
/** Protects the contents of the sent message from forwarding and saving */
|
|
157
159
|
protect_content?: boolean;
|
|
160
|
+
/** Pass True to allow up to 1000 messages per second, ignoring broadcasting limits for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance */
|
|
161
|
+
allow_paid_broadcast?: boolean;
|
|
158
162
|
/** Description of the message to reply to */
|
|
159
163
|
reply_parameters?: ReplyParameters;
|
|
160
164
|
/** Additional interface options. An object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user. */
|
|
@@ -203,6 +207,8 @@ export type ApiMethods<F> = {
|
|
|
203
207
|
disable_notification?: boolean;
|
|
204
208
|
/** Protects the contents of the sent message from forwarding and saving */
|
|
205
209
|
protect_content?: boolean;
|
|
210
|
+
/** Pass True to allow up to 1000 messages per second, ignoring broadcasting limits for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance */
|
|
211
|
+
allow_paid_broadcast?: boolean;
|
|
206
212
|
/** Unique identifier of the message effect to be added to the message; for private chats only */
|
|
207
213
|
message_effect_id?: string;
|
|
208
214
|
/** Description of the message to reply to */
|
|
@@ -242,6 +248,8 @@ export type ApiMethods<F> = {
|
|
|
242
248
|
disable_notification?: boolean;
|
|
243
249
|
/** Protects the contents of the sent message from forwarding and saving */
|
|
244
250
|
protect_content?: boolean;
|
|
251
|
+
/** Pass True to allow up to 1000 messages per second, ignoring broadcasting limits for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance */
|
|
252
|
+
allow_paid_broadcast?: boolean;
|
|
245
253
|
/** Unique identifier of the message effect to be added to the message; for private chats only */
|
|
246
254
|
message_effect_id?: string;
|
|
247
255
|
/** Description of the message to reply to */
|
|
@@ -275,6 +283,8 @@ export type ApiMethods<F> = {
|
|
|
275
283
|
disable_notification?: boolean;
|
|
276
284
|
/** Protects the contents of the sent message from forwarding and saving */
|
|
277
285
|
protect_content?: boolean;
|
|
286
|
+
/** Pass True to allow up to 1000 messages per second, ignoring broadcasting limits for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance */
|
|
287
|
+
allow_paid_broadcast?: boolean;
|
|
278
288
|
/** Unique identifier of the message effect to be added to the message; for private chats only */
|
|
279
289
|
message_effect_id?: string;
|
|
280
290
|
/** Description of the message to reply to */
|
|
@@ -318,6 +328,8 @@ export type ApiMethods<F> = {
|
|
|
318
328
|
disable_notification?: boolean;
|
|
319
329
|
/** Protects the contents of the sent message from forwarding and saving */
|
|
320
330
|
protect_content?: boolean;
|
|
331
|
+
/** Pass True to allow up to 1000 messages per second, ignoring broadcasting limits for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance */
|
|
332
|
+
allow_paid_broadcast?: boolean;
|
|
321
333
|
/** Unique identifier of the message effect to be added to the message; for private chats only */
|
|
322
334
|
message_effect_id?: string;
|
|
323
335
|
/** Description of the message to reply to */
|
|
@@ -359,6 +371,8 @@ export type ApiMethods<F> = {
|
|
|
359
371
|
disable_notification?: boolean;
|
|
360
372
|
/** Protects the contents of the sent message from forwarding and saving */
|
|
361
373
|
protect_content?: boolean;
|
|
374
|
+
/** Pass True to allow up to 1000 messages per second, ignoring broadcasting limits for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance */
|
|
375
|
+
allow_paid_broadcast?: boolean;
|
|
362
376
|
/** Unique identifier of the message effect to be added to the message; for private chats only */
|
|
363
377
|
message_effect_id?: string;
|
|
364
378
|
/** Description of the message to reply to */
|
|
@@ -390,6 +404,8 @@ export type ApiMethods<F> = {
|
|
|
390
404
|
disable_notification?: boolean;
|
|
391
405
|
/** Protects the contents of the sent message from forwarding and saving */
|
|
392
406
|
protect_content?: boolean;
|
|
407
|
+
/** Pass True to allow up to 1000 messages per second, ignoring broadcasting limits for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance */
|
|
408
|
+
allow_paid_broadcast?: boolean;
|
|
393
409
|
/** Unique identifier of the message effect to be added to the message; for private chats only */
|
|
394
410
|
message_effect_id?: string;
|
|
395
411
|
/** Description of the message to reply to */
|
|
@@ -420,6 +436,8 @@ export type ApiMethods<F> = {
|
|
|
420
436
|
disable_notification?: boolean;
|
|
421
437
|
/** Protects the contents of the sent message from forwarding and saving */
|
|
422
438
|
protect_content?: boolean;
|
|
439
|
+
/** Pass True to allow up to 1000 messages per second, ignoring broadcasting limits for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance */
|
|
440
|
+
allow_paid_broadcast?: boolean;
|
|
423
441
|
/** Unique identifier of the message effect to be added to the message; for private chats only */
|
|
424
442
|
message_effect_id?: string;
|
|
425
443
|
/** Description of the message to reply to */
|
|
@@ -435,14 +453,16 @@ export type ApiMethods<F> = {
|
|
|
435
453
|
business_connection_id?: string;
|
|
436
454
|
/** Unique identifier for the target chat or username of the target channel (in the format @channelusername) */
|
|
437
455
|
chat_id: number | string;
|
|
438
|
-
/** An array describing messages to be sent, must include 2-10 items */
|
|
439
456
|
/** Unique identifier for the target message thread (topic) of the forum; for forum supergroups only */
|
|
440
457
|
message_thread_id?: number;
|
|
458
|
+
/** An array describing messages to be sent, must include 2-10 items */
|
|
441
459
|
media: ReadonlyArray<InputMediaAudio<F> | InputMediaDocument<F> | InputMediaPhoto<F> | InputMediaVideo<F>>;
|
|
442
460
|
/** Sends the messages silently. Users will receive a notification with no sound. */
|
|
443
461
|
disable_notification?: boolean;
|
|
444
462
|
/** Protects the contents of the sent messages from forwarding and saving */
|
|
445
463
|
protect_content?: boolean;
|
|
464
|
+
/** Pass True to allow up to 1000 messages per second, ignoring broadcasting limits for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance */
|
|
465
|
+
allow_paid_broadcast?: boolean;
|
|
446
466
|
/** Unique identifier of the message effect to be added to the message; for private chats only */
|
|
447
467
|
message_effect_id?: string;
|
|
448
468
|
/** Description of the message to reply to */
|
|
@@ -474,6 +494,8 @@ export type ApiMethods<F> = {
|
|
|
474
494
|
disable_notification?: boolean;
|
|
475
495
|
/** Protects the contents of the sent message from forwarding and saving */
|
|
476
496
|
protect_content?: boolean;
|
|
497
|
+
/** Pass True to allow up to 1000 messages per second, ignoring broadcasting limits for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance */
|
|
498
|
+
allow_paid_broadcast?: boolean;
|
|
477
499
|
/** Unique identifier of the message effect to be added to the message; for private chats only */
|
|
478
500
|
message_effect_id?: string;
|
|
479
501
|
/** Description of the message to reply to */
|
|
@@ -545,6 +567,8 @@ export type ApiMethods<F> = {
|
|
|
545
567
|
disable_notification?: boolean;
|
|
546
568
|
/** Protects the contents of the sent message from forwarding and saving */
|
|
547
569
|
protect_content?: boolean;
|
|
570
|
+
/** Pass True to allow up to 1000 messages per second, ignoring broadcasting limits for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance */
|
|
571
|
+
allow_paid_broadcast?: boolean;
|
|
548
572
|
/** Description of the message to reply to */
|
|
549
573
|
reply_parameters?: ReplyParameters;
|
|
550
574
|
/** Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user */
|
|
@@ -578,6 +602,8 @@ export type ApiMethods<F> = {
|
|
|
578
602
|
disable_notification?: boolean;
|
|
579
603
|
/** Protects the contents of the sent message from forwarding and saving */
|
|
580
604
|
protect_content?: boolean;
|
|
605
|
+
/** Pass True to allow up to 1000 messages per second, ignoring broadcasting limits for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance */
|
|
606
|
+
allow_paid_broadcast?: boolean;
|
|
581
607
|
/** Unique identifier of the message effect to be added to the message; for private chats only */
|
|
582
608
|
message_effect_id?: string;
|
|
583
609
|
/** Description of the message to reply to */
|
|
@@ -607,6 +633,8 @@ export type ApiMethods<F> = {
|
|
|
607
633
|
disable_notification?: boolean;
|
|
608
634
|
/** Protects the contents of the sent message from forwarding and saving */
|
|
609
635
|
protect_content?: boolean;
|
|
636
|
+
/** Pass True to allow up to 1000 messages per second, ignoring broadcasting limits for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance */
|
|
637
|
+
allow_paid_broadcast?: boolean;
|
|
610
638
|
/** Unique identifier of the message effect to be added to the message; for private chats only */
|
|
611
639
|
message_effect_id?: string;
|
|
612
640
|
/** Description of the message to reply to */
|
|
@@ -656,6 +684,8 @@ export type ApiMethods<F> = {
|
|
|
656
684
|
disable_notification?: boolean;
|
|
657
685
|
/** Protects the contents of the sent message from forwarding and saving */
|
|
658
686
|
protect_content?: boolean;
|
|
687
|
+
/** Pass True to allow up to 1000 messages per second, ignoring broadcasting limits for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance */
|
|
688
|
+
allow_paid_broadcast?: boolean;
|
|
659
689
|
/** Unique identifier of the message effect to be added to the message; for private chats only */
|
|
660
690
|
message_effect_id?: string;
|
|
661
691
|
/** Description of the message to reply to */
|
|
@@ -679,6 +709,8 @@ export type ApiMethods<F> = {
|
|
|
679
709
|
disable_notification?: boolean;
|
|
680
710
|
/** Protects the contents of the sent message from forwarding */
|
|
681
711
|
protect_content?: boolean;
|
|
712
|
+
/** Pass True to allow up to 1000 messages per second, ignoring broadcasting limits for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance */
|
|
713
|
+
allow_paid_broadcast?: boolean;
|
|
682
714
|
/** Unique identifier of the message effect to be added to the message; for private chats only */
|
|
683
715
|
message_effect_id?: string;
|
|
684
716
|
/** Description of the message to reply to */
|
|
@@ -1242,7 +1274,7 @@ export type ApiMethods<F> = {
|
|
|
1242
1274
|
/** An object for an inline keyboard. */
|
|
1243
1275
|
reply_markup?: InlineKeyboardMarkup;
|
|
1244
1276
|
}): (Update.Edited & Message.CaptionableMessage) | true;
|
|
1245
|
-
/** Use this method to edit animation, audio, document, photo, or video messages. If a message is part of a message album, then it can be edited only to an audio for audio albums, only to a document for document albums and to a photo or a video otherwise. When an inline message is edited, a new file can't be uploaded; use a previously uploaded file via its file_id or specify a URL. On success, if the edited message is not an inline message, the edited Message is returned, otherwise True is returned. Note that business messages that were not sent by the bot and do not contain an inline keyboard can only be edited within 48 hours from the time they were sent. */
|
|
1277
|
+
/** Use this method to edit animation, audio, document, photo, or video messages, or to add media to text messages. If a message is part of a message album, then it can be edited only to an audio for audio albums, only to a document for document albums and to a photo or a video otherwise. When an inline message is edited, a new file can't be uploaded; use a previously uploaded file via its file_id or specify a URL. On success, if the edited message is not an inline message, the edited Message is returned, otherwise True is returned. Note that business messages that were not sent by the bot and do not contain an inline keyboard can only be edited within 48 hours from the time they were sent. */
|
|
1246
1278
|
editMessageMedia(args: {
|
|
1247
1279
|
/** Unique identifier of the business connection on behalf of which the message to be edited was sent */
|
|
1248
1280
|
business_connection_id?: string;
|
|
@@ -1320,6 +1352,8 @@ export type ApiMethods<F> = {
|
|
|
1320
1352
|
disable_notification?: boolean;
|
|
1321
1353
|
/** Protects the contents of the sent message from forwarding and saving */
|
|
1322
1354
|
protect_content?: boolean;
|
|
1355
|
+
/** Pass True to allow up to 1000 messages per second, ignoring broadcasting limits for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance */
|
|
1356
|
+
allow_paid_broadcast?: boolean;
|
|
1323
1357
|
/** Unique identifier of the message effect to be added to the message; for private chats only */
|
|
1324
1358
|
message_effect_id?: string;
|
|
1325
1359
|
/** Description of the message to reply to */
|
|
@@ -1523,6 +1557,8 @@ export type ApiMethods<F> = {
|
|
|
1523
1557
|
disable_notification?: boolean;
|
|
1524
1558
|
/** Protects the contents of the sent message from forwarding and saving */
|
|
1525
1559
|
protect_content?: boolean;
|
|
1560
|
+
/** Pass True to allow up to 1000 messages per second, ignoring broadcasting limits for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance */
|
|
1561
|
+
allow_paid_broadcast?: boolean;
|
|
1526
1562
|
/** Unique identifier of the message effect to be added to the message; for private chats only */
|
|
1527
1563
|
message_effect_id?: string;
|
|
1528
1564
|
/** Description of the message to reply to */
|
|
@@ -1632,6 +1668,8 @@ export type ApiMethods<F> = {
|
|
|
1632
1668
|
disable_notification?: boolean;
|
|
1633
1669
|
/** Protects the contents of the sent message from forwarding and saving */
|
|
1634
1670
|
protect_content?: boolean;
|
|
1671
|
+
/** Pass True to allow up to 1000 messages per second, ignoring broadcasting limits for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance */
|
|
1672
|
+
allow_paid_broadcast?: boolean;
|
|
1635
1673
|
/** Unique identifier of the message effect to be added to the message; for private chats only */
|
|
1636
1674
|
message_effect_id?: string;
|
|
1637
1675
|
/** Description of the message to reply to */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@grammyjs/types",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.15.0",
|
|
4
4
|
"description": "Telegram Bot API type declarations for grammY",
|
|
5
5
|
"main": "mod.js",
|
|
6
6
|
"repository": {
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"types"
|
|
16
16
|
],
|
|
17
17
|
"scripts": {
|
|
18
|
-
"prepare": "deno task
|
|
18
|
+
"prepare": "deno task build"
|
|
19
19
|
},
|
|
20
20
|
"author": "KnorpelSenf",
|
|
21
21
|
"types": "mod.d.ts",
|
package/payment.d.ts
CHANGED
|
@@ -143,8 +143,9 @@ export interface RevenueWithdrawalStateFailed {
|
|
|
143
143
|
- TransactionPartnerUser
|
|
144
144
|
- TransactionPartnerFragment
|
|
145
145
|
- TransactionPartnerTelegramAds
|
|
146
|
+
- TransactionPartnerTelegramApi
|
|
146
147
|
- TransactionPartnerOther */
|
|
147
|
-
export type TransactionPartner = TransactionPartnerUser | TransactionPartnerFragment | TransactionPartnerTelegramAds | TransactionPartnerOther;
|
|
148
|
+
export type TransactionPartner = TransactionPartnerUser | TransactionPartnerFragment | TransactionPartnerTelegramAds | TransactionPartnerTelegramApi | TransactionPartnerOther;
|
|
148
149
|
/** Describes a transaction with a user. */
|
|
149
150
|
export interface TransactionPartnerUser {
|
|
150
151
|
/** Type of the transaction partner, always “user” */
|
|
@@ -170,6 +171,13 @@ export interface TransactionPartnerTelegramAds {
|
|
|
170
171
|
/** Type of the transaction partner, always “telegram_ads” */
|
|
171
172
|
type: "telegram_ads";
|
|
172
173
|
}
|
|
174
|
+
/** Describes a transaction with payment for paid broadcasting. */
|
|
175
|
+
export interface TransactionPartnerTelegramApi {
|
|
176
|
+
/** Type of the transaction partner, always “telegram_api” */
|
|
177
|
+
type: "telegram_api";
|
|
178
|
+
/** The number of successful requests that exceeded regular limits and were therefore billed */
|
|
179
|
+
request_count: number;
|
|
180
|
+
}
|
|
173
181
|
/** Describes a transaction with an unknown source or recipient. */
|
|
174
182
|
export interface TransactionPartnerOther {
|
|
175
183
|
/** Type of the transaction partner, always “other” */
|
|
@@ -177,7 +185,7 @@ export interface TransactionPartnerOther {
|
|
|
177
185
|
}
|
|
178
186
|
/** Describes a Telegram Star transaction. */
|
|
179
187
|
export interface StarTransaction {
|
|
180
|
-
/** Unique identifier of the transaction. Coincides with the
|
|
188
|
+
/** Unique identifier of the transaction. Coincides with the identifier of the original transaction for refund transactions. Coincides with SuccessfulPayment.telegram_payment_charge_id for successful incoming payments from users. */
|
|
181
189
|
id: string;
|
|
182
190
|
/** Number of Telegram Stars transferred by the transaction */
|
|
183
191
|
amount: number;
|