@grammyjs/types 3.10.0 → 3.11.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/message.d.ts +4 -1
- package/package.json +1 -1
- package/payment.d.ts +13 -0
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/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 */
|