@telegram.ts/types 1.11.0 → 1.12.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@telegram.ts/types",
3
- "version": "1.11.0",
3
+ "version": "1.12.1",
4
4
  "description": "Comprehensive Type Declarations for Telegram Bot API with telegramsjs",
5
5
  "main": "./src/index.js",
6
6
  "types": "./src/index.d.ts",
@@ -190,7 +190,7 @@ export type ApiMethods = {
190
190
  protect_content?: boolean;
191
191
  }): MessageId[];
192
192
 
193
- /** Use this method to copy messages of any kind. Service messages, giveaway messages, giveaway winners messages, and invoice messages can't be copied. A quiz poll can be copied only if the value of the field correct_option_id is known to the bot. The method is analogous to the method forwardMessage, but the copied message doesn't have a link to the original message. Returns the MessageId of the sent message on success. */
193
+ /** Use this method to copy messages of any kind. Service messages, paid media messages, giveaway messages, giveaway winners messages, and invoice messages can't be copied. A quiz poll can be copied only if the value of the field correct_option_id is known to the bot. The method is analogous to the method forwardMessage, but the copied message doesn't have a link to the original message. Returns the MessageId of the sent message on success. */
194
194
  copyMessage(args: {
195
195
  /** Unique identifier for the target chat or username of the target channel (in the format @channelusername) */
196
196
  chat_id: number | string;
@@ -224,7 +224,7 @@ export type ApiMethods = {
224
224
  reply_to_message_id?: number;
225
225
  }): MessageId;
226
226
 
227
- /** Use this method to copy messages of any kind. If some of the specified messages can't be found or copied, they are skipped. Service messages, giveaway messages, giveaway winners messages, and invoice messages can't be copied. A quiz poll can be copied only if the value of the field correct_option_id is known to the bot. The method is analogous to the method forwardMessages, but the copied messages don't have a link to the original message. Album grouping is kept for copied messages. On success, an array of MessageId of the sent messages is returned. */
227
+ /** Use this method to copy messages of any kind. If some of the specified messages can't be found or copied, they are skipped. Service messages, paid media messages, giveaway messages, giveaway winners messages, and invoice messages can't be copied. A quiz poll can be copied only if the value of the field correct_option_id is known to the bot. The method is analogous to the method forwardMessages, but the copied messages don't have a link to the original message. Album grouping is kept for copied messages. On success, an array of MessageId of the sent messages is returned. */
228
228
  copyMessages(args: {
229
229
  /** Unique identifier for the target chat or username of the target channel (in the format @channelusername) */
230
230
  chat_id: number | string;
@@ -634,6 +634,36 @@ export type ApiMethods = {
634
634
  reply_markup?: InlineKeyboardMarkup;
635
635
  }): (Update.Edited & Message.LocationMessage) | true;
636
636
 
637
+ /** Use this method to send paid media to channel chats. On success, the sent Message is returned. */
638
+ sendPaidMedia(args: {
639
+ /** Unique identifier for the target chat or username of the target channel (in the format @channelusername) */
640
+ chat_id: number | string;
641
+ /** The number of Telegram Stars that must be paid to buy access to the media */
642
+ star_count: number;
643
+ /** An array describing the media to be sent; up to 10 items */
644
+ media: InputPaidMedia[];
645
+ /** Media caption, 0-1024 characters after entities parsing */
646
+ caption?: string;
647
+ /** Mode for parsing entities in the media caption. See formatting options for more details. */
648
+ parse_mode?: string;
649
+ /** A list of special entities that appear in the caption, which can be specified instead of parse_mode */
650
+ caption_entities?: MessageEntity[];
651
+ /** Pass True, if the caption must be shown above the message media */
652
+ show_caption_above_media?: boolean;
653
+ /** Sends the message silently. Users will receive a notification with no sound. */
654
+ disable_notification?: boolean;
655
+ /** Protects the contents of the sent message from forwarding and saving */
656
+ protect_content?: boolean;
657
+ /** Description of the message to reply to */
658
+ reply_parameters?: ReplyParameters;
659
+ /** 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 */
660
+ reply_markup?:
661
+ | InlineKeyboardMarkup
662
+ | ReplyKeyboardMarkup
663
+ | ReplyKeyboardRemove
664
+ | ForceReply;
665
+ }): Message.PaidMediaMessage;
666
+
637
667
  /** Use this method to send information about a venue. On success, the sent Message is returned. */
638
668
  sendVenue(args: {
639
669
  /** Unique identifier of the business connection on behalf of which the message will be sent */
@@ -2008,3 +2038,34 @@ export interface InputMediaDocument {
2008
2038
  /** Disables automatic server-side content type detection for files uploaded using multipart/form-data. Always true, if the document is sent as part of an album. */
2009
2039
  disable_content_type_detection?: boolean;
2010
2040
  }
2041
+
2042
+ /** This object describes the paid media to be sent. Currently, it can be one of
2043
+ - InputPaidMediaPhoto
2044
+ - InputPaidMediaVideo */
2045
+ export type InputPaidMedia = InputMediaPhoto | InputPaidMediaVideo;
2046
+
2047
+ /** The paid media to send is a photo. */
2048
+ export interface InputPaidMediaPhoto {
2049
+ /** Type of the media, must be photo */
2050
+ type: "photo";
2051
+ /** File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass “attach://<file_attach_name>” to upload a new one using multipart/form-data under <file_attach_name> name. More information on Sending Files » */
2052
+ media: Buffer | ReadStream | string;
2053
+ }
2054
+
2055
+ /** The paid media to send is a video. */
2056
+ export interface InputPaidMediaVideo {
2057
+ /** Type of the media, must be video */
2058
+ type: "video";
2059
+ /** File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass “attach://<file_attach_name>” to upload a new one using multipart/form-data under <file_attach_name> name. More information on Sending Files » */
2060
+ media: Buffer | ReadStream | string;
2061
+ /** Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass “attach://<file_attach_name>” if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. More information on Sending Files » */
2062
+ thumbnail?: Buffer | ReadStream | string;
2063
+ /** Video width */
2064
+ width?: number;
2065
+ /** Video height */
2066
+ height?: number;
2067
+ /** Video duration in seconds */
2068
+ duration?: number;
2069
+ /** Pass True if the uploaded video is suitable for streaming */
2070
+ supports_streaming?: boolean;
2071
+ }
@@ -56,10 +56,7 @@ export interface MenuButtonWebApp {
56
56
  type: "web_app";
57
57
  /** The text on the button. */
58
58
  text: string;
59
- /**
60
- * The description of the Web App that will be launched when the user presses the button.
61
- * The Web App will be able to send an arbitrary message on behalf of the user using the method answerWebAppQuery.
62
- */
59
+ /** Description of the Web App that will be launched when the user presses the button. The Web App will be able to send an arbitrary message on behalf of the user using the method answerWebAppQuery. Alternatively, a t.me link to a Web App can be specified in the object instead of the Web App's URL, in which case the Web App will be opened as if the user pressed the link. */
63
60
  web_app: WebAppInfo;
64
61
  }
65
62
 
@@ -1,150 +1,129 @@
1
1
  import type { User } from "./manageTypes";
2
2
 
3
- /**
4
- * This interface represents a labeled portion of the price for goods or services.
5
- */
3
+ /** This object represents a portion of the price for goods or services. */
6
4
  export interface LabeledPrice {
7
- /** The label of the portion. */
5
+ /** Portion label */
8
6
  label: string;
9
- /**
10
- * The price of the product in the smallest units of the currency (integer, not float/double).
11
- * For example, for a price of US$ 1.45, the amount would be 145.
12
- * See the 'exp' parameter in currencies.json for the number of digits past the decimal point for each currency
13
- * (2 for the majority of currencies).
14
- */
7
+ /** Price of the product in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass 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). */
15
8
  amount: number;
16
9
  }
17
10
 
18
- /**
19
- * This interface contains basic information about an invoice.
20
- */
11
+ /** This object contains basic information about an invoice. */
21
12
  export interface Invoice {
22
- /** The name of the product. */
13
+ /** Product name */
23
14
  title: string;
24
- /** The description of the product. */
15
+ /** Product description */
25
16
  description: string;
26
- /** A unique bot deep-linking parameter that can be used to generate this invoice. */
17
+ /** Unique bot deep-linking parameter that can be used to generate this invoice */
27
18
  start_parameter: string;
28
- /** Three-letter ISO 4217 currency code, or “XTR” for payments in Telegram Stars. */
19
+ /** Three-letter ISO 4217 currency code, or “XTR” for payments in Telegram Stars */
29
20
  currency: string;
30
- /**
31
- * The total price in the smallest units of the currency (integer, not float/double).
32
- * For example, for a price of US$ 1.45, the total_amount would be 145.
33
- * See the 'exp' parameter in currencies.json for the number of digits past the decimal point for each currency
34
- * (2 for the majority of currencies).
35
- */
21
+ /** Total price in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass 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). */
36
22
  total_amount: number;
37
23
  }
38
24
 
39
- /**
40
- * This interface represents a shipping address.
41
- */
25
+ /** This object represents a shipping address. */
42
26
  export interface ShippingAddress {
43
- /** The two-letter ISO 3166-1 alpha-2 country code. */
27
+ /** Two-letter ISO 3166-1 alpha-2 country code */
44
28
  country_code: string;
45
- /** The state, if applicable. */
29
+ /** State, if applicable */
46
30
  state: string;
47
- /** The city. */
31
+ /** City */
48
32
  city: string;
49
- /** The first line for the address. */
33
+ /** First line for the address */
50
34
  street_line1: string;
51
- /** The second line for the address. */
35
+ /** Second line for the address */
52
36
  street_line2: string;
53
- /** The address postal code. */
37
+ /** Address post code */
54
38
  post_code: string;
55
39
  }
56
40
 
57
- /**
58
- * This interface represents information about an order.
59
- */
41
+ /** This object represents information about an order. */
60
42
  export interface OrderInfo {
61
- /** The user's name. */
43
+ /** User name */
62
44
  name?: string;
63
- /** The user's phone number. */
45
+ /** User's phone number */
64
46
  phone_number?: string;
65
- /** The user's email. */
47
+ /** User email */
66
48
  email?: string;
67
- /** The user's shipping address. */
49
+ /** User shipping address */
68
50
  shipping_address?: ShippingAddress;
69
51
  }
70
52
 
71
- /**
72
- * This interface represents a shipping option.
73
- */
53
+ /** This object represents one shipping option. */
74
54
  export interface ShippingOption {
75
- /** The shipping option identifier. */
55
+ /** Shipping option identifier */
76
56
  id: string;
77
- /** The title of the option. */
57
+ /** Option title */
78
58
  title: string;
79
- /** The list of price portions. */
59
+ /** List of price portions */
80
60
  prices: LabeledPrice[];
81
61
  }
82
62
 
83
- /**
84
- * This interface contains basic information about a successful payment.
85
- */
63
+ /** This object contains basic information about a successful payment. */
86
64
  export interface SuccessfulPayment {
87
- /** Three-letter ISO 4217 currency code, or “XTR” for payments in Telegram Stars. */
65
+ /** Three-letter ISO 4217 currency code, or “XTR” for payments in Telegram Stars */
88
66
  currency: string;
89
- /**
90
- * The total price in the smallest units of the currency (integer, not float/double).
91
- * For example, for a price of US$ 1.45, the total_amount would be 145.
92
- * See the 'exp' parameter in currencies.json for the number of digits past the decimal point for each currency
93
- * (2 for the majority of currencies).
94
- */
67
+ /** Total price in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass 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). */
95
68
  total_amount: number;
96
- /** The bot-specified invoice payload. */
69
+ /** Bot specified invoice payload */
97
70
  invoice_payload: string;
98
- /** The identifier of the shipping option chosen by the user. */
71
+ /** Identifier of the shipping option chosen by the user */
99
72
  shipping_option_id?: string;
100
- /** The order information provided by the user. */
73
+ /** Order information provided by the user */
101
74
  order_info?: OrderInfo;
102
- /** The Telegram payment identifier. */
75
+ /** Telegram payment identifier */
103
76
  telegram_payment_charge_id: string;
104
- /** The provider payment identifier. */
77
+ /** Provider payment identifier */
105
78
  provider_payment_charge_id: string;
106
79
  }
107
80
 
108
- /**
109
- * This interface contains information about an incoming shipping query.
110
- */
81
+ /** This object contains basic information about a refunded payment. */
82
+ export interface RefundedPayment {
83
+ /** Three-letter ISO 4217 currency code, or “XTR” for payments in Telegram Stars. Currently, always “XTR” */
84
+ currency: string;
85
+ /** 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). */
86
+ total_amount: number;
87
+ /** Bot-specified invoice payload */
88
+ invoice_payload: string;
89
+ /** Telegram payment identifier */
90
+ telegram_payment_charge_id: string;
91
+ /** Provider payment identifier */
92
+ provider_payment_charge_id?: string;
93
+ }
94
+
95
+ /** This object contains information about an incoming shipping query. */
111
96
  export interface ShippingQuery {
112
- /** The unique query identifier. */
97
+ /** Unique query identifier */
113
98
  id: string;
114
- /** The user who sent the query. */
99
+ /** User who sent the query */
115
100
  from: User;
116
- /** The bot-specified invoice payload. */
101
+ /** Bot specified invoice payload */
117
102
  invoice_payload: string;
118
- /** The user-specified shipping address. */
103
+ /** User specified shipping address */
119
104
  shipping_address: ShippingAddress;
120
105
  }
121
106
 
122
- /**
123
- * This interface contains information about an incoming pre-checkout query.
124
- */
107
+ /** This object contains information about an incoming pre-checkout query. */
125
108
  export interface PreCheckoutQuery {
126
- /** The unique query identifier. */
109
+ /** Unique query identifier */
127
110
  id: string;
128
- /** The user who sent the query. */
111
+ /** User who sent the query */
129
112
  from: User;
130
- /** Three-letter ISO 4217 currency code, or “XTR” for payments in Telegram Stars. */
113
+ /** Three-letter ISO 4217 currency code, or “XTR” for payments in Telegram Stars */
131
114
  currency: string;
132
- /**
133
- * The total price in the smallest units of the currency (integer, not float/double).
134
- * For example, for a price of US$ 1.45, the total_amount would be 145.
135
- * See the 'exp' parameter in currencies.json for the number of digits past the decimal point for each currency
136
- * (2 for the majority of currencies).
137
- */
115
+ /** Total price in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass 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). */
138
116
  total_amount: number;
139
- /** The bot-specified invoice payload. */
117
+ /** Bot specified invoice payload */
140
118
  invoice_payload: string;
141
- /** The identifier of the shipping option chosen by the user. */
119
+ /** Identifier of the shipping option chosen by the user */
142
120
  shipping_option_id?: string;
143
- /** The order information provided by the user. */
121
+ /** Order information provided by the user */
144
122
  order_info?: OrderInfo;
145
123
  }
146
124
 
147
125
  /** This object describes the state of a revenue withdrawal operation. Currently, it can be one of
126
+
148
127
  - RevenueWithdrawalStatePending
149
128
  - RevenueWithdrawalStateSucceeded
150
129
  - RevenueWithdrawalStateFailed */
@@ -176,14 +155,27 @@ export interface RevenueWithdrawalStateFailed {
176
155
  }
177
156
 
178
157
  /** This object describes the source of a transaction, or its recipient for outgoing transactions. Currently, it can be one of
179
- - TransactionPartnerFragment
158
+
180
159
  - TransactionPartnerUser
160
+ - TransactionPartnerFragment
161
+ - TransactionPartnerTelegramAds
181
162
  - TransactionPartnerOther */
182
163
  export type TransactionPartner =
183
- | TransactionPartnerFragment
184
164
  | TransactionPartnerUser
165
+ | TransactionPartnerFragment
166
+ | TransactionPartnerTelegramAds
185
167
  | TransactionPartnerOther;
186
168
 
169
+ /** Describes a transaction with a user. */
170
+ export interface TransactionPartnerUser {
171
+ /** Type of the transaction partner, always “user” */
172
+ type: "user";
173
+ /** Information about the user */
174
+ user: User;
175
+ /** Bot-specified invoice payload */
176
+ invoice_payload?: string;
177
+ }
178
+
187
179
  /** Describes a withdrawal transaction with Fragment. */
188
180
  export interface TransactionPartnerFragment {
189
181
  /** Type of the transaction partner, always “fragment” */
@@ -192,12 +184,10 @@ export interface TransactionPartnerFragment {
192
184
  withdrawal_state?: RevenueWithdrawalState;
193
185
  }
194
186
 
195
- /** Describes a transaction with a user. */
196
- export interface TransactionPartnerUser {
197
- /** Type of the transaction partner, always “user” */
198
- type: "user";
199
- /** Information about the user */
200
- user: User;
187
+ /** Describes a withdrawal transaction to the Telegram Ads platform. */
188
+ export interface TransactionPartnerTelegramAds {
189
+ /** Type of the transaction partner, always “telegram_ads” */
190
+ type: "telegram_ads";
201
191
  }
202
192
 
203
193
  /** Describes a transaction with an unknown source or recipient. */
@@ -230,6 +230,8 @@ export declare namespace ChatFullInfo {
230
230
  linked_chat_id?: undefined;
231
231
  /** For supergroups, the location to which the supergroup is connected */
232
232
  location?: undefined;
233
+ /** True, if paid media messages can be sent or forwarded to the channel chat. The field is available only for channel chats. */
234
+ can_send_paid_media?: undefined;
233
235
  }
234
236
  /** Internal type for group chats */
235
237
  export interface GroupChat {
@@ -319,6 +321,8 @@ export declare namespace ChatFullInfo {
319
321
  linked_chat_id?: undefined;
320
322
  /** For supergroups, the location to which the supergroup is connected */
321
323
  location?: undefined;
324
+ /** True, if paid media messages can be sent or forwarded to the channel chat. The field is available only for channel chats. */
325
+ can_send_paid_media?: undefined;
322
326
  }
323
327
  /** Internal type for supergroup chats */
324
328
  export interface SupergroupChat {
@@ -408,6 +412,8 @@ export declare namespace ChatFullInfo {
408
412
  linked_chat_id?: number;
409
413
  /** For supergroups, the location to which the supergroup is connected */
410
414
  location?: ChatLocation;
415
+ /** True, if paid media messages can be sent or forwarded to the channel chat. The field is available only for channel chats. */
416
+ can_send_paid_media?: undefined;
411
417
  }
412
418
  /** Internal type for channel chats */
413
419
  export interface ChannelChat {
@@ -497,6 +503,8 @@ export declare namespace ChatFullInfo {
497
503
  linked_chat_id?: number;
498
504
  /** For supergroups, the location to which the supergroup is connected */
499
505
  location?: undefined;
506
+ /** True, if paid media messages can be sent or forwarded to the channel chat. The field is available only for channel chats. */
507
+ can_send_paid_media?: undefined;
500
508
  }
501
509
  }
502
510
 
@@ -1,7 +1,7 @@
1
1
  import type { Chat, User } from "./manageTypes";
2
2
  import type { InlineKeyboardMarkup } from "./markupTypes";
3
3
  import type { PassportData } from "./passportTypes";
4
- import type { Invoice, SuccessfulPayment } from "./invoiceTypes";
4
+ import type { Invoice, RefundedPayment, SuccessfulPayment } from "./invoiceTypes";
5
5
 
6
6
  type MsgWith<P extends keyof Message> = Record<P, NonNullable<Message[P]>>;
7
7
 
@@ -88,6 +88,7 @@ export declare namespace Message {
88
88
  export type GameMessage = CommonMessage & MsgWith<"game">;
89
89
  export type PollMessage = CommonMessage & MsgWith<"poll">;
90
90
  export type LocationMessage = CommonMessage & MsgWith<"location">;
91
+ export type PaidMediaMessage = CommonMessage & MsgWith<"paid_media">;
91
92
  export type VenueMessage = LocationMessage & MsgWith<"venue">;
92
93
  export type NewChatMembersMessage = ServiceMessage &
93
94
  MsgWith<"new_chat_members">;
@@ -113,6 +114,8 @@ export declare namespace Message {
113
114
  export type InvoiceMessage = ServiceMessage & MsgWith<"invoice">;
114
115
  export type SuccessfulPaymentMessage = ServiceMessage &
115
116
  MsgWith<"successful_payment">;
117
+ export type RefundedPaymentMessage = ServiceMessage &
118
+ MsgWith<"refunded_payment">;
116
119
  export type UsersSharedMessage = ServiceMessage & MsgWith<"users_shared">;
117
120
  export type ChatSharedMessage = ServiceMessage & MsgWith<"chat_shared">;
118
121
  export type ConnectedWebsiteMessage = ServiceMessage &
@@ -192,6 +195,8 @@ export interface Message extends Message.MediaMessage {
192
195
  venue?: Venue;
193
196
  /** Message is a shared location, information about the location */
194
197
  location?: Location;
198
+ /** Message contains paid media; information about the paid media */
199
+ paid_media?: PaidMediaInfo;
195
200
  /** New members that were added to the group or supergroup and information about them (the bot itself may be one of these members) */
196
201
  new_chat_members?: User[];
197
202
  /** A member was removed from the group, information about them (this member may be the bot itself) */
@@ -220,6 +225,8 @@ export interface Message extends Message.MediaMessage {
220
225
  invoice?: Invoice;
221
226
  /** Message is a service message about a successful payment, information about the payment. More about payments » */
222
227
  successful_payment?: SuccessfulPayment;
228
+ /** Message is a service message about a refunded payment, information about the payment. More about payments » */
229
+ refunded_payment?: RefundedPayment;
223
230
  /** Service message: users were shared with the bot */
224
231
  users_shared?: UsersShared;
225
232
  /** Service message: a chat was shared with the bot */
@@ -530,6 +537,8 @@ export interface ExternalReplyInfo {
530
537
  invoice?: Invoice;
531
538
  /** Message is a shared location, information about the location */
532
539
  location?: Location;
540
+ /** Message contains paid media; information about the paid media */
541
+ paid_media?: PaidMediaInfo;
533
542
  /** Message is a native poll, information about the poll */
534
543
  poll?: Poll;
535
544
  /** Message is a venue, information about the venue */
@@ -839,6 +848,48 @@ export interface Location {
839
848
  proximity_alert_radius?: number;
840
849
  }
841
850
 
851
+ /** Describes the paid media added to a message. */
852
+ export interface PaidMediaInfo {
853
+ /** The number of Telegram Stars that must be paid to buy access to the media */
854
+ star_count: number;
855
+ /** Information about the paid media */
856
+ paid_media: PaidMedia[];
857
+ }
858
+
859
+ /** This object describes paid media. Currently, it can be one of
860
+ - PaidMediaPreview
861
+ - PaidMediaPhoto
862
+ - PaidMediaVideo */
863
+ export type PaidMedia = PaidMediaPreview | PaidMediaPhoto | PaidMediaVideo;
864
+
865
+ /** The paid media isn't available before the payment. */
866
+ export interface PaidMediaPreview {
867
+ /** Type of the paid media, always “preview” */
868
+ type: "preview";
869
+ /** Media width as defined by the sender */
870
+ width?: number;
871
+ /** Media height as defined by the sender */
872
+ height?: number;
873
+ /** Duration of the media in seconds as defined by the sender */
874
+ duration?: number;
875
+ }
876
+
877
+ /** The paid media is a photo. */
878
+ export interface PaidMediaPhoto {
879
+ /** Type of the paid media, always “photo” */
880
+ type: "photo";
881
+ /** The photo */
882
+ photo: PhotoSize[];
883
+ }
884
+
885
+ /** The paid media is a video. */
886
+ export interface PaidMediaVideo {
887
+ /** Type of the paid media, always “video” */
888
+ type: "video";
889
+ /** The video */
890
+ video: Video;
891
+ }
892
+
842
893
  /** This object represents a venue. */
843
894
  export interface Venue {
844
895
  /** Venue location. Can't be a live location */