@grammyjs/types 3.10.0 → 3.11.1
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/manage.d.ts +3 -3
- package/message.d.ts +4 -1
- package/methods.d.ts +1 -1
- package/package.json +1 -1
- package/payment.d.ts +13 -0
package/manage.d.ts
CHANGED
|
@@ -224,7 +224,7 @@ export declare namespace ChatFullInfo {
|
|
|
224
224
|
/** Type of the chat, can be either “private”, “group”, “supergroup” or “channel” */
|
|
225
225
|
type: "group";
|
|
226
226
|
/** Title, for supergroups, channels and group chats */
|
|
227
|
-
title
|
|
227
|
+
title: string;
|
|
228
228
|
/** Username, for private chats, supergroups and channels if available */
|
|
229
229
|
username?: undefined;
|
|
230
230
|
/** First name of the other party in a private chat */
|
|
@@ -315,7 +315,7 @@ export declare namespace ChatFullInfo {
|
|
|
315
315
|
/** Type of the chat, can be either “private”, “group”, “supergroup” or “channel” */
|
|
316
316
|
type: "supergroup";
|
|
317
317
|
/** Title, for supergroups, channels and group chats */
|
|
318
|
-
title
|
|
318
|
+
title: string;
|
|
319
319
|
/** Username, for private chats, supergroups and channels if available */
|
|
320
320
|
username?: string;
|
|
321
321
|
/** First name of the other party in a private chat */
|
|
@@ -406,7 +406,7 @@ export declare namespace ChatFullInfo {
|
|
|
406
406
|
/** Type of the chat, can be either “private”, “group”, “supergroup” or “channel” */
|
|
407
407
|
type: "channel";
|
|
408
408
|
/** Title, for supergroups, channels and group chats */
|
|
409
|
-
title
|
|
409
|
+
title: string;
|
|
410
410
|
/** Username, for private chats, supergroups and channels if available */
|
|
411
411
|
username?: string;
|
|
412
412
|
/** First name of the other party in a private chat */
|
package/message.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Chat, User } from "./manage.js";
|
|
2
2
|
import type { InlineKeyboardMarkup } from "./markup.js";
|
|
3
3
|
import type { PassportData } from "./passport.js";
|
|
4
|
-
import type { Invoice, SuccessfulPayment } from "./payment.js";
|
|
4
|
+
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 {
|
|
@@ -101,6 +101,7 @@ export declare namespace Message {
|
|
|
101
101
|
type PinnedMessageMessage = ServiceMessage & MsgWith<"pinned_message">;
|
|
102
102
|
type InvoiceMessage = ServiceMessage & MsgWith<"invoice">;
|
|
103
103
|
type SuccessfulPaymentMessage = ServiceMessage & MsgWith<"successful_payment">;
|
|
104
|
+
type RefundedPaymentMessage = ServiceMessage & MsgWith<"refunded_payment">;
|
|
104
105
|
type UsersSharedMessage = ServiceMessage & MsgWith<"users_shared">;
|
|
105
106
|
type ChatSharedMessage = ServiceMessage & MsgWith<"chat_shared">;
|
|
106
107
|
type ConnectedWebsiteMessage = ServiceMessage & MsgWith<"connected_website">;
|
|
@@ -193,6 +194,8 @@ export interface Message extends Message.MediaMessage {
|
|
|
193
194
|
invoice?: Invoice;
|
|
194
195
|
/** Message is a service message about a successful payment, information about the payment. More about payments » */
|
|
195
196
|
successful_payment?: SuccessfulPayment;
|
|
197
|
+
/** Message is a service message about a refunded payment, information about the payment. More about payments » */
|
|
198
|
+
refunded_payment?: RefundedPayment;
|
|
196
199
|
/** Service message: users were shared with the bot */
|
|
197
200
|
users_shared?: UsersShared;
|
|
198
201
|
/** Service message: a chat was shared with the bot */
|
package/methods.d.ts
CHANGED
|
@@ -1406,7 +1406,7 @@ export type ApiMethods<F> = {
|
|
|
1406
1406
|
name: string;
|
|
1407
1407
|
/** User identifier of the sticker set owner */
|
|
1408
1408
|
user_id: number;
|
|
1409
|
-
/** 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#
|
|
1409
|
+
/** 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. */
|
|
1410
1410
|
thumbnail?: F | string;
|
|
1411
1411
|
/** 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 */
|
|
1412
1412
|
format: "static" | "animated" | "video";
|
package/package.json
CHANGED
package/payment.d.ts
CHANGED
|
@@ -71,6 +71,19 @@ export interface SuccessfulPayment {
|
|
|
71
71
|
/** Provider payment identifier */
|
|
72
72
|
provider_payment_charge_id: string;
|
|
73
73
|
}
|
|
74
|
+
/** This object contains basic information about a refunded payment. */
|
|
75
|
+
export interface RefundedPayment {
|
|
76
|
+
/** Three-letter ISO 4217 currency code, or “XTR” for payments in Telegram Stars. Currently, always “XTR” */
|
|
77
|
+
currency: string;
|
|
78
|
+
/** Total refunded price in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45, total_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). */
|
|
79
|
+
total_amount: number;
|
|
80
|
+
/** Bot-specified invoice payload */
|
|
81
|
+
invoice_payload: string;
|
|
82
|
+
/** Telegram payment identifier */
|
|
83
|
+
telegram_payment_charge_id: string;
|
|
84
|
+
/** Provider payment identifier */
|
|
85
|
+
provider_payment_charge_id?: string;
|
|
86
|
+
}
|
|
74
87
|
/** This object contains information about an incoming shipping query. */
|
|
75
88
|
export interface ShippingQuery {
|
|
76
89
|
/** Unique query identifier */
|