@grammyjs/types 3.8.1 → 3.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/markup.d.ts +1 -1
- package/methods.d.ts +43 -22
- package/package.json +1 -1
- package/payment.d.ts +68 -0
package/markup.d.ts
CHANGED
|
@@ -15,7 +15,7 @@ export declare namespace InlineKeyboardButton {
|
|
|
15
15
|
url: string;
|
|
16
16
|
}
|
|
17
17
|
interface CallbackButton extends AbstractInlineKeyboardButton {
|
|
18
|
-
/** Data to be sent in a callback query to the bot when button is pressed, 1-64 bytes
|
|
18
|
+
/** Data to be sent in a callback query to the bot when the button is pressed, 1-64 bytes */
|
|
19
19
|
callback_data: string;
|
|
20
20
|
}
|
|
21
21
|
interface WebAppButton extends AbstractInlineKeyboardButton {
|
package/methods.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ import type { ChatFullInfo } from "./manage.js";
|
|
|
4
4
|
import type { ForceReply, InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove } from "./markup.js";
|
|
5
5
|
import type { File, GameHighScore, InputPollOption, LinkPreviewOptions, MaskPosition, Message, MessageEntity, MessageId, ParseMode, Poll, ReactionType, ReplyParameters, SentWebAppMessage, Sticker, StickerSet } from "./message.js";
|
|
6
6
|
import type { PassportElementError } from "./passport.js";
|
|
7
|
-
import type { LabeledPrice, ShippingOption } from "./payment.js";
|
|
7
|
+
import type { LabeledPrice, ShippingOption, StarTransactions } from "./payment.js";
|
|
8
8
|
import type { BotCommandScope, BotDescription, BotName, BotShortDescription, MenuButton } from "./settings.js";
|
|
9
9
|
import type { Update } from "./update.js";
|
|
10
10
|
import type { LanguageCode } from "./langs.js";
|
|
@@ -94,7 +94,7 @@ 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
|
-
/** Unique identifier of the message effect to be added to the message */
|
|
97
|
+
/** Unique identifier of the message effect to be added to the message; for private chats only */
|
|
98
98
|
message_effect_id?: string;
|
|
99
99
|
/** Description of the message to reply to */
|
|
100
100
|
reply_parameters?: ReplyParameters;
|
|
@@ -203,7 +203,7 @@ export type ApiMethods<F> = {
|
|
|
203
203
|
disable_notification?: boolean;
|
|
204
204
|
/** Protects the contents of the sent message from forwarding and saving */
|
|
205
205
|
protect_content?: boolean;
|
|
206
|
-
/** Unique identifier of the message effect to be added to the message */
|
|
206
|
+
/** Unique identifier of the message effect to be added to the message; for private chats only */
|
|
207
207
|
message_effect_id?: string;
|
|
208
208
|
/** Description of the message to reply to */
|
|
209
209
|
reply_parameters?: ReplyParameters;
|
|
@@ -242,7 +242,7 @@ export type ApiMethods<F> = {
|
|
|
242
242
|
disable_notification?: boolean;
|
|
243
243
|
/** Protects the contents of the sent message from forwarding and saving */
|
|
244
244
|
protect_content?: boolean;
|
|
245
|
-
/** Unique identifier of the message effect to be added to the message */
|
|
245
|
+
/** Unique identifier of the message effect to be added to the message; for private chats only */
|
|
246
246
|
message_effect_id?: string;
|
|
247
247
|
/** Description of the message to reply to */
|
|
248
248
|
reply_parameters?: ReplyParameters;
|
|
@@ -275,7 +275,7 @@ export type ApiMethods<F> = {
|
|
|
275
275
|
disable_notification?: boolean;
|
|
276
276
|
/** Protects the contents of the sent message from forwarding and saving */
|
|
277
277
|
protect_content?: boolean;
|
|
278
|
-
/** Unique identifier of the message effect to be added to the message */
|
|
278
|
+
/** Unique identifier of the message effect to be added to the message; for private chats only */
|
|
279
279
|
message_effect_id?: string;
|
|
280
280
|
/** Description of the message to reply to */
|
|
281
281
|
reply_parameters?: ReplyParameters;
|
|
@@ -318,7 +318,7 @@ export type ApiMethods<F> = {
|
|
|
318
318
|
disable_notification?: boolean;
|
|
319
319
|
/** Protects the contents of the sent message from forwarding and saving */
|
|
320
320
|
protect_content?: boolean;
|
|
321
|
-
/** Unique identifier of the message effect to be added to the message */
|
|
321
|
+
/** Unique identifier of the message effect to be added to the message; for private chats only */
|
|
322
322
|
message_effect_id?: string;
|
|
323
323
|
/** Description of the message to reply to */
|
|
324
324
|
reply_parameters?: ReplyParameters;
|
|
@@ -359,7 +359,7 @@ export type ApiMethods<F> = {
|
|
|
359
359
|
disable_notification?: boolean;
|
|
360
360
|
/** Protects the contents of the sent message from forwarding and saving */
|
|
361
361
|
protect_content?: boolean;
|
|
362
|
-
/** Unique identifier of the message effect to be added to the message */
|
|
362
|
+
/** Unique identifier of the message effect to be added to the message; for private chats only */
|
|
363
363
|
message_effect_id?: string;
|
|
364
364
|
/** Description of the message to reply to */
|
|
365
365
|
reply_parameters?: ReplyParameters;
|
|
@@ -390,7 +390,7 @@ export type ApiMethods<F> = {
|
|
|
390
390
|
disable_notification?: boolean;
|
|
391
391
|
/** Protects the contents of the sent message from forwarding and saving */
|
|
392
392
|
protect_content?: boolean;
|
|
393
|
-
/** Unique identifier of the message effect to be added to the message */
|
|
393
|
+
/** Unique identifier of the message effect to be added to the message; for private chats only */
|
|
394
394
|
message_effect_id?: string;
|
|
395
395
|
/** Description of the message to reply to */
|
|
396
396
|
reply_parameters?: ReplyParameters;
|
|
@@ -420,7 +420,7 @@ export type ApiMethods<F> = {
|
|
|
420
420
|
disable_notification?: boolean;
|
|
421
421
|
/** Protects the contents of the sent message from forwarding and saving */
|
|
422
422
|
protect_content?: boolean;
|
|
423
|
-
/** Unique identifier of the message effect to be added to the message */
|
|
423
|
+
/** Unique identifier of the message effect to be added to the message; for private chats only */
|
|
424
424
|
message_effect_id?: string;
|
|
425
425
|
/** Description of the message to reply to */
|
|
426
426
|
reply_parameters?: ReplyParameters;
|
|
@@ -443,7 +443,7 @@ export type ApiMethods<F> = {
|
|
|
443
443
|
disable_notification?: boolean;
|
|
444
444
|
/** Protects the contents of the sent messages from forwarding and saving */
|
|
445
445
|
protect_content?: boolean;
|
|
446
|
-
/** Unique identifier of the message effect to be added to the message */
|
|
446
|
+
/** Unique identifier of the message effect to be added to the message; for private chats only */
|
|
447
447
|
message_effect_id?: string;
|
|
448
448
|
/** Description of the message to reply to */
|
|
449
449
|
reply_parameters?: ReplyParameters;
|
|
@@ -474,7 +474,7 @@ export type ApiMethods<F> = {
|
|
|
474
474
|
disable_notification?: boolean;
|
|
475
475
|
/** Protects the contents of the sent message from forwarding and saving */
|
|
476
476
|
protect_content?: boolean;
|
|
477
|
-
/** Unique identifier of the message effect to be added to the message */
|
|
477
|
+
/** Unique identifier of the message effect to be added to the message; for private chats only */
|
|
478
478
|
message_effect_id?: string;
|
|
479
479
|
/** Description of the message to reply to */
|
|
480
480
|
reply_parameters?: ReplyParameters;
|
|
@@ -485,6 +485,8 @@ export type ApiMethods<F> = {
|
|
|
485
485
|
}): Message.LocationMessage;
|
|
486
486
|
/** Use this method to edit live location messages. A location can be edited until its live_period expires or editing is explicitly disabled by a call to stopMessageLiveLocation. On success, if the edited message is not an inline message, the edited Message is returned, otherwise True is returned. */
|
|
487
487
|
editMessageLiveLocation(args: {
|
|
488
|
+
/** Unique identifier of the business connection on behalf of which the message to be edited was sent */
|
|
489
|
+
business_connection_id?: string;
|
|
488
490
|
/** Required if inline_message_id is not specified. Unique identifier for the target chat or username of the target channel (in the format @channelusername) */
|
|
489
491
|
chat_id?: number | string;
|
|
490
492
|
/** Required if inline_message_id is not specified. Identifier of the message to edit */
|
|
@@ -508,6 +510,8 @@ export type ApiMethods<F> = {
|
|
|
508
510
|
}): (Update.Edited & Message.LocationMessage) | true;
|
|
509
511
|
/** Use this method to stop updating a live location message before live_period expires. On success, if the message is not an inline message, the edited Message is returned, otherwise True is returned. */
|
|
510
512
|
stopMessageLiveLocation(args: {
|
|
513
|
+
/** Unique identifier of the business connection on behalf of which the message to be edited was sent */
|
|
514
|
+
business_connection_id?: string;
|
|
511
515
|
/** Required if inline_message_id is not specified. Unique identifier for the target chat or username of the target channel (in the format @channelusername) */
|
|
512
516
|
chat_id?: number | string;
|
|
513
517
|
/** Required if inline_message_id is not specified. Identifier of the message with live location to stop */
|
|
@@ -545,7 +549,7 @@ export type ApiMethods<F> = {
|
|
|
545
549
|
disable_notification?: boolean;
|
|
546
550
|
/** Protects the contents of the sent message from forwarding and saving */
|
|
547
551
|
protect_content?: boolean;
|
|
548
|
-
/** Unique identifier of the message effect to be added to the message */
|
|
552
|
+
/** Unique identifier of the message effect to be added to the message; for private chats only */
|
|
549
553
|
message_effect_id?: string;
|
|
550
554
|
/** Description of the message to reply to */
|
|
551
555
|
reply_parameters?: ReplyParameters;
|
|
@@ -574,7 +578,7 @@ export type ApiMethods<F> = {
|
|
|
574
578
|
disable_notification?: boolean;
|
|
575
579
|
/** Protects the contents of the sent message from forwarding and saving */
|
|
576
580
|
protect_content?: boolean;
|
|
577
|
-
/** Unique identifier of the message effect to be added to the message */
|
|
581
|
+
/** Unique identifier of the message effect to be added to the message; for private chats only */
|
|
578
582
|
message_effect_id?: string;
|
|
579
583
|
/** Description of the message to reply to */
|
|
580
584
|
reply_parameters?: ReplyParameters;
|
|
@@ -623,7 +627,7 @@ export type ApiMethods<F> = {
|
|
|
623
627
|
disable_notification?: boolean;
|
|
624
628
|
/** Protects the contents of the sent message from forwarding and saving */
|
|
625
629
|
protect_content?: boolean;
|
|
626
|
-
/** Unique identifier of the message effect to be added to the message */
|
|
630
|
+
/** Unique identifier of the message effect to be added to the message; for private chats only */
|
|
627
631
|
message_effect_id?: string;
|
|
628
632
|
/** Description of the message to reply to */
|
|
629
633
|
reply_parameters?: ReplyParameters;
|
|
@@ -646,7 +650,7 @@ export type ApiMethods<F> = {
|
|
|
646
650
|
disable_notification?: boolean;
|
|
647
651
|
/** Protects the contents of the sent message from forwarding */
|
|
648
652
|
protect_content?: boolean;
|
|
649
|
-
/** Unique identifier of the message effect to be added to the message */
|
|
653
|
+
/** Unique identifier of the message effect to be added to the message; for private chats only */
|
|
650
654
|
message_effect_id?: string;
|
|
651
655
|
/** Description of the message to reply to */
|
|
652
656
|
reply_parameters?: ReplyParameters;
|
|
@@ -1143,8 +1147,10 @@ export type ApiMethods<F> = {
|
|
|
1143
1147
|
/** Pass True to get default administrator rights of the bot in channels. Otherwise, default administrator rights of the bot for groups and supergroups will be returned. */
|
|
1144
1148
|
for_channels?: boolean;
|
|
1145
1149
|
}): ChatAdministratorRights;
|
|
1146
|
-
/** Use this method to edit text and game messages. On success, if the edited message is not an inline message, the edited Message is returned, otherwise True is returned. */
|
|
1150
|
+
/** Use this method to edit text and game messages. 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. */
|
|
1147
1151
|
editMessageText(args: {
|
|
1152
|
+
/** Unique identifier of the business connection on behalf of which the message to be edited was sent */
|
|
1153
|
+
business_connection_id?: string;
|
|
1148
1154
|
/** Required if inline_message_id is not specified. Unique identifier for the target chat or username of the target channel (in the format @channelusername) */
|
|
1149
1155
|
chat_id?: number | string;
|
|
1150
1156
|
/** Required if inline_message_id is not specified. Identifier of the message to edit */
|
|
@@ -1162,8 +1168,10 @@ export type ApiMethods<F> = {
|
|
|
1162
1168
|
/** An object for an inline keyboard. */
|
|
1163
1169
|
reply_markup?: InlineKeyboardMarkup;
|
|
1164
1170
|
}): (Update.Edited & Message.TextMessage) | true;
|
|
1165
|
-
/** Use this method to edit captions of messages. On success, if the edited message is not an inline message, the edited Message is returned, otherwise True is returned. */
|
|
1171
|
+
/** Use this method to edit captions of messages. 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. */
|
|
1166
1172
|
editMessageCaption(args: {
|
|
1173
|
+
/** Unique identifier of the business connection on behalf of which the message to be edited was sent */
|
|
1174
|
+
business_connection_id?: string;
|
|
1167
1175
|
/** Required if inline_message_id is not specified. Unique identifier for the target chat or username of the target channel (in the format @channelusername) */
|
|
1168
1176
|
chat_id?: number | string;
|
|
1169
1177
|
/** Required if inline_message_id is not specified. Identifier of the message to edit */
|
|
@@ -1181,8 +1189,10 @@ export type ApiMethods<F> = {
|
|
|
1181
1189
|
/** An object for an inline keyboard. */
|
|
1182
1190
|
reply_markup?: InlineKeyboardMarkup;
|
|
1183
1191
|
}): (Update.Edited & Message.CaptionableMessage) | true;
|
|
1184
|
-
/** 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. */
|
|
1192
|
+
/** 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. */
|
|
1185
1193
|
editMessageMedia(args: {
|
|
1194
|
+
/** Unique identifier of the business connection on behalf of which the message to be edited was sent */
|
|
1195
|
+
business_connection_id?: string;
|
|
1186
1196
|
/** Required if inline_message_id is not specified. Unique identifier for the target chat or username of the target channel (in the format @channelusername) */
|
|
1187
1197
|
chat_id?: number | string;
|
|
1188
1198
|
/** Required if inline_message_id is not specified. Identifier of the message to edit */
|
|
@@ -1194,8 +1204,10 @@ export type ApiMethods<F> = {
|
|
|
1194
1204
|
/** An object for a new inline keyboard. */
|
|
1195
1205
|
reply_markup?: InlineKeyboardMarkup;
|
|
1196
1206
|
}): (Update.Edited & Message) | true;
|
|
1197
|
-
/** Use this method to edit only the reply markup of messages. On success, if the edited message is not an inline message, the edited Message is returned, otherwise True is returned. */
|
|
1207
|
+
/** Use this method to edit only the reply markup of messages. 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. */
|
|
1198
1208
|
editMessageReplyMarkup(args: {
|
|
1209
|
+
/** Unique identifier of the business connection on behalf of which the message to be edited was sent */
|
|
1210
|
+
business_connection_id?: string;
|
|
1199
1211
|
/** Required if inline_message_id is not specified. Unique identifier for the target chat or username of the target channel (in the format @channelusername) */
|
|
1200
1212
|
chat_id?: number | string;
|
|
1201
1213
|
/** Required if inline_message_id is not specified. Identifier of the message to edit */
|
|
@@ -1207,6 +1219,8 @@ export type ApiMethods<F> = {
|
|
|
1207
1219
|
}): (Update.Edited & Message) | true;
|
|
1208
1220
|
/** Use this method to stop a poll which was sent by the bot. On success, the stopped Poll is returned. */
|
|
1209
1221
|
stopPoll(args: {
|
|
1222
|
+
/** Unique identifier of the business connection on behalf of which the message to be edited was sent */
|
|
1223
|
+
business_connection_id?: string;
|
|
1210
1224
|
/** Unique identifier for the target chat or username of the target channel (in the format @channelusername) */
|
|
1211
1225
|
chat_id: number | string;
|
|
1212
1226
|
/** Identifier of the original message with the poll */
|
|
@@ -1253,7 +1267,7 @@ export type ApiMethods<F> = {
|
|
|
1253
1267
|
disable_notification?: boolean;
|
|
1254
1268
|
/** Protects the contents of the sent message from forwarding and saving */
|
|
1255
1269
|
protect_content?: boolean;
|
|
1256
|
-
/** Unique identifier of the message effect to be added to the message */
|
|
1270
|
+
/** Unique identifier of the message effect to be added to the message; for private chats only */
|
|
1257
1271
|
message_effect_id?: string;
|
|
1258
1272
|
/** Description of the message to reply to */
|
|
1259
1273
|
reply_parameters?: ReplyParameters;
|
|
@@ -1456,7 +1470,7 @@ export type ApiMethods<F> = {
|
|
|
1456
1470
|
disable_notification?: boolean;
|
|
1457
1471
|
/** Protects the contents of the sent message from forwarding and saving */
|
|
1458
1472
|
protect_content?: boolean;
|
|
1459
|
-
/** Unique identifier of the message effect to be added to the message */
|
|
1473
|
+
/** Unique identifier of the message effect to be added to the message; for private chats only */
|
|
1460
1474
|
message_effect_id?: string;
|
|
1461
1475
|
/** Description of the message to reply to */
|
|
1462
1476
|
reply_parameters?: ReplyParameters;
|
|
@@ -1528,6 +1542,13 @@ export type ApiMethods<F> = {
|
|
|
1528
1542
|
/** Required if ok is False. Error message in human readable form that explains the reason for failure to proceed with the checkout (e.g. "Sorry, somebody just bought the last of our amazing black T-shirts while you were busy filling out your payment details. Please choose a different color or garment!"). Telegram will display this message to the user. */
|
|
1529
1543
|
error_message?: string;
|
|
1530
1544
|
}): true;
|
|
1545
|
+
/** Returns the bot's Telegram Star transactions in chronological order. On success, returns a StarTransactions object. */
|
|
1546
|
+
getStarTransactions(args: {
|
|
1547
|
+
/** Number of transactions to skip in the response */
|
|
1548
|
+
offset?: number;
|
|
1549
|
+
/** The maximum number of transactions to be retrieved. Values between 1-100 are accepted. Defaults to 100. */
|
|
1550
|
+
limit?: number;
|
|
1551
|
+
}): StarTransactions;
|
|
1531
1552
|
/** Refunds a successful payment in Telegram Stars. Returns True on success. */
|
|
1532
1553
|
refundStarPayment(args: {
|
|
1533
1554
|
/** Identifier of the user whose payment will be refunded */
|
|
@@ -1558,7 +1579,7 @@ export type ApiMethods<F> = {
|
|
|
1558
1579
|
disable_notification?: boolean;
|
|
1559
1580
|
/** Protects the contents of the sent message from forwarding and saving */
|
|
1560
1581
|
protect_content?: boolean;
|
|
1561
|
-
/** Unique identifier of the message effect to be added to the message */
|
|
1582
|
+
/** Unique identifier of the message effect to be added to the message; for private chats only */
|
|
1562
1583
|
message_effect_id?: string;
|
|
1563
1584
|
/** Description of the message to reply to */
|
|
1564
1585
|
reply_parameters?: ReplyParameters;
|
package/package.json
CHANGED
package/payment.d.ts
CHANGED
|
@@ -99,3 +99,71 @@ export interface PreCheckoutQuery {
|
|
|
99
99
|
/** Order information provided by the user */
|
|
100
100
|
order_info?: OrderInfo;
|
|
101
101
|
}
|
|
102
|
+
/** This object describes the state of a revenue withdrawal operation. Currently, it can be one of
|
|
103
|
+
|
|
104
|
+
- RevenueWithdrawalStatePending
|
|
105
|
+
- RevenueWithdrawalStateSucceeded
|
|
106
|
+
- RevenueWithdrawalStateFailed */
|
|
107
|
+
export type RevenueWithdrawalState = RevenueWithdrawalStatePending | RevenueWithdrawalStateSucceeded | RevenueWithdrawalStateFailed;
|
|
108
|
+
/** The withdrawal is in progress. */
|
|
109
|
+
export interface RevenueWithdrawalStatePending {
|
|
110
|
+
/** Type of the state, always “pending” */
|
|
111
|
+
type: "pending";
|
|
112
|
+
}
|
|
113
|
+
/** The withdrawal succeeded. */
|
|
114
|
+
export interface RevenueWithdrawalStateSucceeded {
|
|
115
|
+
/** Type of the state, always “succeeded” */
|
|
116
|
+
type: "succeeded";
|
|
117
|
+
/** Date the withdrawal was completed in Unix time */
|
|
118
|
+
date: number;
|
|
119
|
+
/** An HTTPS URL that can be used to see transaction details */
|
|
120
|
+
url: string;
|
|
121
|
+
}
|
|
122
|
+
/** The withdrawal failed and the transaction was refunded. */
|
|
123
|
+
export interface RevenueWithdrawalStateFailed {
|
|
124
|
+
/** Type of the state, always “failed” */
|
|
125
|
+
type: "failed";
|
|
126
|
+
}
|
|
127
|
+
/** This object describes the source of a transaction, or its recipient for outgoing transactions. Currently, it can be one of
|
|
128
|
+
|
|
129
|
+
- TransactionPartnerFragment
|
|
130
|
+
- TransactionPartnerUser
|
|
131
|
+
- TransactionPartnerOther */
|
|
132
|
+
export type TransactionPartner = TransactionPartnerFragment | TransactionPartnerUser | TransactionPartnerOther;
|
|
133
|
+
/** Describes a withdrawal transaction with Fragment. */
|
|
134
|
+
export interface TransactionPartnerFragment {
|
|
135
|
+
/** Type of the transaction partner, always “fragment” */
|
|
136
|
+
type: "fragment";
|
|
137
|
+
/** State of the transaction if the transaction is outgoing */
|
|
138
|
+
withdrawal_state?: RevenueWithdrawalState;
|
|
139
|
+
}
|
|
140
|
+
/** Describes a transaction with a user. */
|
|
141
|
+
export interface TransactionPartnerUser {
|
|
142
|
+
/** Type of the transaction partner, always “user” */
|
|
143
|
+
type: "user";
|
|
144
|
+
/** Information about the user */
|
|
145
|
+
user: User;
|
|
146
|
+
}
|
|
147
|
+
/** Describes a transaction with an unknown source or recipient. */
|
|
148
|
+
export interface TransactionPartnerOther {
|
|
149
|
+
/** Type of the transaction partner, always “other” */
|
|
150
|
+
type: "other";
|
|
151
|
+
}
|
|
152
|
+
/** Describes a Telegram Star transaction. */
|
|
153
|
+
export interface StarTransaction {
|
|
154
|
+
/** Unique identifier of the transaction. Coincides with the identifer of the original transaction for refund transactions. Coincides with SuccessfulPayment.telegram_payment_charge_id for successful incoming payments from users. */
|
|
155
|
+
id: string;
|
|
156
|
+
/** Number of Telegram Stars transferred by the transaction */
|
|
157
|
+
amount: number;
|
|
158
|
+
/** Date the transaction was created in Unix time */
|
|
159
|
+
date: number;
|
|
160
|
+
/** Source of an incoming transaction (e.g., a user purchasing goods or services, Fragment refunding a failed withdrawal). Only for incoming transactions */
|
|
161
|
+
source?: TransactionPartner;
|
|
162
|
+
/** Receiver of an outgoing transaction (e.g., a user for a purchase refund, Fragment for a withdrawal). Only for outgoing transactions */
|
|
163
|
+
receiver?: TransactionPartner;
|
|
164
|
+
}
|
|
165
|
+
/** Contains a list of Telegram Star transactions. */
|
|
166
|
+
export interface StarTransactions {
|
|
167
|
+
/** The list of transactions */
|
|
168
|
+
transactions: StarTransaction[];
|
|
169
|
+
}
|