@rosyn/gram 0.0.0-stage → 0.1.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.
Files changed (100) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/LICENSE +21 -0
  3. package/README.md +49 -2
  4. package/dist/adapters/index.d.ts +7 -0
  5. package/dist/adapters/index.d.ts.map +1 -0
  6. package/dist/adapters/index.js +2 -0
  7. package/dist/adapters/index.js.map +1 -0
  8. package/dist/api/client.d.ts +24 -0
  9. package/dist/api/client.d.ts.map +1 -0
  10. package/dist/api/client.js +178 -0
  11. package/dist/api/client.js.map +1 -0
  12. package/dist/api/index.d.ts +3 -0
  13. package/dist/api/index.d.ts.map +1 -0
  14. package/dist/api/index.js +3 -0
  15. package/dist/api/index.js.map +1 -0
  16. package/dist/api/methods.d.ts +14 -0
  17. package/dist/api/methods.d.ts.map +1 -0
  18. package/dist/api/methods.js +49 -0
  19. package/dist/api/methods.js.map +1 -0
  20. package/dist/bot/index.d.ts +64 -0
  21. package/dist/bot/index.d.ts.map +1 -0
  22. package/dist/bot/index.js +164 -0
  23. package/dist/bot/index.js.map +1 -0
  24. package/dist/context/index.d.ts +35 -0
  25. package/dist/context/index.d.ts.map +1 -0
  26. package/dist/context/index.js +136 -0
  27. package/dist/context/index.js.map +1 -0
  28. package/dist/core/index.d.ts +18 -0
  29. package/dist/core/index.d.ts.map +1 -0
  30. package/dist/core/index.js +30 -0
  31. package/dist/core/index.js.map +1 -0
  32. package/dist/errors/index.d.ts +48 -0
  33. package/dist/errors/index.d.ts.map +1 -0
  34. package/dist/errors/index.js +79 -0
  35. package/dist/errors/index.js.map +1 -0
  36. package/dist/index.d.ts +21 -0
  37. package/dist/index.d.ts.map +1 -0
  38. package/dist/index.js +21 -0
  39. package/dist/index.js.map +1 -0
  40. package/dist/keyboard/index.d.ts +52 -0
  41. package/dist/keyboard/index.d.ts.map +1 -0
  42. package/dist/keyboard/index.js +152 -0
  43. package/dist/keyboard/index.js.map +1 -0
  44. package/dist/media/index.d.ts +48 -0
  45. package/dist/media/index.d.ts.map +1 -0
  46. package/dist/media/index.js +97 -0
  47. package/dist/media/index.js.map +1 -0
  48. package/dist/middleware/index.d.ts +14 -0
  49. package/dist/middleware/index.d.ts.map +1 -0
  50. package/dist/middleware/index.js +52 -0
  51. package/dist/middleware/index.js.map +1 -0
  52. package/dist/performance/index.d.ts +63 -0
  53. package/dist/performance/index.d.ts.map +1 -0
  54. package/dist/performance/index.js +158 -0
  55. package/dist/performance/index.js.map +1 -0
  56. package/dist/plugins/index.d.ts +27 -0
  57. package/dist/plugins/index.d.ts.map +1 -0
  58. package/dist/plugins/index.js +51 -0
  59. package/dist/plugins/index.js.map +1 -0
  60. package/dist/polling/index.d.ts +22 -0
  61. package/dist/polling/index.d.ts.map +1 -0
  62. package/dist/polling/index.js +56 -0
  63. package/dist/polling/index.js.map +1 -0
  64. package/dist/router/index.d.ts +37 -0
  65. package/dist/router/index.d.ts.map +1 -0
  66. package/dist/router/index.js +273 -0
  67. package/dist/router/index.js.map +1 -0
  68. package/dist/scenes/index.d.ts +37 -0
  69. package/dist/scenes/index.d.ts.map +1 -0
  70. package/dist/scenes/index.js +104 -0
  71. package/dist/scenes/index.js.map +1 -0
  72. package/dist/security/index.d.ts +97 -0
  73. package/dist/security/index.d.ts.map +1 -0
  74. package/dist/security/index.js +312 -0
  75. package/dist/security/index.js.map +1 -0
  76. package/dist/session/index.d.ts +25 -0
  77. package/dist/session/index.d.ts.map +1 -0
  78. package/dist/session/index.js +91 -0
  79. package/dist/session/index.js.map +1 -0
  80. package/dist/types/index.d.ts +22 -0
  81. package/dist/types/index.d.ts.map +1 -0
  82. package/dist/types/index.js +2 -0
  83. package/dist/types/index.js.map +1 -0
  84. package/dist/types/telegram.d.ts +4402 -0
  85. package/dist/types/telegram.d.ts.map +1 -0
  86. package/dist/types/telegram.js +6 -0
  87. package/dist/types/telegram.js.map +1 -0
  88. package/dist/updates/index.d.ts +22 -0
  89. package/dist/updates/index.d.ts.map +1 -0
  90. package/dist/updates/index.js +66 -0
  91. package/dist/updates/index.js.map +1 -0
  92. package/dist/utils/index.d.ts +7 -0
  93. package/dist/utils/index.d.ts.map +1 -0
  94. package/dist/utils/index.js +45 -0
  95. package/dist/utils/index.js.map +1 -0
  96. package/dist/webhook/index.d.ts +10 -0
  97. package/dist/webhook/index.d.ts.map +1 -0
  98. package/dist/webhook/index.js +88 -0
  99. package/dist/webhook/index.js.map +1 -0
  100. package/package.json +66 -4
@@ -0,0 +1,4402 @@
1
+ export interface TelegramInputFile {
2
+ readonly data: Uint8Array | ArrayBuffer | Blob | ReadableStream<Uint8Array> | string;
3
+ readonly filename?: string;
4
+ readonly contentType?: string;
5
+ }
6
+ export interface Update {
7
+ update_id: number;
8
+ message?: Message;
9
+ edited_message?: Message;
10
+ channel_post?: Message;
11
+ edited_channel_post?: Message;
12
+ business_connection?: BusinessConnection;
13
+ business_message?: Message;
14
+ edited_business_message?: Message;
15
+ deleted_business_messages?: BusinessMessagesDeleted;
16
+ guest_message?: Message;
17
+ message_reaction?: MessageReactionUpdated;
18
+ message_reaction_count?: MessageReactionCountUpdated;
19
+ inline_query?: InlineQuery;
20
+ chosen_inline_result?: ChosenInlineResult;
21
+ callback_query?: CallbackQuery;
22
+ widget_query?: WidgetQuery;
23
+ shared_widget_query?: SharedWidgetQuery;
24
+ shipping_query?: ShippingQuery;
25
+ pre_checkout_query?: PreCheckoutQuery;
26
+ purchased_paid_media?: PaidMediaPurchased;
27
+ poll?: Poll;
28
+ poll_answer?: PollAnswer;
29
+ my_chat_member?: ChatMemberUpdated;
30
+ chat_member?: ChatMemberUpdated;
31
+ chat_join_request?: ChatJoinRequest;
32
+ chat_boost?: ChatBoostUpdated;
33
+ removed_chat_boost?: ChatBoostRemoved;
34
+ managed_bot?: ManagedBotUpdated;
35
+ subscription?: BotSubscriptionUpdated;
36
+ stopped_message_generation?: MessageGenerationStopped;
37
+ }
38
+ export interface WebhookInfo {
39
+ url: string;
40
+ has_custom_certificate: boolean;
41
+ pending_update_count: number;
42
+ ip_address?: string;
43
+ last_error_date?: number;
44
+ last_error_message?: string;
45
+ last_synchronization_error_date?: number;
46
+ max_connections?: number;
47
+ allowed_updates?: string[];
48
+ }
49
+ export interface BotFullInfo {
50
+ id: number;
51
+ is_bot: boolean;
52
+ first_name: string;
53
+ username?: string;
54
+ active_usernames?: string[];
55
+ can_join_groups: boolean;
56
+ can_read_all_group_messages: boolean;
57
+ supports_guest_queries: boolean;
58
+ supports_inline_queries: boolean;
59
+ inline_query_placeholder?: string;
60
+ needs_inline_query_location: boolean;
61
+ can_connect_to_business: boolean;
62
+ has_main_web_app: boolean;
63
+ has_topics_enabled: boolean;
64
+ allows_users_to_create_topics: boolean;
65
+ has_topic_sidebar: boolean;
66
+ can_manage_bots: boolean;
67
+ supports_join_request_queries: boolean;
68
+ }
69
+ export interface User {
70
+ id: number;
71
+ is_bot: boolean;
72
+ first_name: string;
73
+ last_name?: string;
74
+ username?: string;
75
+ language_code?: string;
76
+ is_premium?: boolean;
77
+ added_to_attachment_menu?: boolean;
78
+ }
79
+ export interface Chat {
80
+ id: number;
81
+ type: string;
82
+ title?: string;
83
+ username?: string;
84
+ first_name?: string;
85
+ last_name?: string;
86
+ is_forum?: boolean;
87
+ is_direct_messages?: boolean;
88
+ }
89
+ export interface ChatFullInfo {
90
+ id: number;
91
+ type: string;
92
+ title?: string;
93
+ username?: string;
94
+ first_name?: string;
95
+ last_name?: string;
96
+ is_forum?: boolean;
97
+ is_direct_messages?: boolean;
98
+ accent_color_id: number;
99
+ max_reaction_count: number;
100
+ photo?: ChatPhoto;
101
+ active_usernames?: string[];
102
+ birthdate?: Birthdate;
103
+ business_intro?: BusinessIntro;
104
+ business_location?: BusinessLocation;
105
+ business_opening_hours?: BusinessOpeningHours;
106
+ personal_chat?: Chat;
107
+ parent_chat?: Chat;
108
+ available_reactions?: ReactionType[];
109
+ background_custom_emoji_id?: string;
110
+ profile_accent_color_id?: number;
111
+ profile_background_custom_emoji_id?: string;
112
+ emoji_status_custom_emoji_id?: string;
113
+ emoji_status_expiration_date?: number;
114
+ bio?: string;
115
+ has_private_forwards?: boolean;
116
+ has_restricted_voice_and_video_messages?: boolean;
117
+ join_to_send_messages?: boolean;
118
+ join_by_request?: boolean;
119
+ description?: string;
120
+ invite_link?: string;
121
+ pinned_message?: Message;
122
+ permissions?: ChatPermissions;
123
+ accepted_gift_types: AcceptedGiftTypes;
124
+ can_send_paid_media?: boolean;
125
+ slow_mode_delay?: number;
126
+ unrestrict_boost_count?: number;
127
+ message_auto_delete_time?: number;
128
+ has_aggressive_anti_spam_enabled?: boolean;
129
+ has_hidden_members?: boolean;
130
+ has_protected_content?: boolean;
131
+ has_visible_history?: boolean;
132
+ sticker_set_name?: string;
133
+ can_set_sticker_set?: boolean;
134
+ custom_emoji_sticker_set_name?: string;
135
+ linked_chat_id?: number;
136
+ location?: ChatLocation;
137
+ rating?: UserRating;
138
+ first_profile_audio?: Audio;
139
+ unique_gift_colors?: UniqueGiftColors;
140
+ paid_message_star_count?: number;
141
+ guard_bot?: User;
142
+ community?: Community;
143
+ ton_wallet_card?: TonWalletCard;
144
+ share_theme?: ChatShareTheme;
145
+ }
146
+ export interface Message {
147
+ message_id: number;
148
+ message_thread_id?: number;
149
+ direct_messages_topic?: DirectMessagesTopic;
150
+ from?: User;
151
+ sender_chat?: Chat;
152
+ sender_boost_count?: number;
153
+ sender_business_bot?: User;
154
+ sender_tag?: string;
155
+ receiver_user?: User;
156
+ ephemeral_message_id?: number;
157
+ date: number;
158
+ guest_query_id?: string;
159
+ business_connection_id?: string;
160
+ chat: Chat;
161
+ forward_origin?: MessageOrigin;
162
+ is_topic_message?: boolean;
163
+ is_automatic_forward?: boolean;
164
+ reply_to_message?: Message;
165
+ external_reply?: ExternalReplyInfo;
166
+ quote?: TextQuote;
167
+ reply_to_story?: Story;
168
+ reply_to_checklist_task_id?: number;
169
+ reply_to_poll_option_id?: string;
170
+ via_bot?: User;
171
+ guest_bot_caller_user?: User;
172
+ guest_bot_caller_chat?: Chat;
173
+ edit_date?: number;
174
+ has_protected_content?: boolean;
175
+ is_from_offline?: boolean;
176
+ is_paid_post?: boolean;
177
+ media_group_id?: string;
178
+ author_signature?: string;
179
+ paid_star_count?: number;
180
+ text?: string;
181
+ entities?: MessageEntity[];
182
+ link_preview_options?: LinkPreviewOptions;
183
+ suggested_post_info?: SuggestedPostInfo;
184
+ effect_id?: string;
185
+ rich_message?: RichMessage;
186
+ animation?: Animation;
187
+ audio?: Audio;
188
+ document?: Document;
189
+ live_photo?: LivePhoto;
190
+ paid_media?: PaidMediaInfo;
191
+ photo?: PhotoSize[];
192
+ sticker?: Sticker;
193
+ story?: Story;
194
+ video?: Video;
195
+ video_note?: VideoNote;
196
+ voice?: Voice;
197
+ widget?: Widget;
198
+ caption?: string;
199
+ caption_entities?: MessageEntity[];
200
+ show_caption_above_media?: boolean;
201
+ has_media_spoiler?: boolean;
202
+ checklist?: Checklist;
203
+ contact?: Contact;
204
+ dice?: Dice;
205
+ game?: Game;
206
+ poll?: Poll;
207
+ venue?: Venue;
208
+ location?: Location;
209
+ new_chat_members?: User[];
210
+ left_chat_member?: User;
211
+ chat_owner_left?: ChatOwnerLeft;
212
+ chat_owner_changed?: ChatOwnerChanged;
213
+ new_chat_title?: string;
214
+ new_chat_photo?: PhotoSize[];
215
+ delete_chat_photo?: boolean;
216
+ group_chat_created?: boolean;
217
+ supergroup_chat_created?: boolean;
218
+ channel_chat_created?: boolean;
219
+ message_auto_delete_timer_changed?: MessageAutoDeleteTimerChanged;
220
+ migrate_to_chat_id?: number;
221
+ migrate_from_chat_id?: number;
222
+ pinned_message?: MaybeInaccessibleMessage;
223
+ invoice?: Invoice;
224
+ successful_payment?: SuccessfulPayment;
225
+ refunded_payment?: RefundedPayment;
226
+ users_shared?: UsersShared;
227
+ chat_shared?: ChatShared;
228
+ gift?: GiftInfo;
229
+ unique_gift?: UniqueGiftInfo;
230
+ gift_upgrade_sent?: GiftInfo;
231
+ connected_website?: string;
232
+ write_access_allowed?: WriteAccessAllowed;
233
+ passport_data?: PassportData;
234
+ proximity_alert_triggered?: ProximityAlertTriggered;
235
+ boost_added?: ChatBoostAdded;
236
+ chat_background_set?: ChatBackground;
237
+ checklist_tasks_done?: ChecklistTasksDone;
238
+ checklist_tasks_added?: ChecklistTasksAdded;
239
+ community_chat_added?: CommunityChatAdded;
240
+ community_chat_joined?: CommunityChatJoined;
241
+ community_chat_removed?: CommunityChatRemoved;
242
+ direct_message_price_changed?: DirectMessagePriceChanged;
243
+ forum_topic_created?: ForumTopicCreated;
244
+ forum_topic_edited?: ForumTopicEdited;
245
+ forum_topic_closed?: ForumTopicClosed;
246
+ forum_topic_reopened?: ForumTopicReopened;
247
+ general_forum_topic_hidden?: GeneralForumTopicHidden;
248
+ general_forum_topic_unhidden?: GeneralForumTopicUnhidden;
249
+ giveaway_created?: GiveawayCreated;
250
+ giveaway?: Giveaway;
251
+ giveaway_winners?: GiveawayWinners;
252
+ giveaway_completed?: GiveawayCompleted;
253
+ managed_bot_created?: ManagedBotCreated;
254
+ paid_message_price_changed?: PaidMessagePriceChanged;
255
+ paid_messages_waived?: PaidMessagesWaived;
256
+ poll_option_added?: PollOptionAdded;
257
+ poll_option_deleted?: PollOptionDeleted;
258
+ suggested_post_approved?: SuggestedPostApproved;
259
+ suggested_post_approval_failed?: SuggestedPostApprovalFailed;
260
+ suggested_post_declined?: SuggestedPostDeclined;
261
+ suggested_post_paid?: SuggestedPostPaid;
262
+ suggested_post_refunded?: SuggestedPostRefunded;
263
+ ton_wallet_transfer?: TonWalletTransfer;
264
+ video_chat_scheduled?: VideoChatScheduled;
265
+ video_chat_started?: VideoChatStarted;
266
+ video_chat_ended?: VideoChatEnded;
267
+ video_chat_participants_invited?: VideoChatParticipantsInvited;
268
+ web_app_data?: WebAppData;
269
+ reply_markup?: InlineKeyboardMarkup;
270
+ }
271
+ export interface MessageId {
272
+ message_id: number;
273
+ }
274
+ export interface InaccessibleMessage {
275
+ chat: Chat;
276
+ message_id: number;
277
+ date: number;
278
+ }
279
+ export type MaybeInaccessibleMessage = Message | InaccessibleMessage;
280
+ export interface MessageEntity {
281
+ type: string;
282
+ offset: number;
283
+ length: number;
284
+ url?: string;
285
+ user?: User;
286
+ language?: string;
287
+ custom_emoji_id?: string;
288
+ unix_time?: number;
289
+ date_time_format?: string;
290
+ }
291
+ export interface TextQuote {
292
+ text: string;
293
+ entities?: MessageEntity[];
294
+ rich_texts?: RichText[];
295
+ position: number;
296
+ is_manual?: boolean;
297
+ }
298
+ export interface ExternalReplyInfo {
299
+ origin: MessageOrigin;
300
+ chat?: Chat;
301
+ message_id?: number;
302
+ link_preview_options?: LinkPreviewOptions;
303
+ animation?: Animation;
304
+ audio?: Audio;
305
+ document?: Document;
306
+ live_photo?: LivePhoto;
307
+ paid_media?: PaidMediaInfo;
308
+ photo?: PhotoSize[];
309
+ sticker?: Sticker;
310
+ story?: Story;
311
+ video?: Video;
312
+ video_note?: VideoNote;
313
+ voice?: Voice;
314
+ widget?: Widget;
315
+ has_media_spoiler?: boolean;
316
+ checklist?: Checklist;
317
+ contact?: Contact;
318
+ dice?: Dice;
319
+ game?: Game;
320
+ giveaway?: Giveaway;
321
+ giveaway_winners?: GiveawayWinners;
322
+ invoice?: Invoice;
323
+ location?: Location;
324
+ poll?: Poll;
325
+ venue?: Venue;
326
+ }
327
+ export interface ReplyParameters {
328
+ message_id?: number;
329
+ chat_id?: number | string;
330
+ ephemeral_message_id?: number;
331
+ allow_sending_without_reply?: boolean;
332
+ quote?: string;
333
+ quote_parse_mode?: string;
334
+ quote_entities?: MessageEntity[];
335
+ quote_rich_texts?: RichText[];
336
+ quote_position?: number;
337
+ checklist_task_id?: number;
338
+ poll_option_id?: string;
339
+ }
340
+ export interface EphemeralMessageParameters {
341
+ receiver_user_id?: number;
342
+ callback_query_id?: string;
343
+ replace_callback_query_message?: boolean;
344
+ }
345
+ export type MessageOrigin = MessageOriginUser | MessageOriginHiddenUser | MessageOriginChat | MessageOriginChannel;
346
+ export interface MessageOriginUser {
347
+ type: string;
348
+ date: number;
349
+ sender_user: User;
350
+ }
351
+ export interface MessageOriginHiddenUser {
352
+ type: string;
353
+ date: number;
354
+ sender_user_name: string;
355
+ }
356
+ export interface MessageOriginChat {
357
+ type: string;
358
+ date: number;
359
+ sender_chat: Chat;
360
+ author_signature?: string;
361
+ }
362
+ export interface MessageOriginChannel {
363
+ type: string;
364
+ date: number;
365
+ chat: Chat;
366
+ message_id: number;
367
+ author_signature?: string;
368
+ }
369
+ export interface PhotoSize {
370
+ file_id: string;
371
+ file_unique_id: string;
372
+ width: number;
373
+ height: number;
374
+ file_size?: number;
375
+ }
376
+ export interface Animation {
377
+ file_id: string;
378
+ file_unique_id: string;
379
+ width: number;
380
+ height: number;
381
+ duration: number;
382
+ thumbnail?: PhotoSize;
383
+ file_name?: string;
384
+ mime_type?: string;
385
+ file_size?: number;
386
+ }
387
+ export interface Audio {
388
+ file_id: string;
389
+ file_unique_id: string;
390
+ duration: number;
391
+ performer?: string;
392
+ title?: string;
393
+ file_name?: string;
394
+ mime_type?: string;
395
+ file_size?: number;
396
+ thumbnail?: PhotoSize;
397
+ }
398
+ export interface Document {
399
+ file_id: string;
400
+ file_unique_id: string;
401
+ thumbnail?: PhotoSize;
402
+ file_name?: string;
403
+ mime_type?: string;
404
+ file_size?: number;
405
+ }
406
+ export interface LivePhoto {
407
+ photo?: PhotoSize[];
408
+ file_id: string;
409
+ file_unique_id: string;
410
+ width: number;
411
+ height: number;
412
+ duration: number;
413
+ mime_type?: string;
414
+ file_size?: number;
415
+ }
416
+ export interface Story {
417
+ chat: Chat;
418
+ id: number;
419
+ }
420
+ export interface VideoQuality {
421
+ file_id: string;
422
+ file_unique_id: string;
423
+ width: number;
424
+ height: number;
425
+ codec: string;
426
+ file_size?: number;
427
+ }
428
+ export interface Video {
429
+ file_id: string;
430
+ file_unique_id: string;
431
+ width: number;
432
+ height: number;
433
+ duration: number;
434
+ thumbnail?: PhotoSize;
435
+ cover?: PhotoSize[];
436
+ start_timestamp?: number;
437
+ qualities?: VideoQuality[];
438
+ file_name?: string;
439
+ mime_type?: string;
440
+ file_size?: number;
441
+ }
442
+ export interface VideoNote {
443
+ file_id: string;
444
+ file_unique_id: string;
445
+ length: number;
446
+ duration: number;
447
+ thumbnail?: PhotoSize;
448
+ file_size?: number;
449
+ }
450
+ export interface Voice {
451
+ file_id: string;
452
+ file_unique_id: string;
453
+ duration: number;
454
+ mime_type?: string;
455
+ file_size?: number;
456
+ }
457
+ export interface Widget {
458
+ id?: string;
459
+ width?: number;
460
+ height?: number;
461
+ html: string;
462
+ public_data?: string;
463
+ chat_data?: string;
464
+ }
465
+ export interface PaidMediaInfo {
466
+ star_count: number;
467
+ paid_media: PaidMedia[];
468
+ }
469
+ export type PaidMedia = PaidMediaLivePhoto | PaidMediaPhoto | PaidMediaPreview | PaidMediaVideo;
470
+ export interface PaidMediaLivePhoto {
471
+ type: string;
472
+ live_photo: LivePhoto;
473
+ }
474
+ export interface PaidMediaPhoto {
475
+ type: string;
476
+ photo: PhotoSize[];
477
+ }
478
+ export interface PaidMediaPreview {
479
+ type: string;
480
+ width?: number;
481
+ height?: number;
482
+ duration?: number;
483
+ }
484
+ export interface PaidMediaVideo {
485
+ type: string;
486
+ video: Video;
487
+ }
488
+ export interface Contact {
489
+ phone_number: string;
490
+ first_name: string;
491
+ last_name?: string;
492
+ user_id?: number;
493
+ vcard?: string;
494
+ }
495
+ export interface Dice {
496
+ emoji: string;
497
+ value: number;
498
+ }
499
+ export interface Link {
500
+ url: string;
501
+ }
502
+ export interface PollMedia {
503
+ animation?: Animation;
504
+ audio?: Audio;
505
+ document?: Document;
506
+ link?: Link;
507
+ live_photo?: LivePhoto;
508
+ location?: Location;
509
+ photo?: PhotoSize[];
510
+ sticker?: Sticker;
511
+ venue?: Venue;
512
+ video?: Video;
513
+ }
514
+ export type InputPollMedia = InputMediaAnimation | InputMediaAudio | InputMediaDocument | InputMediaLivePhoto | InputMediaLocation | InputMediaPhoto | InputMediaVenue | InputMediaVideo;
515
+ export type InputPollOptionMedia = InputMediaAnimation | InputMediaLink | InputMediaLivePhoto | InputMediaLocation | InputMediaPhoto | InputMediaSticker | InputMediaVenue | InputMediaVideo;
516
+ export interface PollOption {
517
+ persistent_id: string;
518
+ text: string;
519
+ text_entities?: MessageEntity[];
520
+ media?: PollMedia;
521
+ voter_count: number;
522
+ added_by_user?: User;
523
+ added_by_chat?: Chat;
524
+ addition_date?: number;
525
+ }
526
+ export interface InputPollOption {
527
+ text: string;
528
+ text_parse_mode?: string;
529
+ text_entities?: MessageEntity[];
530
+ media?: InputPollOptionMedia;
531
+ }
532
+ export interface PollAnswer {
533
+ poll_id: string;
534
+ voter_chat?: Chat;
535
+ user?: User;
536
+ option_ids: number[];
537
+ option_persistent_ids: string[];
538
+ }
539
+ export interface Poll {
540
+ id: string;
541
+ question: string;
542
+ question_entities?: MessageEntity[];
543
+ options: PollOption[];
544
+ total_voter_count: number;
545
+ is_closed: boolean;
546
+ is_anonymous: boolean;
547
+ type: string;
548
+ allows_multiple_answers: boolean;
549
+ allows_revoting: boolean;
550
+ members_only: boolean;
551
+ country_codes?: string[];
552
+ correct_option_ids?: number[];
553
+ explanation?: string;
554
+ explanation_entities?: MessageEntity[];
555
+ explanation_media?: PollMedia;
556
+ open_period?: number;
557
+ close_date?: number;
558
+ description?: string;
559
+ description_entities?: MessageEntity[];
560
+ media?: PollMedia;
561
+ }
562
+ export interface ChecklistTask {
563
+ id: number;
564
+ text: string;
565
+ text_entities?: MessageEntity[];
566
+ completed_by_user?: User;
567
+ completed_by_chat?: Chat;
568
+ completion_date?: number;
569
+ }
570
+ export interface Checklist {
571
+ title: string;
572
+ title_entities?: MessageEntity[];
573
+ tasks: ChecklistTask[];
574
+ others_can_add_tasks?: boolean;
575
+ others_can_mark_tasks_as_done?: boolean;
576
+ }
577
+ export interface InputChecklistTask {
578
+ id: number;
579
+ text: string;
580
+ parse_mode?: string;
581
+ text_entities?: MessageEntity[];
582
+ }
583
+ export interface InputChecklist {
584
+ title: string;
585
+ parse_mode?: string;
586
+ title_entities?: MessageEntity[];
587
+ tasks: InputChecklistTask[];
588
+ others_can_add_tasks?: boolean;
589
+ others_can_mark_tasks_as_done?: boolean;
590
+ }
591
+ export interface Location {
592
+ latitude: number;
593
+ longitude: number;
594
+ horizontal_accuracy?: number;
595
+ live_period?: number;
596
+ heading?: number;
597
+ proximity_alert_radius?: number;
598
+ }
599
+ export interface Venue {
600
+ location: Location;
601
+ title: string;
602
+ address: string;
603
+ foursquare_id?: string;
604
+ foursquare_type?: string;
605
+ google_place_id?: string;
606
+ google_place_type?: string;
607
+ }
608
+ export interface WebAppData {
609
+ data: string;
610
+ button_text: string;
611
+ }
612
+ export interface ProximityAlertTriggered {
613
+ traveler: User;
614
+ watcher: User;
615
+ distance: number;
616
+ }
617
+ export interface MessageAutoDeleteTimerChanged {
618
+ message_auto_delete_time: number;
619
+ }
620
+ export interface ManagedBotCreated {
621
+ bot: User;
622
+ }
623
+ export interface ManagedBotUpdated {
624
+ user: User;
625
+ bot: User;
626
+ }
627
+ export interface BotSubscriptionUpdated {
628
+ user: User;
629
+ invoice_payload: string;
630
+ state: string;
631
+ }
632
+ export interface MessageGenerationStopped {
633
+ chat: Chat;
634
+ message_thread_id?: number;
635
+ draft_id: number;
636
+ }
637
+ export interface PollOptionAdded {
638
+ poll_message?: MaybeInaccessibleMessage;
639
+ option_persistent_id: string;
640
+ option_text: string;
641
+ option_text_entities?: MessageEntity[];
642
+ }
643
+ export interface PollOptionDeleted {
644
+ poll_message?: MaybeInaccessibleMessage;
645
+ option_persistent_id: string;
646
+ option_text: string;
647
+ option_text_entities?: MessageEntity[];
648
+ }
649
+ export interface ChatBoostAdded {
650
+ boost_count: number;
651
+ }
652
+ export type BackgroundFill = BackgroundFillSolid | BackgroundFillGradient | BackgroundFillFreeformGradient;
653
+ export interface BackgroundFillSolid {
654
+ type: string;
655
+ color: number;
656
+ }
657
+ export interface BackgroundFillGradient {
658
+ type: string;
659
+ top_color: number;
660
+ bottom_color: number;
661
+ rotation_angle: number;
662
+ }
663
+ export interface BackgroundFillFreeformGradient {
664
+ type: string;
665
+ colors: number[];
666
+ }
667
+ export type BackgroundType = BackgroundTypeFill | BackgroundTypeWallpaper | BackgroundTypePattern | BackgroundTypeChatTheme;
668
+ export interface BackgroundTypeFill {
669
+ type: string;
670
+ fill: BackgroundFill;
671
+ dark_theme_dimming: number;
672
+ }
673
+ export interface BackgroundTypeWallpaper {
674
+ type: string;
675
+ document: Document;
676
+ dark_theme_dimming: number;
677
+ is_blurred?: boolean;
678
+ is_moving?: boolean;
679
+ }
680
+ export interface BackgroundTypePattern {
681
+ type: string;
682
+ document: Document;
683
+ fill: BackgroundFill;
684
+ intensity: number;
685
+ is_inverted?: boolean;
686
+ is_moving?: boolean;
687
+ }
688
+ export interface BackgroundTypeChatTheme {
689
+ type: string;
690
+ theme_name: string;
691
+ }
692
+ export interface ChatBackground {
693
+ type: BackgroundType;
694
+ }
695
+ export interface ChecklistTasksDone {
696
+ checklist_message?: Message;
697
+ marked_as_done_task_ids?: number[];
698
+ marked_as_not_done_task_ids?: number[];
699
+ }
700
+ export interface ChecklistTasksAdded {
701
+ checklist_message?: Message;
702
+ tasks: ChecklistTask[];
703
+ }
704
+ export interface CommunityChatAdded {
705
+ community: Community;
706
+ }
707
+ export interface CommunityChatJoined {
708
+ community: Community;
709
+ }
710
+ export interface CommunityChatRemoved {
711
+ [key: string]: unknown;
712
+ }
713
+ export interface ForumTopicCreated {
714
+ name: string;
715
+ icon_color: number;
716
+ icon_custom_emoji_id?: string;
717
+ is_name_implicit?: boolean;
718
+ }
719
+ export interface ForumTopicClosed {
720
+ [key: string]: unknown;
721
+ }
722
+ export interface ForumTopicEdited {
723
+ name?: string;
724
+ icon_custom_emoji_id?: string;
725
+ }
726
+ export interface ForumTopicReopened {
727
+ [key: string]: unknown;
728
+ }
729
+ export interface GeneralForumTopicHidden {
730
+ [key: string]: unknown;
731
+ }
732
+ export interface GeneralForumTopicUnhidden {
733
+ [key: string]: unknown;
734
+ }
735
+ export interface SharedUser {
736
+ user_id: number;
737
+ first_name?: string;
738
+ last_name?: string;
739
+ username?: string;
740
+ photo?: PhotoSize[];
741
+ }
742
+ export interface UsersShared {
743
+ request_id: number;
744
+ users: SharedUser[];
745
+ }
746
+ export interface ChatShared {
747
+ request_id: number;
748
+ chat_id: number;
749
+ title?: string;
750
+ username?: string;
751
+ photo?: PhotoSize[];
752
+ }
753
+ export interface WriteAccessAllowed {
754
+ from_request?: boolean;
755
+ web_app_name?: string;
756
+ from_attachment_menu?: boolean;
757
+ inviter?: User;
758
+ }
759
+ export interface VideoChatScheduled {
760
+ start_date: number;
761
+ }
762
+ export interface VideoChatStarted {
763
+ [key: string]: unknown;
764
+ }
765
+ export interface VideoChatEnded {
766
+ duration: number;
767
+ }
768
+ export interface VideoChatParticipantsInvited {
769
+ users: User[];
770
+ }
771
+ export interface PaidMessagePriceChanged {
772
+ paid_message_star_count: number;
773
+ }
774
+ export interface DirectMessagePriceChanged {
775
+ are_direct_messages_enabled: boolean;
776
+ direct_message_star_count?: number;
777
+ }
778
+ export interface SuggestedPostApproved {
779
+ suggested_post_message?: Message;
780
+ price?: SuggestedPostPrice;
781
+ send_date: number;
782
+ }
783
+ export interface SuggestedPostApprovalFailed {
784
+ suggested_post_message?: Message;
785
+ price: SuggestedPostPrice;
786
+ }
787
+ export interface SuggestedPostDeclined {
788
+ suggested_post_message?: Message;
789
+ comment?: string;
790
+ }
791
+ export interface SuggestedPostPaid {
792
+ suggested_post_message?: Message;
793
+ currency: string;
794
+ amount?: number;
795
+ star_amount?: StarAmount;
796
+ }
797
+ export interface SuggestedPostRefunded {
798
+ suggested_post_message?: Message;
799
+ reason: string;
800
+ }
801
+ export interface PaidMessagesWaived {
802
+ [key: string]: unknown;
803
+ }
804
+ export interface TonWalletTransfer {
805
+ transaction_id: string;
806
+ peer_address: string;
807
+ amount: string;
808
+ comment?: string;
809
+ }
810
+ export interface GiveawayCreated {
811
+ prize_star_count?: number;
812
+ }
813
+ export interface Giveaway {
814
+ chats: Chat[];
815
+ winners_selection_date: number;
816
+ winner_count: number;
817
+ only_new_members?: boolean;
818
+ has_public_winners?: boolean;
819
+ prize_description?: string;
820
+ country_codes?: string[];
821
+ prize_star_count?: number;
822
+ premium_subscription_month_count?: number;
823
+ }
824
+ export interface GiveawayWinners {
825
+ chat: Chat;
826
+ giveaway_message_id: number;
827
+ winners_selection_date: number;
828
+ winner_count: number;
829
+ winners: User[];
830
+ additional_chat_count?: number;
831
+ prize_star_count?: number;
832
+ premium_subscription_month_count?: number;
833
+ unclaimed_prize_count?: number;
834
+ only_new_members?: boolean;
835
+ was_refunded?: boolean;
836
+ prize_description?: string;
837
+ }
838
+ export interface GiveawayCompleted {
839
+ winner_count: number;
840
+ unclaimed_prize_count?: number;
841
+ giveaway_message?: Message;
842
+ is_star_giveaway?: boolean;
843
+ }
844
+ export interface LinkPreviewOptions {
845
+ is_disabled?: boolean;
846
+ url?: string;
847
+ prefer_small_media?: boolean;
848
+ prefer_large_media?: boolean;
849
+ show_above_text?: boolean;
850
+ }
851
+ export interface SuggestedPostPrice {
852
+ currency: string;
853
+ amount: number;
854
+ }
855
+ export interface SuggestedPostInfo {
856
+ state: string;
857
+ price?: SuggestedPostPrice;
858
+ send_date?: number;
859
+ }
860
+ export interface SuggestedPostParameters {
861
+ price?: SuggestedPostPrice;
862
+ send_date?: number;
863
+ }
864
+ export interface DirectMessagesTopic {
865
+ topic_id: number;
866
+ user?: User;
867
+ }
868
+ export interface UserProfilePhotos {
869
+ total_count: number;
870
+ photos: PhotoSize[][];
871
+ }
872
+ export interface UserProfileAudios {
873
+ total_count: number;
874
+ audios: Audio[];
875
+ }
876
+ export interface File {
877
+ file_id: string;
878
+ file_unique_id: string;
879
+ file_size?: number;
880
+ file_path?: string;
881
+ }
882
+ export interface WebAppInfo {
883
+ url: string;
884
+ }
885
+ export interface ReplyKeyboardMarkup {
886
+ keyboard: KeyboardButton[][];
887
+ is_persistent?: boolean;
888
+ resize_keyboard?: boolean;
889
+ one_time_keyboard?: boolean;
890
+ input_field_placeholder?: string;
891
+ selective?: boolean;
892
+ force_reply?: boolean;
893
+ }
894
+ export interface KeyboardButton {
895
+ text: string;
896
+ icon_custom_emoji_id?: string;
897
+ style?: string;
898
+ request_users?: KeyboardButtonRequestUsers;
899
+ request_chat?: KeyboardButtonRequestChat;
900
+ request_managed_bot?: KeyboardButtonRequestManagedBot;
901
+ request_contact?: boolean;
902
+ request_location?: boolean;
903
+ request_poll?: KeyboardButtonPollType;
904
+ web_app?: WebAppInfo;
905
+ }
906
+ export interface KeyboardButtonRequestUsers {
907
+ request_id: number;
908
+ user_is_bot?: boolean;
909
+ user_is_premium?: boolean;
910
+ max_quantity?: number;
911
+ request_name?: boolean;
912
+ request_username?: boolean;
913
+ request_photo?: boolean;
914
+ }
915
+ export interface KeyboardButtonRequestChat {
916
+ request_id: number;
917
+ chat_is_channel: boolean;
918
+ chat_is_forum?: boolean;
919
+ chat_has_username?: boolean;
920
+ chat_is_created?: boolean;
921
+ user_administrator_rights?: ChatAdministratorRights;
922
+ bot_administrator_rights?: ChatAdministratorRights;
923
+ bot_is_member?: boolean;
924
+ request_title?: boolean;
925
+ request_username?: boolean;
926
+ request_photo?: boolean;
927
+ }
928
+ export interface KeyboardButtonRequestManagedBot {
929
+ request_id: number;
930
+ suggested_name?: string;
931
+ suggested_username?: string;
932
+ }
933
+ export interface KeyboardButtonPollType {
934
+ type?: string;
935
+ }
936
+ export interface ReplyKeyboardRemove {
937
+ remove_keyboard: boolean;
938
+ selective?: boolean;
939
+ }
940
+ export interface InlineKeyboardMarkup {
941
+ inline_keyboard: InlineKeyboardButton[][];
942
+ force_reply?: boolean;
943
+ }
944
+ export interface InlineKeyboardButton {
945
+ text: string;
946
+ icon_custom_emoji_id?: string;
947
+ style?: string;
948
+ url?: string;
949
+ callback_data?: string;
950
+ web_app?: WebAppInfo;
951
+ login_url?: LoginUrl;
952
+ switch_inline_query?: string;
953
+ switch_inline_query_current_chat?: string;
954
+ switch_inline_query_chosen_chat?: SwitchInlineQueryChosenChat;
955
+ copy_text?: CopyTextButton;
956
+ callback_game?: CallbackGame;
957
+ pay?: boolean;
958
+ disabled?: DisabledButton;
959
+ }
960
+ export interface LoginUrl {
961
+ url: string;
962
+ forward_text?: string;
963
+ bot_username?: string;
964
+ request_write_access?: boolean;
965
+ }
966
+ export interface SwitchInlineQueryChosenChat {
967
+ query?: string;
968
+ allow_user_chats?: boolean;
969
+ allow_bot_chats?: boolean;
970
+ allow_group_chats?: boolean;
971
+ allow_channel_chats?: boolean;
972
+ }
973
+ export interface CopyTextButton {
974
+ text: string;
975
+ }
976
+ export interface DisabledButton {
977
+ [key: string]: unknown;
978
+ }
979
+ export interface CallbackQuery {
980
+ id: string;
981
+ from: User;
982
+ message?: MaybeInaccessibleMessage;
983
+ inline_message_id?: string;
984
+ chat_instance: string;
985
+ data?: string;
986
+ game_short_name?: string;
987
+ }
988
+ export type WidgetQueryType = WidgetQueryTypeData | WidgetQueryTypeSignData | WidgetQueryTypeSentTransaction;
989
+ export interface WidgetQueryTypeData {
990
+ type: string;
991
+ wallet_card?: TonWalletCard;
992
+ }
993
+ export interface WidgetQueryTypeSignData {
994
+ type: string;
995
+ wallet: WidgetQueryWallet;
996
+ sign_data: string;
997
+ }
998
+ export interface WidgetQueryTypeSentTransaction {
999
+ type: string;
1000
+ wallet: WidgetQueryWallet;
1001
+ msg_hash: string;
1002
+ }
1003
+ export interface WidgetQueryWallet {
1004
+ address: string;
1005
+ amount: string;
1006
+ public_key?: string;
1007
+ state_init?: string;
1008
+ }
1009
+ export interface WidgetQuery {
1010
+ id: string;
1011
+ from: User;
1012
+ chat?: Chat;
1013
+ message_id?: number;
1014
+ inline_message_id?: string;
1015
+ chat_instance: string;
1016
+ chat_type?: string;
1017
+ type: WidgetQueryType;
1018
+ data: string;
1019
+ widget_id?: string;
1020
+ }
1021
+ export interface SharedWidgetQuery {
1022
+ id: string;
1023
+ from: User;
1024
+ type: WidgetQueryType;
1025
+ data: string;
1026
+ widget_id: string;
1027
+ }
1028
+ export interface ForceReply {
1029
+ force_reply: boolean;
1030
+ input_field_placeholder?: string;
1031
+ selective?: boolean;
1032
+ }
1033
+ export interface Community {
1034
+ id: number;
1035
+ name: string;
1036
+ }
1037
+ export interface ChatPhoto {
1038
+ small_file_id: string;
1039
+ small_file_unique_id: string;
1040
+ big_file_id: string;
1041
+ big_file_unique_id: string;
1042
+ }
1043
+ export interface ChatInviteLink {
1044
+ invite_link: string;
1045
+ creator: User;
1046
+ creates_join_request: boolean;
1047
+ is_primary: boolean;
1048
+ is_revoked: boolean;
1049
+ name?: string;
1050
+ expire_date?: number;
1051
+ member_limit?: number;
1052
+ pending_join_request_count?: number;
1053
+ subscription_period?: number;
1054
+ subscription_price?: number;
1055
+ }
1056
+ export interface ChatAdministratorRights {
1057
+ is_anonymous: boolean;
1058
+ can_manage_chat: boolean;
1059
+ can_delete_messages: boolean;
1060
+ can_manage_video_chats: boolean;
1061
+ can_restrict_members: boolean;
1062
+ can_promote_members: boolean;
1063
+ can_change_info: boolean;
1064
+ can_invite_users: boolean;
1065
+ can_post_stories: boolean;
1066
+ can_edit_stories: boolean;
1067
+ can_delete_stories: boolean;
1068
+ can_post_messages?: boolean;
1069
+ can_edit_messages?: boolean;
1070
+ can_pin_messages?: boolean;
1071
+ can_manage_topics?: boolean;
1072
+ can_manage_direct_messages?: boolean;
1073
+ can_manage_tags?: boolean;
1074
+ can_send_welcome_messages: boolean;
1075
+ }
1076
+ export interface ChatMemberUpdated {
1077
+ chat: Chat;
1078
+ from: User;
1079
+ date: number;
1080
+ old_chat_member: ChatMember;
1081
+ new_chat_member: ChatMember;
1082
+ invite_link?: ChatInviteLink;
1083
+ via_join_request?: boolean;
1084
+ via_chat_folder_invite_link?: boolean;
1085
+ }
1086
+ export type ChatMember = ChatMemberOwner | ChatMemberAdministrator | ChatMemberMember | ChatMemberRestricted | ChatMemberLeft | ChatMemberBanned;
1087
+ export interface ChatMemberOwner {
1088
+ status: string;
1089
+ user: User;
1090
+ is_anonymous: boolean;
1091
+ custom_title?: string;
1092
+ }
1093
+ export interface ChatMemberAdministrator {
1094
+ status: string;
1095
+ user: User;
1096
+ can_be_edited: boolean;
1097
+ is_anonymous: boolean;
1098
+ can_manage_chat: boolean;
1099
+ can_delete_messages: boolean;
1100
+ can_manage_video_chats: boolean;
1101
+ can_restrict_members: boolean;
1102
+ can_promote_members: boolean;
1103
+ can_change_info: boolean;
1104
+ can_invite_users: boolean;
1105
+ can_post_stories: boolean;
1106
+ can_edit_stories: boolean;
1107
+ can_delete_stories: boolean;
1108
+ can_post_messages?: boolean;
1109
+ can_edit_messages?: boolean;
1110
+ can_pin_messages?: boolean;
1111
+ can_manage_topics?: boolean;
1112
+ can_manage_direct_messages?: boolean;
1113
+ can_manage_tags?: boolean;
1114
+ can_send_welcome_messages: boolean;
1115
+ custom_title?: string;
1116
+ }
1117
+ export interface ChatMemberMember {
1118
+ status: string;
1119
+ tag?: string;
1120
+ user: User;
1121
+ until_date?: number;
1122
+ }
1123
+ export interface ChatMemberRestricted {
1124
+ status: string;
1125
+ tag?: string;
1126
+ user: User;
1127
+ is_member: boolean;
1128
+ can_send_messages: boolean;
1129
+ can_send_audios: boolean;
1130
+ can_send_documents: boolean;
1131
+ can_send_photos: boolean;
1132
+ can_send_videos: boolean;
1133
+ can_send_video_notes: boolean;
1134
+ can_send_voice_notes: boolean;
1135
+ can_send_polls: boolean;
1136
+ can_send_other_messages: boolean;
1137
+ can_add_web_page_previews: boolean;
1138
+ can_react_to_messages: boolean;
1139
+ can_edit_tag: boolean;
1140
+ can_change_info: boolean;
1141
+ can_invite_users: boolean;
1142
+ can_pin_messages: boolean;
1143
+ can_manage_topics: boolean;
1144
+ until_date: number;
1145
+ }
1146
+ export interface ChatMemberLeft {
1147
+ status: string;
1148
+ user: User;
1149
+ }
1150
+ export interface ChatMemberBanned {
1151
+ status: string;
1152
+ user: User;
1153
+ until_date: number;
1154
+ }
1155
+ export interface ChatJoinRequest {
1156
+ chat: Chat;
1157
+ from: User;
1158
+ user_chat_id: number;
1159
+ date: number;
1160
+ bio?: string;
1161
+ invite_link?: ChatInviteLink;
1162
+ query_id?: string;
1163
+ }
1164
+ export interface ChatPermissions {
1165
+ can_send_messages?: boolean;
1166
+ can_send_audios?: boolean;
1167
+ can_send_documents?: boolean;
1168
+ can_send_photos?: boolean;
1169
+ can_send_videos?: boolean;
1170
+ can_send_video_notes?: boolean;
1171
+ can_send_voice_notes?: boolean;
1172
+ can_send_polls?: boolean;
1173
+ can_send_other_messages?: boolean;
1174
+ can_add_web_page_previews?: boolean;
1175
+ can_react_to_messages?: boolean;
1176
+ can_edit_tag?: boolean;
1177
+ can_change_info?: boolean;
1178
+ can_invite_users?: boolean;
1179
+ can_pin_messages?: boolean;
1180
+ can_manage_topics?: boolean;
1181
+ }
1182
+ export interface Birthdate {
1183
+ day: number;
1184
+ month: number;
1185
+ year?: number;
1186
+ }
1187
+ export interface BusinessIntro {
1188
+ title?: string;
1189
+ message?: string;
1190
+ sticker?: Sticker;
1191
+ }
1192
+ export interface BusinessLocation {
1193
+ address: string;
1194
+ location?: Location;
1195
+ }
1196
+ export interface BusinessOpeningHoursInterval {
1197
+ opening_minute: number;
1198
+ closing_minute: number;
1199
+ }
1200
+ export interface BusinessOpeningHours {
1201
+ time_zone_name: string;
1202
+ opening_hours: BusinessOpeningHoursInterval[];
1203
+ }
1204
+ export interface UserRating {
1205
+ level: number;
1206
+ rating: number;
1207
+ current_level_rating: number;
1208
+ next_level_rating?: number;
1209
+ }
1210
+ export interface AreaPosition {
1211
+ x_percentage: number;
1212
+ y_percentage: number;
1213
+ width_percentage: number;
1214
+ height_percentage: number;
1215
+ rotation_angle: number;
1216
+ corner_radius_percentage: number;
1217
+ }
1218
+ export interface TonNft {
1219
+ address: string;
1220
+ collection_address?: string;
1221
+ index: string;
1222
+ name: string;
1223
+ description: string;
1224
+ attributes?: TonNftAttribute[];
1225
+ gift?: UniqueGift;
1226
+ }
1227
+ export interface TonNftAttribute {
1228
+ trait_type: string;
1229
+ value: string;
1230
+ }
1231
+ export interface TonWalletCardSticker {
1232
+ position: AreaPosition;
1233
+ nft: TonNft;
1234
+ }
1235
+ export interface TonWalletCard {
1236
+ address: string;
1237
+ amount: string;
1238
+ stickers: TonWalletCardSticker[];
1239
+ background_nft_address?: string;
1240
+ }
1241
+ export type EmojiType = EmojiTypeEmoji | EmojiTypeCustomEmoji;
1242
+ export interface EmojiTypeEmoji {
1243
+ type: string;
1244
+ emoji: string;
1245
+ }
1246
+ export interface EmojiTypeCustomEmoji {
1247
+ type: string;
1248
+ custom_emoji_id: string;
1249
+ }
1250
+ export type ChatShareTheme = ChatShareThemeEmoji | ChatShareThemeUniqueGift;
1251
+ export interface ChatShareThemeEmoji {
1252
+ type: string;
1253
+ emojis: EmojiType[];
1254
+ background_backdrop_id?: number;
1255
+ }
1256
+ export interface ChatShareThemeUniqueGift {
1257
+ type: string;
1258
+ gift: UniqueGift;
1259
+ }
1260
+ export interface ChatShareThemeBackdrops {
1261
+ backdrops: ChatShareThemeBackdrop[];
1262
+ }
1263
+ export interface ChatShareThemeBackdrop {
1264
+ id: number;
1265
+ name: string;
1266
+ colors: UniqueGiftBackdropColors;
1267
+ }
1268
+ export interface LocationAddress {
1269
+ country_code: string;
1270
+ state?: string;
1271
+ city?: string;
1272
+ street?: string;
1273
+ }
1274
+ export type StoryAreaType = StoryAreaTypeLocation | StoryAreaTypeSuggestedReaction | StoryAreaTypeLink | StoryAreaTypeWeather | StoryAreaTypeUniqueGift;
1275
+ export interface StoryAreaTypeLocation {
1276
+ type: string;
1277
+ latitude: number;
1278
+ longitude: number;
1279
+ address?: LocationAddress;
1280
+ }
1281
+ export interface StoryAreaTypeSuggestedReaction {
1282
+ type: string;
1283
+ reaction_type: ReactionType;
1284
+ is_dark?: boolean;
1285
+ is_flipped?: boolean;
1286
+ }
1287
+ export interface StoryAreaTypeLink {
1288
+ type: string;
1289
+ url: string;
1290
+ }
1291
+ export interface StoryAreaTypeWeather {
1292
+ type: string;
1293
+ temperature: number;
1294
+ emoji: string;
1295
+ background_color: number;
1296
+ }
1297
+ export interface StoryAreaTypeUniqueGift {
1298
+ type: string;
1299
+ name: string;
1300
+ }
1301
+ export interface StoryArea {
1302
+ position: AreaPosition;
1303
+ type: StoryAreaType;
1304
+ }
1305
+ export interface ChatLocation {
1306
+ location: Location;
1307
+ address: string;
1308
+ }
1309
+ export type ReactionType = ReactionTypeEmoji | ReactionTypeCustomEmoji | ReactionTypePaid;
1310
+ export interface ReactionTypeEmoji {
1311
+ type: string;
1312
+ emoji: string;
1313
+ }
1314
+ export interface ReactionTypeCustomEmoji {
1315
+ type: string;
1316
+ custom_emoji_id: string;
1317
+ }
1318
+ export interface ReactionTypePaid {
1319
+ type: string;
1320
+ }
1321
+ export interface ReactionCount {
1322
+ type: ReactionType;
1323
+ total_count: number;
1324
+ }
1325
+ export interface MessageReactionUpdated {
1326
+ chat: Chat;
1327
+ message_id: number;
1328
+ user?: User;
1329
+ actor_chat?: Chat;
1330
+ date: number;
1331
+ old_reaction: ReactionType[];
1332
+ new_reaction: ReactionType[];
1333
+ }
1334
+ export interface MessageReactionCountUpdated {
1335
+ chat: Chat;
1336
+ message_id: number;
1337
+ date: number;
1338
+ reactions: ReactionCount[];
1339
+ }
1340
+ export interface ForumTopic {
1341
+ message_thread_id: number;
1342
+ name: string;
1343
+ icon_color: number;
1344
+ icon_custom_emoji_id?: string;
1345
+ is_name_implicit?: boolean;
1346
+ }
1347
+ export interface GiftBackground {
1348
+ center_color: number;
1349
+ edge_color: number;
1350
+ text_color: number;
1351
+ }
1352
+ export interface Gift {
1353
+ id: string;
1354
+ sticker: Sticker;
1355
+ star_count: number;
1356
+ upgrade_star_count?: number;
1357
+ is_premium?: boolean;
1358
+ has_colors?: boolean;
1359
+ total_count?: number;
1360
+ remaining_count?: number;
1361
+ personal_total_count?: number;
1362
+ personal_remaining_count?: number;
1363
+ background?: GiftBackground;
1364
+ unique_gift_variant_count?: number;
1365
+ publisher_chat?: Chat;
1366
+ }
1367
+ export interface Gifts {
1368
+ gifts: Gift[];
1369
+ }
1370
+ export interface UniqueGiftModel {
1371
+ name: string;
1372
+ sticker: Sticker;
1373
+ rarity_per_mille: number;
1374
+ rarity?: string;
1375
+ }
1376
+ export interface UniqueGiftSymbol {
1377
+ name: string;
1378
+ sticker: Sticker;
1379
+ rarity_per_mille: number;
1380
+ }
1381
+ export interface UniqueGiftBackdropColors {
1382
+ center_color: number;
1383
+ edge_color: number;
1384
+ symbol_color: number;
1385
+ text_color: number;
1386
+ }
1387
+ export interface UniqueGiftBackdrop {
1388
+ name: string;
1389
+ colors: UniqueGiftBackdropColors;
1390
+ rarity_per_mille: number;
1391
+ }
1392
+ export interface UniqueGiftColors {
1393
+ model_custom_emoji_id: string;
1394
+ symbol_custom_emoji_id: string;
1395
+ light_theme_main_color: number;
1396
+ light_theme_other_colors: number[];
1397
+ dark_theme_main_color: number;
1398
+ dark_theme_other_colors: number[];
1399
+ }
1400
+ export interface UniqueGift {
1401
+ gift_id: string;
1402
+ base_name: string;
1403
+ name: string;
1404
+ number: number;
1405
+ model: UniqueGiftModel;
1406
+ symbol: UniqueGiftSymbol;
1407
+ backdrop: UniqueGiftBackdrop;
1408
+ is_premium?: boolean;
1409
+ is_burned?: boolean;
1410
+ is_from_blockchain?: boolean;
1411
+ colors?: UniqueGiftColors;
1412
+ publisher_chat?: Chat;
1413
+ }
1414
+ export interface GiftInfo {
1415
+ gift: Gift;
1416
+ owned_gift_id?: string;
1417
+ convert_star_count?: number;
1418
+ prepaid_upgrade_star_count?: number;
1419
+ is_upgrade_separate?: boolean;
1420
+ can_be_upgraded?: boolean;
1421
+ text?: string;
1422
+ entities?: MessageEntity[];
1423
+ is_private?: boolean;
1424
+ unique_gift_number?: number;
1425
+ }
1426
+ export interface UniqueGiftInfo {
1427
+ gift: UniqueGift;
1428
+ origin: string;
1429
+ text?: string;
1430
+ entities?: MessageEntity[];
1431
+ is_private?: boolean;
1432
+ last_resale_currency?: string;
1433
+ last_resale_amount?: number;
1434
+ owned_gift_id?: string;
1435
+ transfer_star_count?: number;
1436
+ next_transfer_date?: number;
1437
+ }
1438
+ export type OwnedGift = OwnedGiftRegular | OwnedGiftUnique;
1439
+ export interface OwnedGiftRegular {
1440
+ type: string;
1441
+ gift: Gift;
1442
+ owned_gift_id?: string;
1443
+ sender_user?: User;
1444
+ send_date: number;
1445
+ text?: string;
1446
+ entities?: MessageEntity[];
1447
+ is_private?: boolean;
1448
+ is_saved?: boolean;
1449
+ can_be_upgraded?: boolean;
1450
+ was_refunded?: boolean;
1451
+ convert_star_count?: number;
1452
+ prepaid_upgrade_star_count?: number;
1453
+ is_upgrade_separate?: boolean;
1454
+ unique_gift_number?: number;
1455
+ }
1456
+ export interface OwnedGiftUnique {
1457
+ type: string;
1458
+ gift: UniqueGift;
1459
+ owned_gift_id?: string;
1460
+ sender_user?: User;
1461
+ send_date: number;
1462
+ is_saved?: boolean;
1463
+ can_be_transferred?: boolean;
1464
+ transfer_star_count?: number;
1465
+ next_transfer_date?: number;
1466
+ }
1467
+ export interface OwnedGifts {
1468
+ total_count: number;
1469
+ gifts: OwnedGift[];
1470
+ next_offset?: string;
1471
+ }
1472
+ export interface BotAccessSettings {
1473
+ is_access_restricted: boolean;
1474
+ added_users?: User[];
1475
+ }
1476
+ export interface AcceptedGiftTypes {
1477
+ unlimited_gifts: boolean;
1478
+ limited_gifts: boolean;
1479
+ unique_gifts: boolean;
1480
+ premium_subscription: boolean;
1481
+ gifts_from_channels: boolean;
1482
+ }
1483
+ export interface StarAmount {
1484
+ amount: number;
1485
+ nanostar_amount?: number;
1486
+ }
1487
+ export interface BotCommand {
1488
+ command: string;
1489
+ description: string;
1490
+ is_ephemeral?: boolean;
1491
+ }
1492
+ export type BotCommandScope = BotCommandScopeDefault | BotCommandScopeAllPrivateChats | BotCommandScopeAllGroupChats | BotCommandScopeAllChatAdministrators | BotCommandScopeChat | BotCommandScopeChatAdministrators | BotCommandScopeChatMember;
1493
+ export interface BotCommandScopeDefault {
1494
+ type: string;
1495
+ }
1496
+ export interface BotCommandScopeAllPrivateChats {
1497
+ type: string;
1498
+ }
1499
+ export interface BotCommandScopeAllGroupChats {
1500
+ type: string;
1501
+ }
1502
+ export interface BotCommandScopeAllChatAdministrators {
1503
+ type: string;
1504
+ }
1505
+ export interface BotCommandScopeChat {
1506
+ type: string;
1507
+ chat_id: number | string;
1508
+ }
1509
+ export interface BotCommandScopeChatAdministrators {
1510
+ type: string;
1511
+ chat_id: number | string;
1512
+ }
1513
+ export interface BotCommandScopeChatMember {
1514
+ type: string;
1515
+ chat_id: number | string;
1516
+ user_id: number;
1517
+ }
1518
+ export interface BotName {
1519
+ name: string;
1520
+ }
1521
+ export interface BotDescription {
1522
+ description: string;
1523
+ }
1524
+ export interface BotShortDescription {
1525
+ short_description: string;
1526
+ }
1527
+ export type MenuButton = MenuButtonCommands | MenuButtonWebApp | MenuButtonDefault;
1528
+ export interface MenuButtonCommands {
1529
+ type: string;
1530
+ }
1531
+ export interface MenuButtonWebApp {
1532
+ type: string;
1533
+ text: string;
1534
+ web_app: WebAppInfo;
1535
+ }
1536
+ export interface MenuButtonDefault {
1537
+ type: string;
1538
+ }
1539
+ export type ChatBoostSource = ChatBoostSourcePremium | ChatBoostSourceGiftCode | ChatBoostSourceGiveaway;
1540
+ export interface ChatBoostSourcePremium {
1541
+ source: string;
1542
+ user: User;
1543
+ }
1544
+ export interface ChatBoostSourceGiftCode {
1545
+ source: string;
1546
+ user: User;
1547
+ }
1548
+ export interface ChatBoostSourceGiveaway {
1549
+ source: string;
1550
+ giveaway_message_id: number;
1551
+ user?: User;
1552
+ prize_star_count?: number;
1553
+ is_unclaimed?: boolean;
1554
+ }
1555
+ export interface ChatBoost {
1556
+ boost_id: string;
1557
+ add_date: number;
1558
+ expiration_date: number;
1559
+ source: ChatBoostSource;
1560
+ }
1561
+ export interface ChatBoostUpdated {
1562
+ chat: Chat;
1563
+ boost: ChatBoost;
1564
+ }
1565
+ export interface ChatBoostRemoved {
1566
+ chat: Chat;
1567
+ boost_id: string;
1568
+ remove_date: number;
1569
+ source: ChatBoostSource;
1570
+ }
1571
+ export interface ChatOwnerLeft {
1572
+ new_owner?: User;
1573
+ }
1574
+ export interface ChatOwnerChanged {
1575
+ new_owner: User;
1576
+ }
1577
+ export interface UserChatBoosts {
1578
+ boosts: ChatBoost[];
1579
+ }
1580
+ export interface BusinessBotRights {
1581
+ can_reply?: boolean;
1582
+ can_read_messages?: boolean;
1583
+ can_delete_sent_messages?: boolean;
1584
+ can_delete_all_messages?: boolean;
1585
+ can_edit_name?: boolean;
1586
+ can_edit_bio?: boolean;
1587
+ can_edit_profile_photo?: boolean;
1588
+ can_edit_username?: boolean;
1589
+ can_change_gift_settings?: boolean;
1590
+ can_view_gifts_and_stars?: boolean;
1591
+ can_convert_gifts_to_stars?: boolean;
1592
+ can_transfer_and_upgrade_gifts?: boolean;
1593
+ can_transfer_stars?: boolean;
1594
+ can_manage_stories?: boolean;
1595
+ }
1596
+ export interface BusinessConnection {
1597
+ id: string;
1598
+ user: User;
1599
+ user_chat_id: number;
1600
+ date: number;
1601
+ rights?: BusinessBotRights;
1602
+ is_enabled: boolean;
1603
+ }
1604
+ export interface BusinessMessagesDeleted {
1605
+ business_connection_id: string;
1606
+ chat: Chat;
1607
+ message_ids: number[];
1608
+ }
1609
+ export interface SentWebAppMessage {
1610
+ inline_message_id?: string;
1611
+ }
1612
+ export interface SentGuestMessage {
1613
+ inline_message_id: string;
1614
+ }
1615
+ export interface PreparedInlineMessage {
1616
+ id: string;
1617
+ expiration_date: number;
1618
+ }
1619
+ export interface PreparedKeyboardButton {
1620
+ id: string;
1621
+ }
1622
+ export interface ResponseParameters {
1623
+ migrate_to_chat_id?: number;
1624
+ retry_after?: number;
1625
+ }
1626
+ export type InputMedia = InputMediaAnimation | InputMediaAudio | InputMediaDocument | InputMediaLivePhoto | InputMediaPhoto | InputMediaVideo;
1627
+ export interface InputMediaAnimation {
1628
+ type: string;
1629
+ media: string;
1630
+ thumbnail?: string;
1631
+ caption?: string;
1632
+ parse_mode?: string;
1633
+ caption_entities?: MessageEntity[];
1634
+ show_caption_above_media?: boolean;
1635
+ width?: number;
1636
+ height?: number;
1637
+ duration?: number;
1638
+ has_spoiler?: boolean;
1639
+ }
1640
+ export interface InputMediaAudio {
1641
+ type: string;
1642
+ media: string;
1643
+ thumbnail?: string;
1644
+ caption?: string;
1645
+ parse_mode?: string;
1646
+ caption_entities?: MessageEntity[];
1647
+ duration?: number;
1648
+ performer?: string;
1649
+ title?: string;
1650
+ }
1651
+ export interface InputMediaDocument {
1652
+ type: string;
1653
+ media: string;
1654
+ thumbnail?: string;
1655
+ caption?: string;
1656
+ parse_mode?: string;
1657
+ caption_entities?: MessageEntity[];
1658
+ disable_content_type_detection?: boolean;
1659
+ }
1660
+ export interface InputMediaLink {
1661
+ type: string;
1662
+ url: string;
1663
+ }
1664
+ export interface InputMediaLivePhoto {
1665
+ type: string;
1666
+ media: string;
1667
+ photo: string;
1668
+ caption?: string;
1669
+ parse_mode?: string;
1670
+ caption_entities?: MessageEntity[];
1671
+ show_caption_above_media?: boolean;
1672
+ has_spoiler?: boolean;
1673
+ }
1674
+ export interface InputMediaLocation {
1675
+ type: string;
1676
+ latitude: number;
1677
+ longitude: number;
1678
+ horizontal_accuracy?: number;
1679
+ }
1680
+ export interface InputMediaPhoto {
1681
+ type: string;
1682
+ media: string;
1683
+ caption?: string;
1684
+ parse_mode?: string;
1685
+ caption_entities?: MessageEntity[];
1686
+ show_caption_above_media?: boolean;
1687
+ has_spoiler?: boolean;
1688
+ }
1689
+ export interface InputMediaSticker {
1690
+ type: string;
1691
+ media: string;
1692
+ emoji?: string;
1693
+ }
1694
+ export interface InputMediaVenue {
1695
+ type: string;
1696
+ latitude: number;
1697
+ longitude: number;
1698
+ title: string;
1699
+ address: string;
1700
+ foursquare_id?: string;
1701
+ foursquare_type?: string;
1702
+ google_place_id?: string;
1703
+ google_place_type?: string;
1704
+ }
1705
+ export interface InputMediaVideo {
1706
+ type: string;
1707
+ media: string;
1708
+ thumbnail?: string;
1709
+ cover?: string;
1710
+ start_timestamp?: number;
1711
+ caption?: string;
1712
+ parse_mode?: string;
1713
+ caption_entities?: MessageEntity[];
1714
+ show_caption_above_media?: boolean;
1715
+ width?: number;
1716
+ height?: number;
1717
+ duration?: number;
1718
+ supports_streaming?: boolean;
1719
+ has_spoiler?: boolean;
1720
+ }
1721
+ export interface InputMediaVoiceNote {
1722
+ type: string;
1723
+ media: string;
1724
+ caption?: string;
1725
+ parse_mode?: string;
1726
+ caption_entities?: MessageEntity[];
1727
+ duration?: number;
1728
+ }
1729
+ export type InputPaidMedia = InputPaidMediaLivePhoto | InputPaidMediaPhoto | InputPaidMediaVideo;
1730
+ export interface InputPaidMediaLivePhoto {
1731
+ type: string;
1732
+ media: string;
1733
+ photo: string;
1734
+ }
1735
+ export interface InputPaidMediaPhoto {
1736
+ type: string;
1737
+ media: string;
1738
+ }
1739
+ export interface InputPaidMediaVideo {
1740
+ type: string;
1741
+ media: string;
1742
+ thumbnail?: string;
1743
+ cover?: string;
1744
+ start_timestamp?: number;
1745
+ width?: number;
1746
+ height?: number;
1747
+ duration?: number;
1748
+ supports_streaming?: boolean;
1749
+ }
1750
+ export type InputProfilePhoto = InputProfilePhotoStatic | InputProfilePhotoAnimated;
1751
+ export interface InputProfilePhotoStatic {
1752
+ type: string;
1753
+ photo: string;
1754
+ }
1755
+ export interface InputProfilePhotoAnimated {
1756
+ type: string;
1757
+ animation: string;
1758
+ main_frame_timestamp?: number;
1759
+ }
1760
+ export type InputStoryContent = InputStoryContentPhoto | InputStoryContentVideo;
1761
+ export interface InputStoryContentPhoto {
1762
+ type: string;
1763
+ photo: string;
1764
+ }
1765
+ export interface InputStoryContentVideo {
1766
+ type: string;
1767
+ video: string;
1768
+ duration?: number;
1769
+ cover_frame_timestamp?: number;
1770
+ is_animation?: boolean;
1771
+ }
1772
+ export interface Sticker {
1773
+ file_id: string;
1774
+ file_unique_id: string;
1775
+ type: string;
1776
+ width: number;
1777
+ height: number;
1778
+ is_animated: boolean;
1779
+ is_video: boolean;
1780
+ thumbnail?: PhotoSize;
1781
+ emoji?: string;
1782
+ set_name?: string;
1783
+ premium_animation?: File;
1784
+ mask_position?: MaskPosition;
1785
+ custom_emoji_id?: string;
1786
+ needs_repainting?: boolean;
1787
+ file_size?: number;
1788
+ }
1789
+ export interface StickerSet {
1790
+ name: string;
1791
+ title: string;
1792
+ sticker_type: string;
1793
+ stickers: Sticker[];
1794
+ thumbnail?: PhotoSize;
1795
+ }
1796
+ export interface MaskPosition {
1797
+ point: string;
1798
+ x_shift: number;
1799
+ y_shift: number;
1800
+ scale: number;
1801
+ }
1802
+ export interface InputSticker {
1803
+ sticker: string;
1804
+ format: string;
1805
+ emoji_list: string[];
1806
+ mask_position?: MaskPosition;
1807
+ keywords?: string[];
1808
+ }
1809
+ export interface RichMessage {
1810
+ blocks: RichBlock[];
1811
+ is_rtl?: boolean;
1812
+ }
1813
+ export interface InputRichMessage {
1814
+ blocks?: InputRichBlock[];
1815
+ html?: string;
1816
+ markdown?: string;
1817
+ media?: InputRichMessageMedia[];
1818
+ is_rtl?: boolean;
1819
+ skip_entity_detection?: boolean;
1820
+ }
1821
+ export interface InputRichMessageMedia {
1822
+ id: string;
1823
+ media: InputMediaAnimation | InputMediaAudio | InputMediaDocument | InputMediaPhoto | InputMediaVideo | InputMediaVoiceNote;
1824
+ }
1825
+ export interface RichMessageButton {
1826
+ text: RichText;
1827
+ style?: string;
1828
+ url?: string;
1829
+ callback_data?: string;
1830
+ web_app?: WebAppInfo;
1831
+ login_url?: LoginUrl;
1832
+ switch_inline_query?: string;
1833
+ switch_inline_query_current_chat?: string;
1834
+ switch_inline_query_chosen_chat?: SwitchInlineQueryChosenChat;
1835
+ copy_text?: CopyTextButton;
1836
+ disabled?: DisabledButton;
1837
+ }
1838
+ export type RichText = RichTextBold | RichTextItalic | RichTextUnderline | RichTextStrikethrough | RichTextSpoiler | RichTextDateTime | RichTextTextMention | RichTextSubscript | RichTextSuperscript | RichTextMarked | RichTextCode | RichTextCustomEmoji | RichTextMathematicalExpression | RichTextUrl | RichTextEmailAddress | RichTextPhoneNumber | RichTextBankCardNumber | RichTextTonAddress | RichTextMention | RichTextHashtag | RichTextCashtag | RichTextBotCommand | RichTextButton | RichTextAnchor | RichTextAnchorLink | RichTextReference | RichTextReferenceLink;
1839
+ export interface RichTextBold {
1840
+ type: string;
1841
+ text: RichText;
1842
+ }
1843
+ export interface RichTextItalic {
1844
+ type: string;
1845
+ text: RichText;
1846
+ }
1847
+ export interface RichTextUnderline {
1848
+ type: string;
1849
+ text: RichText;
1850
+ }
1851
+ export interface RichTextStrikethrough {
1852
+ type: string;
1853
+ text: RichText;
1854
+ }
1855
+ export interface RichTextSpoiler {
1856
+ type: string;
1857
+ text: RichText;
1858
+ }
1859
+ export interface RichTextDateTime {
1860
+ type: string;
1861
+ text: RichText;
1862
+ unix_time: number;
1863
+ date_time_format: string;
1864
+ }
1865
+ export interface RichTextTextMention {
1866
+ type: string;
1867
+ text: RichText;
1868
+ user: User;
1869
+ }
1870
+ export interface RichTextSubscript {
1871
+ type: string;
1872
+ text: RichText;
1873
+ }
1874
+ export interface RichTextSuperscript {
1875
+ type: string;
1876
+ text: RichText;
1877
+ }
1878
+ export interface RichTextMarked {
1879
+ type: string;
1880
+ text: RichText;
1881
+ }
1882
+ export interface RichTextCode {
1883
+ type: string;
1884
+ text: RichText;
1885
+ }
1886
+ export interface RichTextCustomEmoji {
1887
+ type: string;
1888
+ custom_emoji_id: string;
1889
+ alternative_text: string;
1890
+ }
1891
+ export interface RichTextMathematicalExpression {
1892
+ type: string;
1893
+ expression: string;
1894
+ }
1895
+ export interface RichTextUrl {
1896
+ type: string;
1897
+ text: RichText;
1898
+ url: string;
1899
+ }
1900
+ export interface RichTextEmailAddress {
1901
+ type: string;
1902
+ text: RichText;
1903
+ email_address: string;
1904
+ }
1905
+ export interface RichTextPhoneNumber {
1906
+ type: string;
1907
+ text: RichText;
1908
+ phone_number: string;
1909
+ }
1910
+ export interface RichTextBankCardNumber {
1911
+ type: string;
1912
+ text: RichText;
1913
+ bank_card_number: string;
1914
+ }
1915
+ export interface RichTextTonAddress {
1916
+ type: string;
1917
+ text: RichText;
1918
+ address: string;
1919
+ }
1920
+ export interface RichTextMention {
1921
+ type: string;
1922
+ text: RichText;
1923
+ username: string;
1924
+ }
1925
+ export interface RichTextHashtag {
1926
+ type: string;
1927
+ text: RichText;
1928
+ hashtag: string;
1929
+ }
1930
+ export interface RichTextCashtag {
1931
+ type: string;
1932
+ text: RichText;
1933
+ cashtag: string;
1934
+ }
1935
+ export interface RichTextBotCommand {
1936
+ type: string;
1937
+ text: RichText;
1938
+ bot_command: string;
1939
+ }
1940
+ export interface RichTextButton {
1941
+ type: string;
1942
+ button: RichMessageButton;
1943
+ }
1944
+ export interface RichTextAnchor {
1945
+ type: string;
1946
+ name: string;
1947
+ }
1948
+ export interface RichTextAnchorLink {
1949
+ type: string;
1950
+ text: RichText;
1951
+ anchor_name: string;
1952
+ }
1953
+ export interface RichTextReference {
1954
+ type: string;
1955
+ text: RichText;
1956
+ name: string;
1957
+ }
1958
+ export interface RichTextReferenceLink {
1959
+ type: string;
1960
+ text: RichText;
1961
+ reference_name: string;
1962
+ }
1963
+ export interface RichBlockCaption {
1964
+ text: RichText;
1965
+ credit?: RichText;
1966
+ }
1967
+ export interface RichBlockTableCell {
1968
+ text?: RichText;
1969
+ is_header?: boolean;
1970
+ colspan?: number;
1971
+ rowspan?: number;
1972
+ align: string;
1973
+ valign: string;
1974
+ }
1975
+ export interface RichBlockListItem {
1976
+ label: string;
1977
+ blocks: RichBlock[];
1978
+ has_checkbox?: boolean;
1979
+ is_checked?: boolean;
1980
+ value?: number;
1981
+ type?: string;
1982
+ }
1983
+ export type RichBlock = RichBlockParagraph | RichBlockSectionHeading | RichBlockPreformatted | RichBlockFooter | RichBlockDivider | RichBlockMathematicalExpression | RichBlockAnchor | RichBlockList | RichBlockBlockQuotation | RichBlockExpandableBlockQuotation | RichBlockPullQuotation | RichBlockCollage | RichBlockSlideshow | RichBlockTable | RichBlockDetails | RichBlockMap | RichBlockButtons | RichBlockAnimation | RichBlockAudio | RichBlockDocument | RichBlockPhoto | RichBlockVideo | RichBlockVoiceNote | RichBlockThinking;
1984
+ export interface RichBlockParagraph {
1985
+ type: string;
1986
+ text: RichText;
1987
+ }
1988
+ export interface RichBlockSectionHeading {
1989
+ type: string;
1990
+ text: RichText;
1991
+ size: number;
1992
+ }
1993
+ export interface RichBlockPreformatted {
1994
+ type: string;
1995
+ text: RichText;
1996
+ language?: string;
1997
+ }
1998
+ export interface RichBlockFooter {
1999
+ type: string;
2000
+ text: RichText;
2001
+ }
2002
+ export interface RichBlockDivider {
2003
+ type: string;
2004
+ }
2005
+ export interface RichBlockMathematicalExpression {
2006
+ type: string;
2007
+ expression: string;
2008
+ }
2009
+ export interface RichBlockAnchor {
2010
+ type: string;
2011
+ name: string;
2012
+ }
2013
+ export interface RichBlockList {
2014
+ type: string;
2015
+ items: RichBlockListItem[];
2016
+ }
2017
+ export interface RichBlockBlockQuotation {
2018
+ type: string;
2019
+ blocks: RichBlock[];
2020
+ credit?: RichText;
2021
+ }
2022
+ export interface RichBlockExpandableBlockQuotation {
2023
+ type: string;
2024
+ blocks: RichBlock[];
2025
+ credit?: RichText;
2026
+ }
2027
+ export interface RichBlockPullQuotation {
2028
+ type: string;
2029
+ text: RichText;
2030
+ credit?: RichText;
2031
+ }
2032
+ export interface RichBlockCollage {
2033
+ type: string;
2034
+ blocks: RichBlock[];
2035
+ caption?: RichBlockCaption;
2036
+ }
2037
+ export interface RichBlockSlideshow {
2038
+ type: string;
2039
+ blocks: RichBlock[];
2040
+ caption?: RichBlockCaption;
2041
+ }
2042
+ export interface RichBlockTable {
2043
+ type: string;
2044
+ cells: RichBlockTableCell[][];
2045
+ is_bordered?: boolean;
2046
+ is_striped?: boolean;
2047
+ is_compact?: boolean;
2048
+ caption?: RichText;
2049
+ }
2050
+ export interface RichBlockDetails {
2051
+ type: string;
2052
+ summary: RichText;
2053
+ blocks: RichBlock[];
2054
+ is_open?: boolean;
2055
+ }
2056
+ export interface RichBlockMap {
2057
+ type: string;
2058
+ location: Location;
2059
+ zoom: number;
2060
+ width: number;
2061
+ height: number;
2062
+ caption?: RichBlockCaption;
2063
+ }
2064
+ export interface RichBlockButtons {
2065
+ type: string;
2066
+ buttons: RichMessageButton[];
2067
+ align?: string;
2068
+ }
2069
+ export interface RichBlockAnimation {
2070
+ type: string;
2071
+ animation: Animation;
2072
+ has_spoiler?: boolean;
2073
+ caption?: RichBlockCaption;
2074
+ }
2075
+ export interface RichBlockAudio {
2076
+ type: string;
2077
+ audio: Audio;
2078
+ caption?: RichBlockCaption;
2079
+ }
2080
+ export interface RichBlockDocument {
2081
+ type: string;
2082
+ document: Document;
2083
+ caption?: RichBlockCaption;
2084
+ }
2085
+ export interface RichBlockPhoto {
2086
+ type: string;
2087
+ photo: PhotoSize[];
2088
+ has_spoiler?: boolean;
2089
+ caption?: RichBlockCaption;
2090
+ }
2091
+ export interface RichBlockVideo {
2092
+ type: string;
2093
+ video: Video;
2094
+ has_spoiler?: boolean;
2095
+ caption?: RichBlockCaption;
2096
+ }
2097
+ export interface RichBlockVoiceNote {
2098
+ type: string;
2099
+ voice_note: Voice;
2100
+ caption?: RichBlockCaption;
2101
+ }
2102
+ export interface RichBlockThinking {
2103
+ type: string;
2104
+ text: RichText;
2105
+ }
2106
+ export interface InputRichBlockListItem {
2107
+ blocks: InputRichBlock[];
2108
+ has_checkbox?: boolean;
2109
+ is_checked?: boolean;
2110
+ value?: number;
2111
+ type?: string;
2112
+ }
2113
+ export type InputRichBlock = InputRichBlockParagraph | InputRichBlockSectionHeading | InputRichBlockPreformatted | InputRichBlockFooter | InputRichBlockDivider | InputRichBlockMathematicalExpression | InputRichBlockAnchor | InputRichBlockList | InputRichBlockBlockQuotation | InputRichBlockExpandableBlockQuotation | InputRichBlockPullQuotation | InputRichBlockCollage | InputRichBlockSlideshow | InputRichBlockTable | InputRichBlockDetails | InputRichBlockMap | InputRichBlockButtons | InputRichBlockAnimation | InputRichBlockAudio | InputRichBlockDocument | InputRichBlockPhoto | InputRichBlockVideo | InputRichBlockVoiceNote | InputRichBlockThinking;
2114
+ export interface InputRichBlockParagraph {
2115
+ type: string;
2116
+ text: RichText;
2117
+ }
2118
+ export interface InputRichBlockSectionHeading {
2119
+ type: string;
2120
+ text: RichText;
2121
+ size: number;
2122
+ }
2123
+ export interface InputRichBlockPreformatted {
2124
+ type: string;
2125
+ text: RichText;
2126
+ language?: string;
2127
+ }
2128
+ export interface InputRichBlockFooter {
2129
+ type: string;
2130
+ text: RichText;
2131
+ }
2132
+ export interface InputRichBlockDivider {
2133
+ type: string;
2134
+ }
2135
+ export interface InputRichBlockMathematicalExpression {
2136
+ type: string;
2137
+ expression: string;
2138
+ }
2139
+ export interface InputRichBlockAnchor {
2140
+ type: string;
2141
+ name: string;
2142
+ }
2143
+ export interface InputRichBlockList {
2144
+ type: string;
2145
+ items: InputRichBlockListItem[];
2146
+ }
2147
+ export interface InputRichBlockBlockQuotation {
2148
+ type: string;
2149
+ blocks: InputRichBlock[];
2150
+ credit?: RichText;
2151
+ }
2152
+ export interface InputRichBlockExpandableBlockQuotation {
2153
+ type: string;
2154
+ blocks: InputRichBlock[];
2155
+ credit?: RichText;
2156
+ }
2157
+ export interface InputRichBlockPullQuotation {
2158
+ type: string;
2159
+ text: RichText;
2160
+ credit?: RichText;
2161
+ }
2162
+ export interface InputRichBlockCollage {
2163
+ type: string;
2164
+ blocks: InputRichBlock[];
2165
+ caption?: RichBlockCaption;
2166
+ }
2167
+ export interface InputRichBlockSlideshow {
2168
+ type: string;
2169
+ blocks: InputRichBlock[];
2170
+ caption?: RichBlockCaption;
2171
+ }
2172
+ export interface InputRichBlockTable {
2173
+ type: string;
2174
+ cells: RichBlockTableCell[][];
2175
+ is_bordered?: boolean;
2176
+ is_striped?: boolean;
2177
+ is_compact?: boolean;
2178
+ caption?: RichText;
2179
+ }
2180
+ export interface InputRichBlockDetails {
2181
+ type: string;
2182
+ summary: RichText;
2183
+ blocks: InputRichBlock[];
2184
+ is_open?: boolean;
2185
+ }
2186
+ export interface InputRichBlockMap {
2187
+ type: string;
2188
+ location: Location;
2189
+ zoom?: number;
2190
+ width?: number;
2191
+ height?: number;
2192
+ caption?: RichBlockCaption;
2193
+ }
2194
+ export interface InputRichBlockButtons {
2195
+ type: string;
2196
+ buttons: RichMessageButton[];
2197
+ align?: string;
2198
+ }
2199
+ export interface InputRichBlockAnimation {
2200
+ type: string;
2201
+ animation: InputMediaAnimation;
2202
+ caption?: RichBlockCaption;
2203
+ }
2204
+ export interface InputRichBlockAudio {
2205
+ type: string;
2206
+ audio: InputMediaAudio;
2207
+ caption?: RichBlockCaption;
2208
+ }
2209
+ export interface InputRichBlockDocument {
2210
+ type: string;
2211
+ document: InputMediaDocument;
2212
+ caption?: RichBlockCaption;
2213
+ }
2214
+ export interface InputRichBlockPhoto {
2215
+ type: string;
2216
+ photo: InputMediaPhoto;
2217
+ caption?: RichBlockCaption;
2218
+ }
2219
+ export interface InputRichBlockVideo {
2220
+ type: string;
2221
+ video: InputMediaVideo;
2222
+ caption?: RichBlockCaption;
2223
+ }
2224
+ export interface InputRichBlockVoiceNote {
2225
+ type: string;
2226
+ voice_note: InputMediaVoiceNote;
2227
+ caption?: RichBlockCaption;
2228
+ }
2229
+ export interface InputRichBlockThinking {
2230
+ type: string;
2231
+ text: RichText;
2232
+ }
2233
+ export interface InlineQuery {
2234
+ id: string;
2235
+ from: User;
2236
+ query: string;
2237
+ offset: string;
2238
+ chat_type?: string;
2239
+ location?: Location;
2240
+ }
2241
+ export interface InlineQueryResultsButton {
2242
+ text: string;
2243
+ web_app?: WebAppInfo;
2244
+ start_parameter?: string;
2245
+ }
2246
+ export type InlineQueryResult = InlineQueryResultCachedAudio | InlineQueryResultCachedDocument | InlineQueryResultCachedGif | InlineQueryResultCachedMpeg4Gif | InlineQueryResultCachedPhoto | InlineQueryResultCachedSticker | InlineQueryResultCachedVideo | InlineQueryResultCachedVoice | InlineQueryResultArticle | InlineQueryResultAudio | InlineQueryResultContact | InlineQueryResultGame | InlineQueryResultDocument | InlineQueryResultGif | InlineQueryResultLocation | InlineQueryResultMpeg4Gif | InlineQueryResultPhoto | InlineQueryResultVenue | InlineQueryResultVideo | InlineQueryResultVoice;
2247
+ export interface InlineQueryResultArticle {
2248
+ type: string;
2249
+ id: string;
2250
+ title: string;
2251
+ input_message_content: InputMessageContent;
2252
+ reply_markup?: InlineKeyboardMarkup;
2253
+ url?: string;
2254
+ description?: string;
2255
+ thumbnail_url?: string;
2256
+ thumbnail_width?: number;
2257
+ thumbnail_height?: number;
2258
+ }
2259
+ export interface InlineQueryResultPhoto {
2260
+ type: string;
2261
+ id: string;
2262
+ photo_url: string;
2263
+ thumbnail_url: string;
2264
+ photo_width?: number;
2265
+ photo_height?: number;
2266
+ title?: string;
2267
+ description?: string;
2268
+ caption?: string;
2269
+ parse_mode?: string;
2270
+ caption_entities?: MessageEntity[];
2271
+ show_caption_above_media?: boolean;
2272
+ reply_markup?: InlineKeyboardMarkup;
2273
+ input_message_content?: InputMessageContent;
2274
+ }
2275
+ export interface InlineQueryResultGif {
2276
+ type: string;
2277
+ id: string;
2278
+ gif_url: string;
2279
+ gif_width?: number;
2280
+ gif_height?: number;
2281
+ gif_duration?: number;
2282
+ thumbnail_url: string;
2283
+ thumbnail_mime_type?: string;
2284
+ title?: string;
2285
+ caption?: string;
2286
+ parse_mode?: string;
2287
+ caption_entities?: MessageEntity[];
2288
+ show_caption_above_media?: boolean;
2289
+ reply_markup?: InlineKeyboardMarkup;
2290
+ input_message_content?: InputMessageContent;
2291
+ }
2292
+ export interface InlineQueryResultMpeg4Gif {
2293
+ type: string;
2294
+ id: string;
2295
+ mpeg4_url: string;
2296
+ mpeg4_width?: number;
2297
+ mpeg4_height?: number;
2298
+ mpeg4_duration?: number;
2299
+ thumbnail_url: string;
2300
+ thumbnail_mime_type?: string;
2301
+ title?: string;
2302
+ caption?: string;
2303
+ parse_mode?: string;
2304
+ caption_entities?: MessageEntity[];
2305
+ show_caption_above_media?: boolean;
2306
+ reply_markup?: InlineKeyboardMarkup;
2307
+ input_message_content?: InputMessageContent;
2308
+ }
2309
+ export interface InlineQueryResultVideo {
2310
+ type: string;
2311
+ id: string;
2312
+ video_url: string;
2313
+ mime_type: string;
2314
+ thumbnail_url: string;
2315
+ title: string;
2316
+ caption?: string;
2317
+ parse_mode?: string;
2318
+ caption_entities?: MessageEntity[];
2319
+ show_caption_above_media?: boolean;
2320
+ video_width?: number;
2321
+ video_height?: number;
2322
+ video_duration?: number;
2323
+ description?: string;
2324
+ reply_markup?: InlineKeyboardMarkup;
2325
+ input_message_content?: InputMessageContent;
2326
+ }
2327
+ export interface InlineQueryResultAudio {
2328
+ type: string;
2329
+ id: string;
2330
+ audio_url: string;
2331
+ title: string;
2332
+ caption?: string;
2333
+ parse_mode?: string;
2334
+ caption_entities?: MessageEntity[];
2335
+ performer?: string;
2336
+ audio_duration?: number;
2337
+ reply_markup?: InlineKeyboardMarkup;
2338
+ input_message_content?: InputMessageContent;
2339
+ }
2340
+ export interface InlineQueryResultVoice {
2341
+ type: string;
2342
+ id: string;
2343
+ voice_url: string;
2344
+ title: string;
2345
+ caption?: string;
2346
+ parse_mode?: string;
2347
+ caption_entities?: MessageEntity[];
2348
+ voice_duration?: number;
2349
+ reply_markup?: InlineKeyboardMarkup;
2350
+ input_message_content?: InputMessageContent;
2351
+ }
2352
+ export interface InlineQueryResultDocument {
2353
+ type: string;
2354
+ id: string;
2355
+ title: string;
2356
+ caption?: string;
2357
+ parse_mode?: string;
2358
+ caption_entities?: MessageEntity[];
2359
+ document_url: string;
2360
+ mime_type: string;
2361
+ description?: string;
2362
+ reply_markup?: InlineKeyboardMarkup;
2363
+ input_message_content?: InputMessageContent;
2364
+ thumbnail_url?: string;
2365
+ thumbnail_width?: number;
2366
+ thumbnail_height?: number;
2367
+ }
2368
+ export interface InlineQueryResultLocation {
2369
+ type: string;
2370
+ id: string;
2371
+ latitude: number;
2372
+ longitude: number;
2373
+ title: string;
2374
+ horizontal_accuracy?: number;
2375
+ live_period?: number;
2376
+ heading?: number;
2377
+ proximity_alert_radius?: number;
2378
+ reply_markup?: InlineKeyboardMarkup;
2379
+ input_message_content?: InputMessageContent;
2380
+ thumbnail_url?: string;
2381
+ thumbnail_width?: number;
2382
+ thumbnail_height?: number;
2383
+ }
2384
+ export interface InlineQueryResultVenue {
2385
+ type: string;
2386
+ id: string;
2387
+ latitude: number;
2388
+ longitude: number;
2389
+ title: string;
2390
+ address: string;
2391
+ foursquare_id?: string;
2392
+ foursquare_type?: string;
2393
+ google_place_id?: string;
2394
+ google_place_type?: string;
2395
+ reply_markup?: InlineKeyboardMarkup;
2396
+ input_message_content?: InputMessageContent;
2397
+ thumbnail_url?: string;
2398
+ thumbnail_width?: number;
2399
+ thumbnail_height?: number;
2400
+ }
2401
+ export interface InlineQueryResultContact {
2402
+ type: string;
2403
+ id: string;
2404
+ phone_number: string;
2405
+ first_name: string;
2406
+ last_name?: string;
2407
+ vcard?: string;
2408
+ reply_markup?: InlineKeyboardMarkup;
2409
+ input_message_content?: InputMessageContent;
2410
+ thumbnail_url?: string;
2411
+ thumbnail_width?: number;
2412
+ thumbnail_height?: number;
2413
+ }
2414
+ export interface InlineQueryResultGame {
2415
+ type: string;
2416
+ id: string;
2417
+ game_short_name: string;
2418
+ reply_markup?: InlineKeyboardMarkup;
2419
+ }
2420
+ export interface InlineQueryResultCachedPhoto {
2421
+ type: string;
2422
+ id: string;
2423
+ photo_file_id: string;
2424
+ title?: string;
2425
+ description?: string;
2426
+ caption?: string;
2427
+ parse_mode?: string;
2428
+ caption_entities?: MessageEntity[];
2429
+ show_caption_above_media?: boolean;
2430
+ reply_markup?: InlineKeyboardMarkup;
2431
+ input_message_content?: InputMessageContent;
2432
+ }
2433
+ export interface InlineQueryResultCachedGif {
2434
+ type: string;
2435
+ id: string;
2436
+ gif_file_id: string;
2437
+ title?: string;
2438
+ caption?: string;
2439
+ parse_mode?: string;
2440
+ caption_entities?: MessageEntity[];
2441
+ show_caption_above_media?: boolean;
2442
+ reply_markup?: InlineKeyboardMarkup;
2443
+ input_message_content?: InputMessageContent;
2444
+ }
2445
+ export interface InlineQueryResultCachedMpeg4Gif {
2446
+ type: string;
2447
+ id: string;
2448
+ mpeg4_file_id: string;
2449
+ title?: string;
2450
+ caption?: string;
2451
+ parse_mode?: string;
2452
+ caption_entities?: MessageEntity[];
2453
+ show_caption_above_media?: boolean;
2454
+ reply_markup?: InlineKeyboardMarkup;
2455
+ input_message_content?: InputMessageContent;
2456
+ }
2457
+ export interface InlineQueryResultCachedSticker {
2458
+ type: string;
2459
+ id: string;
2460
+ sticker_file_id: string;
2461
+ reply_markup?: InlineKeyboardMarkup;
2462
+ input_message_content?: InputMessageContent;
2463
+ }
2464
+ export interface InlineQueryResultCachedDocument {
2465
+ type: string;
2466
+ id: string;
2467
+ title: string;
2468
+ document_file_id: string;
2469
+ description?: string;
2470
+ caption?: string;
2471
+ parse_mode?: string;
2472
+ caption_entities?: MessageEntity[];
2473
+ reply_markup?: InlineKeyboardMarkup;
2474
+ input_message_content?: InputMessageContent;
2475
+ }
2476
+ export interface InlineQueryResultCachedVideo {
2477
+ type: string;
2478
+ id: string;
2479
+ video_file_id: string;
2480
+ title: string;
2481
+ description?: string;
2482
+ caption?: string;
2483
+ parse_mode?: string;
2484
+ caption_entities?: MessageEntity[];
2485
+ show_caption_above_media?: boolean;
2486
+ reply_markup?: InlineKeyboardMarkup;
2487
+ input_message_content?: InputMessageContent;
2488
+ }
2489
+ export interface InlineQueryResultCachedVoice {
2490
+ type: string;
2491
+ id: string;
2492
+ voice_file_id: string;
2493
+ title: string;
2494
+ caption?: string;
2495
+ parse_mode?: string;
2496
+ caption_entities?: MessageEntity[];
2497
+ reply_markup?: InlineKeyboardMarkup;
2498
+ input_message_content?: InputMessageContent;
2499
+ }
2500
+ export interface InlineQueryResultCachedAudio {
2501
+ type: string;
2502
+ id: string;
2503
+ audio_file_id: string;
2504
+ caption?: string;
2505
+ parse_mode?: string;
2506
+ caption_entities?: MessageEntity[];
2507
+ reply_markup?: InlineKeyboardMarkup;
2508
+ input_message_content?: InputMessageContent;
2509
+ }
2510
+ export type InputMessageContent = InputTextMessageContent | InputRichMessageContent | InputLocationMessageContent | InputVenueMessageContent | InputContactMessageContent | InputInvoiceMessageContent | InputWidgetMessageContent | InputSharedWidgetMessageContent;
2511
+ export interface InputTextMessageContent {
2512
+ message_text: string;
2513
+ parse_mode?: string;
2514
+ entities?: MessageEntity[];
2515
+ link_preview_options?: LinkPreviewOptions;
2516
+ }
2517
+ export interface InputRichMessageContent {
2518
+ rich_message: InputRichMessage;
2519
+ }
2520
+ export interface InputLocationMessageContent {
2521
+ latitude: number;
2522
+ longitude: number;
2523
+ horizontal_accuracy?: number;
2524
+ live_period?: number;
2525
+ heading?: number;
2526
+ proximity_alert_radius?: number;
2527
+ }
2528
+ export interface InputVenueMessageContent {
2529
+ latitude: number;
2530
+ longitude: number;
2531
+ title: string;
2532
+ address: string;
2533
+ foursquare_id?: string;
2534
+ foursquare_type?: string;
2535
+ google_place_id?: string;
2536
+ google_place_type?: string;
2537
+ }
2538
+ export interface InputContactMessageContent {
2539
+ phone_number: string;
2540
+ first_name: string;
2541
+ last_name?: string;
2542
+ vcard?: string;
2543
+ }
2544
+ export interface InputInvoiceMessageContent {
2545
+ title: string;
2546
+ description: string;
2547
+ payload: string;
2548
+ provider_token?: string;
2549
+ currency: string;
2550
+ prices: LabeledPrice[];
2551
+ max_tip_amount?: number;
2552
+ suggested_tip_amounts?: number[];
2553
+ provider_data?: string;
2554
+ photo_url?: string;
2555
+ photo_size?: number;
2556
+ photo_width?: number;
2557
+ photo_height?: number;
2558
+ need_name?: boolean;
2559
+ need_phone_number?: boolean;
2560
+ need_email?: boolean;
2561
+ need_shipping_address?: boolean;
2562
+ send_phone_number_to_provider?: boolean;
2563
+ send_email_to_provider?: boolean;
2564
+ is_flexible?: boolean;
2565
+ }
2566
+ export interface InputWidgetMessageContent {
2567
+ html: string;
2568
+ width?: number;
2569
+ height?: number;
2570
+ public_data?: string;
2571
+ chat_data?: string;
2572
+ caption?: string;
2573
+ parse_mode?: string;
2574
+ caption_entities?: MessageEntity[];
2575
+ show_caption_above_media?: boolean;
2576
+ allow_queries?: boolean;
2577
+ is_shared?: boolean;
2578
+ }
2579
+ export interface InputSharedWidgetMessageContent {
2580
+ widget_id: string;
2581
+ chat_data?: string;
2582
+ caption?: string;
2583
+ parse_mode?: string;
2584
+ caption_entities?: MessageEntity[];
2585
+ show_caption_above_media?: boolean;
2586
+ }
2587
+ export interface ChosenInlineResult {
2588
+ result_id: string;
2589
+ from: User;
2590
+ location?: Location;
2591
+ inline_message_id?: string;
2592
+ query: string;
2593
+ }
2594
+ export interface LabeledPrice {
2595
+ label: string;
2596
+ amount: number;
2597
+ }
2598
+ export interface Invoice {
2599
+ title: string;
2600
+ description: string;
2601
+ start_parameter: string;
2602
+ currency: string;
2603
+ total_amount: number;
2604
+ }
2605
+ export interface ShippingAddress {
2606
+ country_code: string;
2607
+ state: string;
2608
+ city: string;
2609
+ street_line1: string;
2610
+ street_line2: string;
2611
+ post_code: string;
2612
+ }
2613
+ export interface OrderInfo {
2614
+ name?: string;
2615
+ phone_number?: string;
2616
+ email?: string;
2617
+ shipping_address?: ShippingAddress;
2618
+ }
2619
+ export interface ShippingOption {
2620
+ id: string;
2621
+ title: string;
2622
+ prices: LabeledPrice[];
2623
+ }
2624
+ export interface SuccessfulPayment {
2625
+ currency: string;
2626
+ total_amount: number;
2627
+ invoice_payload: string;
2628
+ subscription_expiration_date?: number;
2629
+ is_recurring?: boolean;
2630
+ is_first_recurring?: boolean;
2631
+ shipping_option_id?: string;
2632
+ order_info?: OrderInfo;
2633
+ telegram_payment_charge_id: string;
2634
+ provider_payment_charge_id: string;
2635
+ }
2636
+ export interface RefundedPayment {
2637
+ currency: string;
2638
+ total_amount: number;
2639
+ invoice_payload: string;
2640
+ telegram_payment_charge_id: string;
2641
+ provider_payment_charge_id?: string;
2642
+ }
2643
+ export interface ShippingQuery {
2644
+ id: string;
2645
+ from: User;
2646
+ invoice_payload: string;
2647
+ shipping_address: ShippingAddress;
2648
+ }
2649
+ export interface PreCheckoutQuery {
2650
+ id: string;
2651
+ from: User;
2652
+ currency: string;
2653
+ total_amount: number;
2654
+ invoice_payload: string;
2655
+ shipping_option_id?: string;
2656
+ order_info?: OrderInfo;
2657
+ }
2658
+ export interface PaidMediaPurchased {
2659
+ from: User;
2660
+ paid_media_payload: string;
2661
+ }
2662
+ export type RevenueWithdrawalState = RevenueWithdrawalStatePending | RevenueWithdrawalStateSucceeded | RevenueWithdrawalStateFailed;
2663
+ export interface RevenueWithdrawalStatePending {
2664
+ type: string;
2665
+ }
2666
+ export interface RevenueWithdrawalStateSucceeded {
2667
+ type: string;
2668
+ date: number;
2669
+ url: string;
2670
+ }
2671
+ export interface RevenueWithdrawalStateFailed {
2672
+ type: string;
2673
+ }
2674
+ export interface AffiliateInfo {
2675
+ affiliate_user?: User;
2676
+ affiliate_chat?: Chat;
2677
+ commission_per_mille: number;
2678
+ amount: number;
2679
+ nanostar_amount?: number;
2680
+ }
2681
+ export type TransactionPartner = TransactionPartnerUser | TransactionPartnerChat | TransactionPartnerAffiliateProgram | TransactionPartnerFragment | TransactionPartnerTelegramAds | TransactionPartnerTelegramApi | TransactionPartnerOther;
2682
+ export interface TransactionPartnerUser {
2683
+ type: string;
2684
+ transaction_type: string;
2685
+ user: User;
2686
+ affiliate?: AffiliateInfo;
2687
+ invoice_payload?: string;
2688
+ subscription_period?: number;
2689
+ paid_media?: PaidMedia[];
2690
+ paid_media_payload?: string;
2691
+ gift?: Gift;
2692
+ premium_subscription_duration?: number;
2693
+ }
2694
+ export interface TransactionPartnerChat {
2695
+ type: string;
2696
+ chat: Chat;
2697
+ gift?: Gift;
2698
+ }
2699
+ export interface TransactionPartnerAffiliateProgram {
2700
+ type: string;
2701
+ sponsor_user?: User;
2702
+ commission_per_mille: number;
2703
+ }
2704
+ export interface TransactionPartnerFragment {
2705
+ type: string;
2706
+ withdrawal_state?: RevenueWithdrawalState;
2707
+ }
2708
+ export interface TransactionPartnerTelegramAds {
2709
+ type: string;
2710
+ }
2711
+ export interface TransactionPartnerTelegramApi {
2712
+ type: string;
2713
+ request_count: number;
2714
+ }
2715
+ export interface TransactionPartnerOther {
2716
+ type: string;
2717
+ }
2718
+ export interface StarTransaction {
2719
+ id: string;
2720
+ amount: number;
2721
+ nanostar_amount?: number;
2722
+ date: number;
2723
+ source?: TransactionPartner;
2724
+ receiver?: TransactionPartner;
2725
+ }
2726
+ export interface StarTransactions {
2727
+ transactions: StarTransaction[];
2728
+ }
2729
+ export interface PassportData {
2730
+ data: EncryptedPassportElement[];
2731
+ credentials: EncryptedCredentials;
2732
+ }
2733
+ export interface PassportFile {
2734
+ file_id: string;
2735
+ file_unique_id: string;
2736
+ file_size: number;
2737
+ file_date: number;
2738
+ }
2739
+ export interface EncryptedPassportElement {
2740
+ type: string;
2741
+ data?: string;
2742
+ phone_number?: string;
2743
+ email?: string;
2744
+ files?: PassportFile[];
2745
+ front_side?: PassportFile;
2746
+ reverse_side?: PassportFile;
2747
+ selfie?: PassportFile;
2748
+ translation?: PassportFile[];
2749
+ hash: string;
2750
+ }
2751
+ export interface EncryptedCredentials {
2752
+ data: string;
2753
+ hash: string;
2754
+ secret: string;
2755
+ }
2756
+ export type PassportElementError = PassportElementErrorDataField | PassportElementErrorFrontSide | PassportElementErrorReverseSide | PassportElementErrorSelfie | PassportElementErrorFile | PassportElementErrorFiles | PassportElementErrorTranslationFile | PassportElementErrorTranslationFiles | PassportElementErrorUnspecified;
2757
+ export interface PassportElementErrorDataField {
2758
+ source: string;
2759
+ type: string;
2760
+ field_name: string;
2761
+ data_hash: string;
2762
+ message: string;
2763
+ }
2764
+ export interface PassportElementErrorFrontSide {
2765
+ source: string;
2766
+ type: string;
2767
+ file_hash: string;
2768
+ message: string;
2769
+ }
2770
+ export interface PassportElementErrorReverseSide {
2771
+ source: string;
2772
+ type: string;
2773
+ file_hash: string;
2774
+ message: string;
2775
+ }
2776
+ export interface PassportElementErrorSelfie {
2777
+ source: string;
2778
+ type: string;
2779
+ file_hash: string;
2780
+ message: string;
2781
+ }
2782
+ export interface PassportElementErrorFile {
2783
+ source: string;
2784
+ type: string;
2785
+ file_hash: string;
2786
+ message: string;
2787
+ }
2788
+ export interface PassportElementErrorFiles {
2789
+ source: string;
2790
+ type: string;
2791
+ file_hashes: string[];
2792
+ message: string;
2793
+ }
2794
+ export interface PassportElementErrorTranslationFile {
2795
+ source: string;
2796
+ type: string;
2797
+ file_hash: string;
2798
+ message: string;
2799
+ }
2800
+ export interface PassportElementErrorTranslationFiles {
2801
+ source: string;
2802
+ type: string;
2803
+ file_hashes: string[];
2804
+ message: string;
2805
+ }
2806
+ export interface PassportElementErrorUnspecified {
2807
+ source: string;
2808
+ type: string;
2809
+ element_hash: string;
2810
+ message: string;
2811
+ }
2812
+ export interface Game {
2813
+ title: string;
2814
+ description: string;
2815
+ photo: PhotoSize[];
2816
+ text?: string;
2817
+ text_entities?: MessageEntity[];
2818
+ animation?: Animation;
2819
+ }
2820
+ export interface CallbackGame {
2821
+ [key: string]: unknown;
2822
+ }
2823
+ export interface TelegramMethodParams {
2824
+ getUpdates: {
2825
+ offset?: number;
2826
+ limit?: number;
2827
+ timeout?: number;
2828
+ allowed_updates?: string[];
2829
+ };
2830
+ setWebhook: {
2831
+ url: string;
2832
+ certificate?: TelegramInputFile;
2833
+ ip_address?: string;
2834
+ max_connections?: number;
2835
+ allowed_updates?: string[];
2836
+ drop_pending_updates?: boolean;
2837
+ secret_token?: string;
2838
+ };
2839
+ deleteWebhook: {
2840
+ drop_pending_updates?: boolean;
2841
+ };
2842
+ getWebhookInfo: Record<never, never>;
2843
+ getMe: Record<never, never>;
2844
+ logOut: Record<never, never>;
2845
+ close: Record<never, never>;
2846
+ sendMessage: {
2847
+ business_connection_id?: string;
2848
+ chat_id?: number | string;
2849
+ message_thread_id?: number;
2850
+ direct_messages_topic_id?: number;
2851
+ ephemeral_message_parameters?: EphemeralMessageParameters;
2852
+ text: string;
2853
+ parse_mode?: string;
2854
+ entities?: MessageEntity[];
2855
+ link_preview_options?: LinkPreviewOptions;
2856
+ disable_notification?: boolean;
2857
+ protect_content?: boolean;
2858
+ allow_paid_broadcast?: boolean;
2859
+ message_effect_id?: string;
2860
+ suggested_post_parameters?: SuggestedPostParameters;
2861
+ reply_parameters?: ReplyParameters;
2862
+ reply_markup?: InlineKeyboardMarkup | ReplyKeyboardMarkup | ReplyKeyboardRemove | ForceReply;
2863
+ };
2864
+ forwardMessage: {
2865
+ chat_id: number | string;
2866
+ message_thread_id?: number;
2867
+ direct_messages_topic_id?: number;
2868
+ from_chat_id: number | string;
2869
+ video_start_timestamp?: number;
2870
+ disable_notification?: boolean;
2871
+ protect_content?: boolean;
2872
+ message_effect_id?: string;
2873
+ suggested_post_parameters?: SuggestedPostParameters;
2874
+ message_id: number;
2875
+ };
2876
+ forwardMessages: {
2877
+ chat_id: number | string;
2878
+ message_thread_id?: number;
2879
+ direct_messages_topic_id?: number;
2880
+ from_chat_id: number | string;
2881
+ message_ids: number[];
2882
+ disable_notification?: boolean;
2883
+ protect_content?: boolean;
2884
+ };
2885
+ copyMessage: {
2886
+ chat_id: number | string;
2887
+ message_thread_id?: number;
2888
+ direct_messages_topic_id?: number;
2889
+ from_chat_id: number | string;
2890
+ message_id: number;
2891
+ video_start_timestamp?: number;
2892
+ caption?: string;
2893
+ parse_mode?: string;
2894
+ caption_entities?: MessageEntity[];
2895
+ show_caption_above_media?: boolean;
2896
+ disable_notification?: boolean;
2897
+ protect_content?: boolean;
2898
+ allow_paid_broadcast?: boolean;
2899
+ message_effect_id?: string;
2900
+ suggested_post_parameters?: SuggestedPostParameters;
2901
+ reply_parameters?: ReplyParameters;
2902
+ reply_markup?: InlineKeyboardMarkup | ReplyKeyboardMarkup | ReplyKeyboardRemove | ForceReply;
2903
+ };
2904
+ copyMessages: {
2905
+ chat_id: number | string;
2906
+ message_thread_id?: number;
2907
+ direct_messages_topic_id?: number;
2908
+ from_chat_id: number | string;
2909
+ message_ids: number[];
2910
+ disable_notification?: boolean;
2911
+ protect_content?: boolean;
2912
+ remove_caption?: boolean;
2913
+ };
2914
+ sendPhoto: {
2915
+ business_connection_id?: string;
2916
+ chat_id?: number | string;
2917
+ message_thread_id?: number;
2918
+ direct_messages_topic_id?: number;
2919
+ ephemeral_message_parameters?: EphemeralMessageParameters;
2920
+ photo: TelegramInputFile | string;
2921
+ caption?: string;
2922
+ parse_mode?: string;
2923
+ caption_entities?: MessageEntity[];
2924
+ show_caption_above_media?: boolean;
2925
+ has_spoiler?: boolean;
2926
+ disable_notification?: boolean;
2927
+ protect_content?: boolean;
2928
+ allow_paid_broadcast?: boolean;
2929
+ message_effect_id?: string;
2930
+ suggested_post_parameters?: SuggestedPostParameters;
2931
+ reply_parameters?: ReplyParameters;
2932
+ reply_markup?: InlineKeyboardMarkup | ReplyKeyboardMarkup | ReplyKeyboardRemove | ForceReply;
2933
+ };
2934
+ sendLivePhoto: {
2935
+ business_connection_id?: string;
2936
+ chat_id?: number | string;
2937
+ message_thread_id?: number;
2938
+ direct_messages_topic_id?: number;
2939
+ ephemeral_message_parameters?: EphemeralMessageParameters;
2940
+ live_photo: TelegramInputFile | string;
2941
+ photo: TelegramInputFile | string;
2942
+ caption?: string;
2943
+ parse_mode?: string;
2944
+ caption_entities?: MessageEntity[];
2945
+ show_caption_above_media?: boolean;
2946
+ has_spoiler?: boolean;
2947
+ disable_notification?: boolean;
2948
+ protect_content?: boolean;
2949
+ allow_paid_broadcast?: boolean;
2950
+ message_effect_id?: string;
2951
+ suggested_post_parameters?: SuggestedPostParameters;
2952
+ reply_parameters?: ReplyParameters;
2953
+ reply_markup?: InlineKeyboardMarkup | ReplyKeyboardMarkup | ReplyKeyboardRemove | ForceReply;
2954
+ };
2955
+ sendAudio: {
2956
+ business_connection_id?: string;
2957
+ chat_id?: number | string;
2958
+ message_thread_id?: number;
2959
+ direct_messages_topic_id?: number;
2960
+ ephemeral_message_parameters?: EphemeralMessageParameters;
2961
+ audio: TelegramInputFile | string;
2962
+ caption?: string;
2963
+ parse_mode?: string;
2964
+ caption_entities?: MessageEntity[];
2965
+ duration?: number;
2966
+ performer?: string;
2967
+ title?: string;
2968
+ thumbnail?: TelegramInputFile | string;
2969
+ disable_notification?: boolean;
2970
+ protect_content?: boolean;
2971
+ allow_paid_broadcast?: boolean;
2972
+ message_effect_id?: string;
2973
+ suggested_post_parameters?: SuggestedPostParameters;
2974
+ reply_parameters?: ReplyParameters;
2975
+ reply_markup?: InlineKeyboardMarkup | ReplyKeyboardMarkup | ReplyKeyboardRemove | ForceReply;
2976
+ };
2977
+ sendDocument: {
2978
+ business_connection_id?: string;
2979
+ chat_id?: number | string;
2980
+ message_thread_id?: number;
2981
+ direct_messages_topic_id?: number;
2982
+ ephemeral_message_parameters?: EphemeralMessageParameters;
2983
+ document: TelegramInputFile | string;
2984
+ thumbnail?: TelegramInputFile | string;
2985
+ caption?: string;
2986
+ parse_mode?: string;
2987
+ caption_entities?: MessageEntity[];
2988
+ disable_content_type_detection?: boolean;
2989
+ disable_notification?: boolean;
2990
+ protect_content?: boolean;
2991
+ allow_paid_broadcast?: boolean;
2992
+ message_effect_id?: string;
2993
+ suggested_post_parameters?: SuggestedPostParameters;
2994
+ reply_parameters?: ReplyParameters;
2995
+ reply_markup?: InlineKeyboardMarkup | ReplyKeyboardMarkup | ReplyKeyboardRemove | ForceReply;
2996
+ };
2997
+ sendVideo: {
2998
+ business_connection_id?: string;
2999
+ chat_id?: number | string;
3000
+ message_thread_id?: number;
3001
+ direct_messages_topic_id?: number;
3002
+ ephemeral_message_parameters?: EphemeralMessageParameters;
3003
+ video: TelegramInputFile | string;
3004
+ duration?: number;
3005
+ width?: number;
3006
+ height?: number;
3007
+ thumbnail?: TelegramInputFile | string;
3008
+ cover?: TelegramInputFile | string;
3009
+ start_timestamp?: number;
3010
+ caption?: string;
3011
+ parse_mode?: string;
3012
+ caption_entities?: MessageEntity[];
3013
+ show_caption_above_media?: boolean;
3014
+ has_spoiler?: boolean;
3015
+ supports_streaming?: boolean;
3016
+ disable_notification?: boolean;
3017
+ protect_content?: boolean;
3018
+ allow_paid_broadcast?: boolean;
3019
+ message_effect_id?: string;
3020
+ suggested_post_parameters?: SuggestedPostParameters;
3021
+ reply_parameters?: ReplyParameters;
3022
+ reply_markup?: InlineKeyboardMarkup | ReplyKeyboardMarkup | ReplyKeyboardRemove | ForceReply;
3023
+ };
3024
+ sendAnimation: {
3025
+ business_connection_id?: string;
3026
+ chat_id?: number | string;
3027
+ message_thread_id?: number;
3028
+ direct_messages_topic_id?: number;
3029
+ ephemeral_message_parameters?: EphemeralMessageParameters;
3030
+ animation: TelegramInputFile | string;
3031
+ duration?: number;
3032
+ width?: number;
3033
+ height?: number;
3034
+ thumbnail?: TelegramInputFile | string;
3035
+ caption?: string;
3036
+ parse_mode?: string;
3037
+ caption_entities?: MessageEntity[];
3038
+ show_caption_above_media?: boolean;
3039
+ has_spoiler?: boolean;
3040
+ disable_notification?: boolean;
3041
+ protect_content?: boolean;
3042
+ allow_paid_broadcast?: boolean;
3043
+ message_effect_id?: string;
3044
+ suggested_post_parameters?: SuggestedPostParameters;
3045
+ reply_parameters?: ReplyParameters;
3046
+ reply_markup?: InlineKeyboardMarkup | ReplyKeyboardMarkup | ReplyKeyboardRemove | ForceReply;
3047
+ };
3048
+ sendVoice: {
3049
+ business_connection_id?: string;
3050
+ chat_id?: number | string;
3051
+ message_thread_id?: number;
3052
+ direct_messages_topic_id?: number;
3053
+ ephemeral_message_parameters?: EphemeralMessageParameters;
3054
+ voice: TelegramInputFile | string;
3055
+ caption?: string;
3056
+ parse_mode?: string;
3057
+ caption_entities?: MessageEntity[];
3058
+ duration?: number;
3059
+ disable_notification?: boolean;
3060
+ protect_content?: boolean;
3061
+ allow_paid_broadcast?: boolean;
3062
+ message_effect_id?: string;
3063
+ suggested_post_parameters?: SuggestedPostParameters;
3064
+ reply_parameters?: ReplyParameters;
3065
+ reply_markup?: InlineKeyboardMarkup | ReplyKeyboardMarkup | ReplyKeyboardRemove | ForceReply;
3066
+ };
3067
+ sendVideoNote: {
3068
+ business_connection_id?: string;
3069
+ chat_id?: number | string;
3070
+ message_thread_id?: number;
3071
+ direct_messages_topic_id?: number;
3072
+ ephemeral_message_parameters?: EphemeralMessageParameters;
3073
+ video_note: TelegramInputFile | string;
3074
+ duration?: number;
3075
+ length?: number;
3076
+ thumbnail?: TelegramInputFile | string;
3077
+ disable_notification?: boolean;
3078
+ protect_content?: boolean;
3079
+ allow_paid_broadcast?: boolean;
3080
+ message_effect_id?: string;
3081
+ suggested_post_parameters?: SuggestedPostParameters;
3082
+ reply_parameters?: ReplyParameters;
3083
+ reply_markup?: InlineKeyboardMarkup | ReplyKeyboardMarkup | ReplyKeyboardRemove | ForceReply;
3084
+ };
3085
+ sendWidget: {
3086
+ chat_id: number | string;
3087
+ message_thread_id?: number;
3088
+ html: string;
3089
+ width?: number;
3090
+ height?: number;
3091
+ public_data?: string;
3092
+ chat_data?: string;
3093
+ caption?: string;
3094
+ parse_mode?: string;
3095
+ caption_entities?: MessageEntity[];
3096
+ show_caption_above_media?: boolean;
3097
+ allow_queries?: boolean;
3098
+ is_shared?: boolean;
3099
+ disable_notification?: boolean;
3100
+ protect_content?: boolean;
3101
+ allow_paid_broadcast?: boolean;
3102
+ message_effect_id?: string;
3103
+ reply_parameters?: ReplyParameters;
3104
+ reply_markup?: InlineKeyboardMarkup | ReplyKeyboardMarkup | ReplyKeyboardRemove | ForceReply;
3105
+ };
3106
+ sendSharedWidget: {
3107
+ chat_id: number | string;
3108
+ message_thread_id?: number;
3109
+ widget_id: string;
3110
+ chat_data?: string;
3111
+ caption?: string;
3112
+ parse_mode?: string;
3113
+ caption_entities?: MessageEntity[];
3114
+ show_caption_above_media?: boolean;
3115
+ disable_notification?: boolean;
3116
+ protect_content?: boolean;
3117
+ allow_paid_broadcast?: boolean;
3118
+ message_effect_id?: string;
3119
+ reply_parameters?: ReplyParameters;
3120
+ reply_markup?: InlineKeyboardMarkup | ReplyKeyboardMarkup | ReplyKeyboardRemove | ForceReply;
3121
+ };
3122
+ sendPaidMedia: {
3123
+ business_connection_id?: string;
3124
+ chat_id: number | string;
3125
+ message_thread_id?: number;
3126
+ direct_messages_topic_id?: number;
3127
+ star_count: number;
3128
+ media: InputPaidMedia[];
3129
+ payload?: string;
3130
+ caption?: string;
3131
+ parse_mode?: string;
3132
+ caption_entities?: MessageEntity[];
3133
+ show_caption_above_media?: boolean;
3134
+ disable_notification?: boolean;
3135
+ protect_content?: boolean;
3136
+ allow_paid_broadcast?: boolean;
3137
+ suggested_post_parameters?: SuggestedPostParameters;
3138
+ reply_parameters?: ReplyParameters;
3139
+ reply_markup?: InlineKeyboardMarkup | ReplyKeyboardMarkup | ReplyKeyboardRemove | ForceReply;
3140
+ };
3141
+ sendMediaGroup: {
3142
+ business_connection_id?: string;
3143
+ chat_id: number | string;
3144
+ message_thread_id?: number;
3145
+ direct_messages_topic_id?: number;
3146
+ media: InputMediaAudio | InputMediaDocument | InputMediaLivePhoto | unknown[];
3147
+ disable_notification?: boolean;
3148
+ protect_content?: boolean;
3149
+ allow_paid_broadcast?: boolean;
3150
+ message_effect_id?: string;
3151
+ reply_parameters?: ReplyParameters;
3152
+ };
3153
+ sendLocation: {
3154
+ business_connection_id?: string;
3155
+ chat_id?: number | string;
3156
+ message_thread_id?: number;
3157
+ direct_messages_topic_id?: number;
3158
+ ephemeral_message_parameters?: EphemeralMessageParameters;
3159
+ latitude: number;
3160
+ longitude: number;
3161
+ horizontal_accuracy?: number;
3162
+ live_period?: number;
3163
+ heading?: number;
3164
+ proximity_alert_radius?: number;
3165
+ disable_notification?: boolean;
3166
+ protect_content?: boolean;
3167
+ allow_paid_broadcast?: boolean;
3168
+ message_effect_id?: string;
3169
+ suggested_post_parameters?: SuggestedPostParameters;
3170
+ reply_parameters?: ReplyParameters;
3171
+ reply_markup?: InlineKeyboardMarkup | ReplyKeyboardMarkup | ReplyKeyboardRemove | ForceReply;
3172
+ };
3173
+ sendVenue: {
3174
+ business_connection_id?: string;
3175
+ chat_id?: number | string;
3176
+ message_thread_id?: number;
3177
+ direct_messages_topic_id?: number;
3178
+ ephemeral_message_parameters?: EphemeralMessageParameters;
3179
+ latitude: number;
3180
+ longitude: number;
3181
+ title: string;
3182
+ address: string;
3183
+ foursquare_id?: string;
3184
+ foursquare_type?: string;
3185
+ google_place_id?: string;
3186
+ google_place_type?: string;
3187
+ disable_notification?: boolean;
3188
+ protect_content?: boolean;
3189
+ allow_paid_broadcast?: boolean;
3190
+ message_effect_id?: string;
3191
+ suggested_post_parameters?: SuggestedPostParameters;
3192
+ reply_parameters?: ReplyParameters;
3193
+ reply_markup?: InlineKeyboardMarkup | ReplyKeyboardMarkup | ReplyKeyboardRemove | ForceReply;
3194
+ };
3195
+ sendContact: {
3196
+ business_connection_id?: string;
3197
+ chat_id?: number | string;
3198
+ message_thread_id?: number;
3199
+ direct_messages_topic_id?: number;
3200
+ ephemeral_message_parameters?: EphemeralMessageParameters;
3201
+ phone_number: string;
3202
+ first_name: string;
3203
+ last_name?: string;
3204
+ vcard?: string;
3205
+ disable_notification?: boolean;
3206
+ protect_content?: boolean;
3207
+ allow_paid_broadcast?: boolean;
3208
+ message_effect_id?: string;
3209
+ suggested_post_parameters?: SuggestedPostParameters;
3210
+ reply_parameters?: ReplyParameters;
3211
+ reply_markup?: InlineKeyboardMarkup | ReplyKeyboardMarkup | ReplyKeyboardRemove | ForceReply;
3212
+ };
3213
+ sendPoll: {
3214
+ business_connection_id?: string;
3215
+ chat_id: number | string;
3216
+ message_thread_id?: number;
3217
+ question: string;
3218
+ question_parse_mode?: string;
3219
+ question_entities?: MessageEntity[];
3220
+ options: InputPollOption[];
3221
+ is_anonymous?: boolean;
3222
+ type?: string;
3223
+ allows_multiple_answers?: boolean;
3224
+ allows_revoting?: boolean;
3225
+ shuffle_options?: boolean;
3226
+ allow_adding_options?: boolean;
3227
+ hide_results_until_closes?: boolean;
3228
+ members_only?: boolean;
3229
+ country_codes?: string[];
3230
+ correct_option_ids?: number[];
3231
+ explanation?: string;
3232
+ explanation_parse_mode?: string;
3233
+ explanation_entities?: MessageEntity[];
3234
+ explanation_media?: InputPollMedia;
3235
+ open_period?: number;
3236
+ close_date?: number;
3237
+ is_closed?: boolean;
3238
+ description?: string;
3239
+ description_parse_mode?: string;
3240
+ description_entities?: MessageEntity[];
3241
+ media?: InputPollMedia;
3242
+ disable_notification?: boolean;
3243
+ protect_content?: boolean;
3244
+ allow_paid_broadcast?: boolean;
3245
+ message_effect_id?: string;
3246
+ reply_parameters?: ReplyParameters;
3247
+ reply_markup?: InlineKeyboardMarkup | ReplyKeyboardMarkup | ReplyKeyboardRemove | ForceReply;
3248
+ };
3249
+ sendChecklist: {
3250
+ business_connection_id: string;
3251
+ chat_id: number | string;
3252
+ checklist: InputChecklist;
3253
+ disable_notification?: boolean;
3254
+ protect_content?: boolean;
3255
+ message_effect_id?: string;
3256
+ reply_parameters?: ReplyParameters;
3257
+ reply_markup?: InlineKeyboardMarkup;
3258
+ };
3259
+ sendDice: {
3260
+ business_connection_id?: string;
3261
+ chat_id: number | string;
3262
+ message_thread_id?: number;
3263
+ direct_messages_topic_id?: number;
3264
+ emoji?: string;
3265
+ disable_notification?: boolean;
3266
+ protect_content?: boolean;
3267
+ allow_paid_broadcast?: boolean;
3268
+ message_effect_id?: string;
3269
+ suggested_post_parameters?: SuggestedPostParameters;
3270
+ reply_parameters?: ReplyParameters;
3271
+ reply_markup?: InlineKeyboardMarkup | ReplyKeyboardMarkup | ReplyKeyboardRemove | ForceReply;
3272
+ };
3273
+ sendMessageDraft: {
3274
+ chat_id: number;
3275
+ message_thread_id?: number;
3276
+ draft_id: number;
3277
+ text?: string;
3278
+ parse_mode?: string;
3279
+ entities?: MessageEntity[];
3280
+ can_stop?: boolean;
3281
+ keep_on_stop?: boolean;
3282
+ };
3283
+ sendChatAction: {
3284
+ business_connection_id?: string;
3285
+ chat_id: number | string;
3286
+ message_thread_id?: number;
3287
+ action: string;
3288
+ };
3289
+ setMessageReaction: {
3290
+ chat_id: number | string;
3291
+ message_id: number;
3292
+ reaction?: ReactionType[];
3293
+ is_big?: boolean;
3294
+ };
3295
+ getUserProfilePhotos: {
3296
+ user_id: number;
3297
+ offset?: number;
3298
+ limit?: number;
3299
+ };
3300
+ getUserProfileAudios: {
3301
+ user_id: number;
3302
+ offset?: number;
3303
+ limit?: number;
3304
+ };
3305
+ setUserEmojiStatus: {
3306
+ user_id: number;
3307
+ emoji_status_custom_emoji_id?: string;
3308
+ emoji_status_expiration_date?: number;
3309
+ };
3310
+ getFile: {
3311
+ file_id: string;
3312
+ };
3313
+ banChatMember: {
3314
+ chat_id: number | string;
3315
+ user_id: number;
3316
+ until_date?: number;
3317
+ revoke_messages?: boolean;
3318
+ };
3319
+ unbanChatMember: {
3320
+ chat_id: number | string;
3321
+ user_id: number;
3322
+ only_if_banned?: boolean;
3323
+ };
3324
+ restrictChatMember: {
3325
+ chat_id: number | string;
3326
+ user_id: number;
3327
+ permissions: ChatPermissions;
3328
+ use_independent_chat_permissions?: boolean;
3329
+ until_date?: number;
3330
+ };
3331
+ promoteChatMember: {
3332
+ chat_id: number | string;
3333
+ user_id: number;
3334
+ is_anonymous?: boolean;
3335
+ can_manage_chat?: boolean;
3336
+ can_delete_messages?: boolean;
3337
+ can_manage_video_chats?: boolean;
3338
+ can_restrict_members?: boolean;
3339
+ can_promote_members?: boolean;
3340
+ can_change_info?: boolean;
3341
+ can_invite_users?: boolean;
3342
+ can_post_stories?: boolean;
3343
+ can_edit_stories?: boolean;
3344
+ can_delete_stories?: boolean;
3345
+ can_post_messages?: boolean;
3346
+ can_edit_messages?: boolean;
3347
+ can_pin_messages?: boolean;
3348
+ can_manage_topics?: boolean;
3349
+ can_manage_direct_messages?: boolean;
3350
+ can_manage_tags?: boolean;
3351
+ can_send_welcome_messages?: boolean;
3352
+ };
3353
+ setChatAdministratorCustomTitle: {
3354
+ chat_id: number | string;
3355
+ user_id: number;
3356
+ custom_title: string;
3357
+ };
3358
+ setChatMemberTag: {
3359
+ chat_id: number | string;
3360
+ user_id: number;
3361
+ tag?: string;
3362
+ };
3363
+ banChatSenderChat: {
3364
+ chat_id: number | string;
3365
+ sender_chat_id: number;
3366
+ };
3367
+ unbanChatSenderChat: {
3368
+ chat_id: number | string;
3369
+ sender_chat_id: number;
3370
+ };
3371
+ setChatPermissions: {
3372
+ chat_id: number | string;
3373
+ permissions: ChatPermissions;
3374
+ use_independent_chat_permissions?: boolean;
3375
+ };
3376
+ exportChatInviteLink: {
3377
+ chat_id: number | string;
3378
+ };
3379
+ createChatInviteLink: {
3380
+ chat_id: number | string;
3381
+ name?: string;
3382
+ expire_date?: number;
3383
+ member_limit?: number;
3384
+ creates_join_request?: boolean;
3385
+ };
3386
+ editChatInviteLink: {
3387
+ chat_id: number | string;
3388
+ invite_link: string;
3389
+ name?: string;
3390
+ expire_date?: number;
3391
+ member_limit?: number;
3392
+ creates_join_request?: boolean;
3393
+ };
3394
+ createChatSubscriptionInviteLink: {
3395
+ chat_id: number | string;
3396
+ name?: string;
3397
+ subscription_period: number;
3398
+ subscription_price: number;
3399
+ };
3400
+ editChatSubscriptionInviteLink: {
3401
+ chat_id: number | string;
3402
+ invite_link: string;
3403
+ name?: string;
3404
+ };
3405
+ revokeChatInviteLink: {
3406
+ chat_id: number | string;
3407
+ invite_link: string;
3408
+ };
3409
+ approveChatJoinRequest: {
3410
+ chat_id: number | string;
3411
+ user_id: number;
3412
+ };
3413
+ declineChatJoinRequest: {
3414
+ chat_id: number | string;
3415
+ user_id: number;
3416
+ };
3417
+ answerChatJoinRequestQuery: {
3418
+ chat_join_request_query_id: string;
3419
+ result: string;
3420
+ };
3421
+ sendChatJoinRequestWebApp: {
3422
+ chat_join_request_query_id: string;
3423
+ web_app_url: string;
3424
+ };
3425
+ setChatPhoto: {
3426
+ chat_id: number | string;
3427
+ photo: TelegramInputFile;
3428
+ };
3429
+ deleteChatPhoto: {
3430
+ chat_id: number | string;
3431
+ };
3432
+ setChatTitle: {
3433
+ chat_id: number | string;
3434
+ title: string;
3435
+ };
3436
+ setChatDescription: {
3437
+ chat_id: number | string;
3438
+ description?: string;
3439
+ };
3440
+ pinChatMessage: {
3441
+ business_connection_id?: string;
3442
+ chat_id: number | string;
3443
+ message_id: number;
3444
+ disable_notification?: boolean;
3445
+ };
3446
+ unpinChatMessage: {
3447
+ business_connection_id?: string;
3448
+ chat_id: number | string;
3449
+ message_id?: number;
3450
+ };
3451
+ unpinAllChatMessages: {
3452
+ chat_id: number | string;
3453
+ };
3454
+ leaveChat: {
3455
+ chat_id: number | string;
3456
+ };
3457
+ getChat: {
3458
+ chat_id: number | string;
3459
+ };
3460
+ getChatAdministrators: {
3461
+ chat_id: number | string;
3462
+ return_bots?: boolean;
3463
+ };
3464
+ getChatMemberCount: {
3465
+ chat_id: number | string;
3466
+ };
3467
+ getChatMember: {
3468
+ chat_id: number | string;
3469
+ user_id: number;
3470
+ };
3471
+ getChatShareThemeBackdrops: Record<never, never>;
3472
+ getUserPersonalChatMessages: {
3473
+ user_id: number;
3474
+ limit: number;
3475
+ };
3476
+ setChatStickerSet: {
3477
+ chat_id: number | string;
3478
+ sticker_set_name: string;
3479
+ };
3480
+ deleteChatStickerSet: {
3481
+ chat_id: number | string;
3482
+ };
3483
+ getForumTopicIconStickers: Record<never, never>;
3484
+ createForumTopic: {
3485
+ chat_id: number | string;
3486
+ name: string;
3487
+ icon_color?: number;
3488
+ icon_custom_emoji_id?: string;
3489
+ };
3490
+ editForumTopic: {
3491
+ chat_id: number | string;
3492
+ message_thread_id: number;
3493
+ name?: string;
3494
+ icon_custom_emoji_id?: string;
3495
+ };
3496
+ closeForumTopic: {
3497
+ chat_id: number | string;
3498
+ message_thread_id: number;
3499
+ };
3500
+ reopenForumTopic: {
3501
+ chat_id: number | string;
3502
+ message_thread_id: number;
3503
+ };
3504
+ deleteForumTopic: {
3505
+ chat_id: number | string;
3506
+ message_thread_id: number;
3507
+ };
3508
+ unpinAllForumTopicMessages: {
3509
+ chat_id: number | string;
3510
+ message_thread_id: number;
3511
+ };
3512
+ editGeneralForumTopic: {
3513
+ chat_id: number | string;
3514
+ name: string;
3515
+ };
3516
+ closeGeneralForumTopic: {
3517
+ chat_id: number | string;
3518
+ };
3519
+ reopenGeneralForumTopic: {
3520
+ chat_id: number | string;
3521
+ };
3522
+ hideGeneralForumTopic: {
3523
+ chat_id: number | string;
3524
+ };
3525
+ unhideGeneralForumTopic: {
3526
+ chat_id: number | string;
3527
+ };
3528
+ unpinAllGeneralForumTopicMessages: {
3529
+ chat_id: number | string;
3530
+ };
3531
+ answerCallbackQuery: {
3532
+ callback_query_id: string;
3533
+ text?: string;
3534
+ show_alert?: boolean;
3535
+ url?: string;
3536
+ cache_time?: number;
3537
+ };
3538
+ answerWidgetQuery: {
3539
+ widget_query_id: string;
3540
+ data?: string;
3541
+ };
3542
+ answerGuestQuery: {
3543
+ guest_query_id: string;
3544
+ result: InlineQueryResult;
3545
+ };
3546
+ getUserChatBoosts: {
3547
+ chat_id: number | string;
3548
+ user_id: number;
3549
+ };
3550
+ getBusinessConnection: {
3551
+ business_connection_id: string;
3552
+ };
3553
+ getManagedBotToken: {
3554
+ user_id: number;
3555
+ };
3556
+ replaceManagedBotToken: {
3557
+ user_id: number;
3558
+ };
3559
+ getManagedBotAccessSettings: {
3560
+ user_id: number;
3561
+ };
3562
+ setManagedBotAccessSettings: {
3563
+ user_id: number;
3564
+ is_access_restricted: boolean;
3565
+ added_user_ids?: number[];
3566
+ };
3567
+ setMySettings: {
3568
+ supports_inline_queries?: boolean;
3569
+ inline_query_placeholder?: string;
3570
+ needs_inline_query_location?: boolean;
3571
+ inline_feedback_share_denominator?: number;
3572
+ can_join_groups?: boolean;
3573
+ can_read_all_group_messages?: boolean;
3574
+ can_connect_to_business?: boolean;
3575
+ can_manage_bots?: boolean;
3576
+ supports_guest_queries?: boolean;
3577
+ supports_join_request_queries?: boolean;
3578
+ has_topics_enabled?: boolean;
3579
+ allows_users_to_create_topics?: boolean;
3580
+ has_topic_sidebar?: boolean;
3581
+ can_communicate_with_bots?: boolean;
3582
+ callback_query_mode?: string;
3583
+ };
3584
+ setMyCommands: {
3585
+ commands: BotCommand[];
3586
+ scope?: BotCommandScope;
3587
+ language_code?: string;
3588
+ };
3589
+ deleteMyCommands: {
3590
+ scope?: BotCommandScope;
3591
+ language_code?: string;
3592
+ };
3593
+ getMyCommands: {
3594
+ scope?: BotCommandScope;
3595
+ language_code?: string;
3596
+ };
3597
+ setMyName: {
3598
+ name?: string;
3599
+ language_code?: string;
3600
+ };
3601
+ getMyName: {
3602
+ language_code?: string;
3603
+ };
3604
+ setMyDescription: {
3605
+ description?: string;
3606
+ language_code?: string;
3607
+ };
3608
+ getMyDescription: {
3609
+ language_code?: string;
3610
+ };
3611
+ setMyShortDescription: {
3612
+ short_description?: string;
3613
+ language_code?: string;
3614
+ };
3615
+ getMyShortDescription: {
3616
+ language_code?: string;
3617
+ };
3618
+ setMyProfilePhoto: {
3619
+ photo: InputProfilePhoto;
3620
+ };
3621
+ removeMyProfilePhoto: Record<never, never>;
3622
+ setChatMenuButton: {
3623
+ chat_id?: number;
3624
+ menu_button?: MenuButton;
3625
+ };
3626
+ getChatMenuButton: {
3627
+ chat_id?: number;
3628
+ };
3629
+ setMyDefaultAdministratorRights: {
3630
+ rights?: ChatAdministratorRights;
3631
+ for_channels?: boolean;
3632
+ };
3633
+ getMyDefaultAdministratorRights: {
3634
+ for_channels?: boolean;
3635
+ };
3636
+ getAvailableGifts: Record<never, never>;
3637
+ sendGift: {
3638
+ user_id?: number;
3639
+ chat_id?: number | string;
3640
+ gift_id: string;
3641
+ pay_for_upgrade?: boolean;
3642
+ text?: string;
3643
+ text_parse_mode?: string;
3644
+ text_entities?: MessageEntity[];
3645
+ };
3646
+ giftPremiumSubscription: {
3647
+ user_id: number;
3648
+ month_count: number;
3649
+ star_count: number;
3650
+ text?: string;
3651
+ text_parse_mode?: string;
3652
+ text_entities?: MessageEntity[];
3653
+ };
3654
+ verifyUser: {
3655
+ user_id: number;
3656
+ custom_description?: string;
3657
+ custom_description_parse_mode?: string;
3658
+ custom_description_entities?: MessageEntity[];
3659
+ };
3660
+ verifyChat: {
3661
+ chat_id: number | string;
3662
+ custom_description?: string;
3663
+ custom_description_parse_mode?: string;
3664
+ custom_description_entities?: MessageEntity[];
3665
+ };
3666
+ removeUserVerification: {
3667
+ user_id: number;
3668
+ };
3669
+ removeChatVerification: {
3670
+ chat_id: number | string;
3671
+ };
3672
+ readBusinessMessage: {
3673
+ business_connection_id: string;
3674
+ chat_id: number;
3675
+ message_id: number;
3676
+ };
3677
+ deleteBusinessMessages: {
3678
+ business_connection_id: string;
3679
+ message_ids: number[];
3680
+ };
3681
+ setBusinessAccountName: {
3682
+ business_connection_id: string;
3683
+ first_name: string;
3684
+ last_name?: string;
3685
+ };
3686
+ setBusinessAccountUsername: {
3687
+ business_connection_id: string;
3688
+ username?: string;
3689
+ };
3690
+ setBusinessAccountBio: {
3691
+ business_connection_id: string;
3692
+ bio?: string;
3693
+ };
3694
+ setBusinessAccountProfilePhoto: {
3695
+ business_connection_id: string;
3696
+ photo: InputProfilePhoto;
3697
+ is_public?: boolean;
3698
+ };
3699
+ removeBusinessAccountProfilePhoto: {
3700
+ business_connection_id: string;
3701
+ is_public?: boolean;
3702
+ };
3703
+ setBusinessAccountGiftSettings: {
3704
+ business_connection_id: string;
3705
+ show_gift_button: boolean;
3706
+ accepted_gift_types: AcceptedGiftTypes;
3707
+ };
3708
+ getBusinessAccountStarBalance: {
3709
+ business_connection_id: string;
3710
+ };
3711
+ transferBusinessAccountStars: {
3712
+ business_connection_id: string;
3713
+ star_count: number;
3714
+ };
3715
+ getBusinessAccountGifts: {
3716
+ business_connection_id: string;
3717
+ exclude_unsaved?: boolean;
3718
+ exclude_saved?: boolean;
3719
+ exclude_unlimited?: boolean;
3720
+ exclude_limited_upgradable?: boolean;
3721
+ exclude_limited_non_upgradable?: boolean;
3722
+ exclude_unique?: boolean;
3723
+ exclude_from_blockchain?: boolean;
3724
+ sort_by_price?: boolean;
3725
+ offset?: string;
3726
+ limit?: number;
3727
+ };
3728
+ getUserGifts: {
3729
+ user_id: number;
3730
+ exclude_unlimited?: boolean;
3731
+ exclude_limited_upgradable?: boolean;
3732
+ exclude_limited_non_upgradable?: boolean;
3733
+ exclude_from_blockchain?: boolean;
3734
+ exclude_unique?: boolean;
3735
+ sort_by_price?: boolean;
3736
+ offset?: string;
3737
+ limit?: number;
3738
+ };
3739
+ getChatGifts: {
3740
+ chat_id: number | string;
3741
+ exclude_unsaved?: boolean;
3742
+ exclude_saved?: boolean;
3743
+ exclude_unlimited?: boolean;
3744
+ exclude_limited_upgradable?: boolean;
3745
+ exclude_limited_non_upgradable?: boolean;
3746
+ exclude_from_blockchain?: boolean;
3747
+ exclude_unique?: boolean;
3748
+ sort_by_price?: boolean;
3749
+ offset?: string;
3750
+ limit?: number;
3751
+ };
3752
+ getUniqueGift: {
3753
+ name: string;
3754
+ };
3755
+ convertGiftToStars: {
3756
+ business_connection_id: string;
3757
+ owned_gift_id: string;
3758
+ };
3759
+ upgradeGift: {
3760
+ business_connection_id: string;
3761
+ owned_gift_id: string;
3762
+ keep_original_details?: boolean;
3763
+ star_count?: number;
3764
+ };
3765
+ transferGift: {
3766
+ business_connection_id: string;
3767
+ owned_gift_id: string;
3768
+ new_owner_chat_id: number;
3769
+ star_count?: number;
3770
+ };
3771
+ deleteBusinessAccountGift: {
3772
+ business_connection_id: string;
3773
+ owned_gift_id: string;
3774
+ };
3775
+ postStory: {
3776
+ business_connection_id: string;
3777
+ content: InputStoryContent;
3778
+ active_period: number;
3779
+ caption?: string;
3780
+ parse_mode?: string;
3781
+ caption_entities?: MessageEntity[];
3782
+ areas?: StoryArea[];
3783
+ post_to_chat_page?: boolean;
3784
+ protect_content?: boolean;
3785
+ };
3786
+ repostStory: {
3787
+ business_connection_id: string;
3788
+ from_chat_id: number;
3789
+ from_story_id: number;
3790
+ active_period: number;
3791
+ post_to_chat_page?: boolean;
3792
+ protect_content?: boolean;
3793
+ };
3794
+ editStory: {
3795
+ business_connection_id: string;
3796
+ story_id: number;
3797
+ content: InputStoryContent;
3798
+ caption?: string;
3799
+ parse_mode?: string;
3800
+ caption_entities?: MessageEntity[];
3801
+ areas?: StoryArea[];
3802
+ };
3803
+ deleteStory: {
3804
+ business_connection_id: string;
3805
+ story_id: number;
3806
+ };
3807
+ answerWebAppQuery: {
3808
+ web_app_query_id: string;
3809
+ result: InlineQueryResult;
3810
+ };
3811
+ savePreparedInlineMessage: {
3812
+ user_id: number;
3813
+ result: InlineQueryResult;
3814
+ allow_user_chats?: boolean;
3815
+ allow_bot_chats?: boolean;
3816
+ allow_group_chats?: boolean;
3817
+ allow_channel_chats?: boolean;
3818
+ };
3819
+ savePreparedKeyboardButton: {
3820
+ user_id: number;
3821
+ button: KeyboardButton;
3822
+ };
3823
+ editMessageText: {
3824
+ business_connection_id?: string;
3825
+ chat_id?: number | string;
3826
+ message_id?: number;
3827
+ inline_message_id?: string;
3828
+ text?: string;
3829
+ parse_mode?: string;
3830
+ entities?: MessageEntity[];
3831
+ link_preview_options?: LinkPreviewOptions;
3832
+ rich_message?: InputRichMessage;
3833
+ reply_markup?: InlineKeyboardMarkup;
3834
+ };
3835
+ editMessageCaption: {
3836
+ business_connection_id?: string;
3837
+ chat_id?: number | string;
3838
+ message_id?: number;
3839
+ inline_message_id?: string;
3840
+ caption?: string;
3841
+ parse_mode?: string;
3842
+ caption_entities?: MessageEntity[];
3843
+ show_caption_above_media?: boolean;
3844
+ reply_markup?: InlineKeyboardMarkup;
3845
+ };
3846
+ editMessageMedia: {
3847
+ business_connection_id?: string;
3848
+ chat_id?: number | string;
3849
+ message_id?: number;
3850
+ inline_message_id?: string;
3851
+ media: InputMedia;
3852
+ reply_markup?: InlineKeyboardMarkup;
3853
+ };
3854
+ editMessageLiveLocation: {
3855
+ business_connection_id?: string;
3856
+ chat_id?: number | string;
3857
+ message_id?: number;
3858
+ inline_message_id?: string;
3859
+ latitude: number;
3860
+ longitude: number;
3861
+ live_period?: number;
3862
+ horizontal_accuracy?: number;
3863
+ heading?: number;
3864
+ proximity_alert_radius?: number;
3865
+ reply_markup?: InlineKeyboardMarkup;
3866
+ };
3867
+ stopMessageLiveLocation: {
3868
+ business_connection_id?: string;
3869
+ chat_id?: number | string;
3870
+ message_id?: number;
3871
+ inline_message_id?: string;
3872
+ reply_markup?: InlineKeyboardMarkup;
3873
+ };
3874
+ editMessageChecklist: {
3875
+ business_connection_id: string;
3876
+ chat_id: number | string;
3877
+ message_id: number;
3878
+ checklist: InputChecklist;
3879
+ reply_markup?: InlineKeyboardMarkup;
3880
+ };
3881
+ editMessageWidgetData: {
3882
+ chat_id?: number | string;
3883
+ message_id?: number;
3884
+ inline_message_id?: string;
3885
+ public_data?: string;
3886
+ chat_data?: string;
3887
+ };
3888
+ editSharedWidgetData: {
3889
+ widget_id: string;
3890
+ public_data: string;
3891
+ cache_time?: number;
3892
+ };
3893
+ editMessageReplyMarkup: {
3894
+ business_connection_id?: string;
3895
+ chat_id?: number | string;
3896
+ message_id?: number;
3897
+ inline_message_id?: string;
3898
+ reply_markup?: InlineKeyboardMarkup;
3899
+ };
3900
+ stopPoll: {
3901
+ business_connection_id?: string;
3902
+ chat_id: number | string;
3903
+ message_id: number;
3904
+ reply_markup?: InlineKeyboardMarkup;
3905
+ };
3906
+ editEphemeralMessageText: {
3907
+ chat_id: number | string;
3908
+ receiver_user_id: number;
3909
+ ephemeral_message_id: number;
3910
+ text?: string;
3911
+ parse_mode?: string;
3912
+ entities?: MessageEntity[];
3913
+ rich_message?: InputRichMessage;
3914
+ link_preview_options?: LinkPreviewOptions;
3915
+ reply_markup?: InlineKeyboardMarkup;
3916
+ };
3917
+ editEphemeralMessageMedia: {
3918
+ chat_id: number | string;
3919
+ receiver_user_id: number;
3920
+ ephemeral_message_id: number;
3921
+ media: InputMedia;
3922
+ reply_markup?: InlineKeyboardMarkup;
3923
+ };
3924
+ editEphemeralMessageCaption: {
3925
+ chat_id: number | string;
3926
+ receiver_user_id: number;
3927
+ ephemeral_message_id: number;
3928
+ caption?: string;
3929
+ parse_mode?: string;
3930
+ caption_entities?: MessageEntity[];
3931
+ show_caption_above_media?: boolean;
3932
+ reply_markup?: InlineKeyboardMarkup;
3933
+ };
3934
+ editEphemeralMessageReplyMarkup: {
3935
+ chat_id: number | string;
3936
+ receiver_user_id: number;
3937
+ ephemeral_message_id: number;
3938
+ reply_markup?: InlineKeyboardMarkup;
3939
+ };
3940
+ approveSuggestedPost: {
3941
+ chat_id: number;
3942
+ message_id: number;
3943
+ send_date?: number;
3944
+ };
3945
+ declineSuggestedPost: {
3946
+ chat_id: number;
3947
+ message_id: number;
3948
+ comment?: string;
3949
+ };
3950
+ deleteMessage: {
3951
+ chat_id: number | string;
3952
+ message_id: number;
3953
+ };
3954
+ deleteMessages: {
3955
+ chat_id: number | string;
3956
+ message_ids: number[];
3957
+ };
3958
+ deleteEphemeralMessage: {
3959
+ chat_id: number | string;
3960
+ receiver_user_id: number;
3961
+ ephemeral_message_id: number;
3962
+ };
3963
+ deleteMessageReaction: {
3964
+ chat_id: number | string;
3965
+ message_id: number;
3966
+ user_id?: number;
3967
+ actor_chat_id?: number;
3968
+ };
3969
+ deleteAllMessageReactions: {
3970
+ chat_id: number | string;
3971
+ user_id?: number;
3972
+ actor_chat_id?: number;
3973
+ };
3974
+ sendSticker: {
3975
+ business_connection_id?: string;
3976
+ chat_id?: number | string;
3977
+ message_thread_id?: number;
3978
+ direct_messages_topic_id?: number;
3979
+ ephemeral_message_parameters?: EphemeralMessageParameters;
3980
+ sticker: TelegramInputFile | string;
3981
+ emoji?: string;
3982
+ disable_notification?: boolean;
3983
+ protect_content?: boolean;
3984
+ allow_paid_broadcast?: boolean;
3985
+ message_effect_id?: string;
3986
+ suggested_post_parameters?: SuggestedPostParameters;
3987
+ reply_parameters?: ReplyParameters;
3988
+ reply_markup?: InlineKeyboardMarkup | ReplyKeyboardMarkup | ReplyKeyboardRemove | ForceReply;
3989
+ };
3990
+ getStickerSet: {
3991
+ name: string;
3992
+ };
3993
+ getCustomEmojiStickers: {
3994
+ custom_emoji_ids: string[];
3995
+ };
3996
+ uploadStickerFile: {
3997
+ user_id: number;
3998
+ sticker: TelegramInputFile;
3999
+ sticker_format: string;
4000
+ };
4001
+ createNewStickerSet: {
4002
+ user_id: number;
4003
+ name: string;
4004
+ title: string;
4005
+ stickers: InputSticker[];
4006
+ sticker_type?: string;
4007
+ needs_repainting?: boolean;
4008
+ };
4009
+ addStickerToSet: {
4010
+ user_id: number;
4011
+ name: string;
4012
+ sticker: InputSticker;
4013
+ };
4014
+ setStickerPositionInSet: {
4015
+ sticker: string;
4016
+ position: number;
4017
+ };
4018
+ deleteStickerFromSet: {
4019
+ sticker: string;
4020
+ };
4021
+ replaceStickerInSet: {
4022
+ user_id: number;
4023
+ name: string;
4024
+ old_sticker: string;
4025
+ sticker: InputSticker;
4026
+ };
4027
+ setStickerEmojiList: {
4028
+ sticker: string;
4029
+ emoji_list: string[];
4030
+ };
4031
+ setStickerKeywords: {
4032
+ sticker: string;
4033
+ keywords?: string[];
4034
+ };
4035
+ setStickerMaskPosition: {
4036
+ sticker: string;
4037
+ mask_position?: MaskPosition;
4038
+ };
4039
+ setStickerSetTitle: {
4040
+ name: string;
4041
+ title: string;
4042
+ };
4043
+ setStickerSetThumbnail: {
4044
+ name: string;
4045
+ user_id: number;
4046
+ thumbnail?: TelegramInputFile | string;
4047
+ format: string;
4048
+ };
4049
+ setCustomEmojiStickerSetThumbnail: {
4050
+ name: string;
4051
+ custom_emoji_id?: string;
4052
+ };
4053
+ deleteStickerSet: {
4054
+ name: string;
4055
+ };
4056
+ sendRichMessage: {
4057
+ business_connection_id?: string;
4058
+ chat_id?: number | string;
4059
+ message_thread_id?: number;
4060
+ direct_messages_topic_id?: number;
4061
+ ephemeral_message_parameters?: EphemeralMessageParameters;
4062
+ rich_message: InputRichMessage;
4063
+ disable_notification?: boolean;
4064
+ protect_content?: boolean;
4065
+ allow_paid_broadcast?: boolean;
4066
+ message_effect_id?: string;
4067
+ suggested_post_parameters?: SuggestedPostParameters;
4068
+ reply_parameters?: ReplyParameters;
4069
+ reply_markup?: InlineKeyboardMarkup | ReplyKeyboardMarkup | ReplyKeyboardRemove | ForceReply;
4070
+ };
4071
+ sendRichMessageDraft: {
4072
+ chat_id: number;
4073
+ message_thread_id?: number;
4074
+ draft_id: number;
4075
+ rich_message: InputRichMessage;
4076
+ can_stop?: boolean;
4077
+ keep_on_stop?: boolean;
4078
+ };
4079
+ answerInlineQuery: {
4080
+ inline_query_id: string;
4081
+ results: InlineQueryResult[];
4082
+ cache_time?: number;
4083
+ is_personal?: boolean;
4084
+ next_offset?: string;
4085
+ button?: InlineQueryResultsButton;
4086
+ };
4087
+ sendInvoice: {
4088
+ chat_id: number | string;
4089
+ message_thread_id?: number;
4090
+ direct_messages_topic_id?: number;
4091
+ title: string;
4092
+ description: string;
4093
+ payload: string;
4094
+ provider_token?: string;
4095
+ currency: string;
4096
+ prices: LabeledPrice[];
4097
+ max_tip_amount?: number;
4098
+ suggested_tip_amounts?: number[];
4099
+ start_parameter?: string;
4100
+ provider_data?: string;
4101
+ photo_url?: string;
4102
+ photo_size?: number;
4103
+ photo_width?: number;
4104
+ photo_height?: number;
4105
+ need_name?: boolean;
4106
+ need_phone_number?: boolean;
4107
+ need_email?: boolean;
4108
+ need_shipping_address?: boolean;
4109
+ send_phone_number_to_provider?: boolean;
4110
+ send_email_to_provider?: boolean;
4111
+ is_flexible?: boolean;
4112
+ disable_notification?: boolean;
4113
+ protect_content?: boolean;
4114
+ allow_paid_broadcast?: boolean;
4115
+ message_effect_id?: string;
4116
+ suggested_post_parameters?: SuggestedPostParameters;
4117
+ reply_parameters?: ReplyParameters;
4118
+ reply_markup?: InlineKeyboardMarkup;
4119
+ };
4120
+ createInvoiceLink: {
4121
+ business_connection_id?: string;
4122
+ title: string;
4123
+ description: string;
4124
+ payload: string;
4125
+ provider_token?: string;
4126
+ currency: string;
4127
+ prices: LabeledPrice[];
4128
+ subscription_period?: number;
4129
+ max_tip_amount?: number;
4130
+ suggested_tip_amounts?: number[];
4131
+ provider_data?: string;
4132
+ photo_url?: string;
4133
+ photo_size?: number;
4134
+ photo_width?: number;
4135
+ photo_height?: number;
4136
+ need_name?: boolean;
4137
+ need_phone_number?: boolean;
4138
+ need_email?: boolean;
4139
+ need_shipping_address?: boolean;
4140
+ send_phone_number_to_provider?: boolean;
4141
+ send_email_to_provider?: boolean;
4142
+ is_flexible?: boolean;
4143
+ };
4144
+ answerShippingQuery: {
4145
+ shipping_query_id: string;
4146
+ ok: boolean;
4147
+ shipping_options?: ShippingOption[];
4148
+ error_message?: string;
4149
+ };
4150
+ answerPreCheckoutQuery: {
4151
+ pre_checkout_query_id: string;
4152
+ ok: boolean;
4153
+ error_message?: string;
4154
+ };
4155
+ getMyStarBalance: Record<never, never>;
4156
+ getStarTransactions: {
4157
+ offset?: number;
4158
+ limit?: number;
4159
+ };
4160
+ refundStarPayment: {
4161
+ user_id: number;
4162
+ telegram_payment_charge_id: string;
4163
+ };
4164
+ editUserStarSubscription: {
4165
+ user_id: number;
4166
+ telegram_payment_charge_id: string;
4167
+ is_canceled: boolean;
4168
+ };
4169
+ setPassportDataErrors: {
4170
+ user_id: number;
4171
+ errors: PassportElementError[];
4172
+ };
4173
+ sendGame: {
4174
+ business_connection_id?: string;
4175
+ chat_id: number | string;
4176
+ message_thread_id?: number;
4177
+ game_short_name: string;
4178
+ disable_notification?: boolean;
4179
+ protect_content?: boolean;
4180
+ allow_paid_broadcast?: boolean;
4181
+ message_effect_id?: string;
4182
+ reply_parameters?: ReplyParameters;
4183
+ reply_markup?: InlineKeyboardMarkup;
4184
+ };
4185
+ setGameScore: {
4186
+ user_id: number;
4187
+ score: number;
4188
+ force?: boolean;
4189
+ disable_edit_message?: boolean;
4190
+ chat_id?: number;
4191
+ message_id?: number;
4192
+ inline_message_id?: string;
4193
+ };
4194
+ getGameHighScores: {
4195
+ user_id: number;
4196
+ chat_id?: number;
4197
+ message_id?: number;
4198
+ inline_message_id?: string;
4199
+ };
4200
+ }
4201
+ export interface TelegramMethodReturns {
4202
+ getUpdates: Update[];
4203
+ setWebhook: boolean;
4204
+ deleteWebhook: boolean;
4205
+ getWebhookInfo: unknown;
4206
+ getMe: User;
4207
+ logOut: boolean;
4208
+ close: boolean;
4209
+ sendMessage: Message;
4210
+ forwardMessage: Message;
4211
+ forwardMessages: unknown;
4212
+ copyMessage: MessageId;
4213
+ copyMessages: unknown;
4214
+ sendPhoto: Message;
4215
+ sendLivePhoto: Message;
4216
+ sendAudio: Message;
4217
+ sendDocument: Message;
4218
+ sendVideo: Message;
4219
+ sendAnimation: Message;
4220
+ sendVoice: Message;
4221
+ sendVideoNote: Message;
4222
+ sendWidget: Message;
4223
+ sendSharedWidget: Message;
4224
+ sendPaidMedia: Message;
4225
+ sendMediaGroup: unknown;
4226
+ sendLocation: Message;
4227
+ sendVenue: Message;
4228
+ sendContact: Message;
4229
+ sendPoll: Message;
4230
+ sendChecklist: Message;
4231
+ sendDice: Message;
4232
+ sendMessageDraft: boolean;
4233
+ sendChatAction: boolean;
4234
+ setMessageReaction: boolean;
4235
+ getUserProfilePhotos: UserProfilePhotos;
4236
+ getUserProfileAudios: UserProfileAudios;
4237
+ setUserEmojiStatus: boolean;
4238
+ getFile: unknown;
4239
+ banChatMember: boolean;
4240
+ unbanChatMember: boolean;
4241
+ restrictChatMember: boolean;
4242
+ promoteChatMember: boolean;
4243
+ setChatAdministratorCustomTitle: boolean;
4244
+ setChatMemberTag: boolean;
4245
+ banChatSenderChat: boolean;
4246
+ unbanChatSenderChat: boolean;
4247
+ setChatPermissions: boolean;
4248
+ exportChatInviteLink: unknown;
4249
+ createChatInviteLink: unknown;
4250
+ editChatInviteLink: unknown;
4251
+ createChatSubscriptionInviteLink: unknown;
4252
+ editChatSubscriptionInviteLink: unknown;
4253
+ revokeChatInviteLink: unknown;
4254
+ approveChatJoinRequest: boolean;
4255
+ declineChatJoinRequest: boolean;
4256
+ answerChatJoinRequestQuery: boolean;
4257
+ sendChatJoinRequestWebApp: boolean;
4258
+ setChatPhoto: boolean;
4259
+ deleteChatPhoto: boolean;
4260
+ setChatTitle: boolean;
4261
+ setChatDescription: boolean;
4262
+ pinChatMessage: boolean;
4263
+ unpinChatMessage: boolean;
4264
+ unpinAllChatMessages: boolean;
4265
+ leaveChat: boolean;
4266
+ getChat: ChatFullInfo;
4267
+ getChatAdministrators: ChatMember[];
4268
+ getChatMemberCount: number;
4269
+ getChatMember: ChatMember;
4270
+ getChatShareThemeBackdrops: ChatShareThemeBackdrops;
4271
+ getUserPersonalChatMessages: unknown;
4272
+ setChatStickerSet: boolean;
4273
+ deleteChatStickerSet: boolean;
4274
+ getForumTopicIconStickers: Sticker[];
4275
+ createForumTopic: unknown;
4276
+ editForumTopic: boolean;
4277
+ closeForumTopic: boolean;
4278
+ reopenForumTopic: boolean;
4279
+ deleteForumTopic: boolean;
4280
+ unpinAllForumTopicMessages: boolean;
4281
+ editGeneralForumTopic: boolean;
4282
+ closeGeneralForumTopic: boolean;
4283
+ reopenGeneralForumTopic: boolean;
4284
+ hideGeneralForumTopic: boolean;
4285
+ unhideGeneralForumTopic: boolean;
4286
+ unpinAllGeneralForumTopicMessages: boolean;
4287
+ answerCallbackQuery: boolean;
4288
+ answerWidgetQuery: boolean;
4289
+ answerGuestQuery: unknown;
4290
+ getUserChatBoosts: UserChatBoosts;
4291
+ getBusinessConnection: BusinessConnection;
4292
+ getManagedBotToken: unknown;
4293
+ replaceManagedBotToken: unknown;
4294
+ getManagedBotAccessSettings: BotAccessSettings;
4295
+ setManagedBotAccessSettings: boolean;
4296
+ setMySettings: boolean;
4297
+ setMyCommands: boolean;
4298
+ deleteMyCommands: boolean;
4299
+ getMyCommands: BotCommand[];
4300
+ setMyName: boolean;
4301
+ getMyName: BotName;
4302
+ setMyDescription: boolean;
4303
+ getMyDescription: BotDescription;
4304
+ setMyShortDescription: boolean;
4305
+ getMyShortDescription: BotShortDescription;
4306
+ setMyProfilePhoto: boolean;
4307
+ removeMyProfilePhoto: boolean;
4308
+ setChatMenuButton: boolean;
4309
+ getChatMenuButton: MenuButton;
4310
+ setMyDefaultAdministratorRights: boolean;
4311
+ getMyDefaultAdministratorRights: ChatAdministratorRights;
4312
+ getAvailableGifts: Gifts;
4313
+ sendGift: boolean;
4314
+ giftPremiumSubscription: boolean;
4315
+ verifyUser: boolean;
4316
+ verifyChat: boolean;
4317
+ removeUserVerification: boolean;
4318
+ removeChatVerification: boolean;
4319
+ readBusinessMessage: boolean;
4320
+ deleteBusinessMessages: boolean;
4321
+ setBusinessAccountName: boolean;
4322
+ setBusinessAccountUsername: boolean;
4323
+ setBusinessAccountBio: boolean;
4324
+ setBusinessAccountProfilePhoto: boolean;
4325
+ removeBusinessAccountProfilePhoto: boolean;
4326
+ setBusinessAccountGiftSettings: boolean;
4327
+ getBusinessAccountStarBalance: StarAmount;
4328
+ transferBusinessAccountStars: boolean;
4329
+ getBusinessAccountGifts: OwnedGifts;
4330
+ getUserGifts: OwnedGifts;
4331
+ getChatGifts: OwnedGifts;
4332
+ getUniqueGift: UniqueGift;
4333
+ convertGiftToStars: boolean;
4334
+ upgradeGift: boolean;
4335
+ transferGift: boolean;
4336
+ deleteBusinessAccountGift: boolean;
4337
+ postStory: Story;
4338
+ repostStory: Story;
4339
+ editStory: Story;
4340
+ deleteStory: boolean;
4341
+ answerWebAppQuery: unknown;
4342
+ savePreparedInlineMessage: PreparedInlineMessage;
4343
+ savePreparedKeyboardButton: PreparedKeyboardButton;
4344
+ editMessageText: boolean;
4345
+ editMessageCaption: boolean;
4346
+ editMessageMedia: boolean;
4347
+ editMessageLiveLocation: boolean;
4348
+ stopMessageLiveLocation: boolean;
4349
+ editMessageChecklist: Message;
4350
+ editMessageWidgetData: boolean;
4351
+ editSharedWidgetData: boolean;
4352
+ editMessageReplyMarkup: boolean;
4353
+ stopPoll: Poll;
4354
+ editEphemeralMessageText: boolean;
4355
+ editEphemeralMessageMedia: boolean;
4356
+ editEphemeralMessageCaption: boolean;
4357
+ editEphemeralMessageReplyMarkup: boolean;
4358
+ approveSuggestedPost: boolean;
4359
+ declineSuggestedPost: boolean;
4360
+ deleteMessage: boolean;
4361
+ deleteMessages: boolean;
4362
+ deleteEphemeralMessage: boolean;
4363
+ deleteMessageReaction: boolean;
4364
+ deleteAllMessageReactions: boolean;
4365
+ sendSticker: Message;
4366
+ getStickerSet: unknown;
4367
+ getCustomEmojiStickers: Sticker[];
4368
+ uploadStickerFile: unknown;
4369
+ createNewStickerSet: boolean;
4370
+ addStickerToSet: boolean;
4371
+ setStickerPositionInSet: boolean;
4372
+ deleteStickerFromSet: boolean;
4373
+ replaceStickerInSet: boolean;
4374
+ setStickerEmojiList: boolean;
4375
+ setStickerKeywords: boolean;
4376
+ setStickerMaskPosition: boolean;
4377
+ setStickerSetTitle: boolean;
4378
+ setStickerSetThumbnail: boolean;
4379
+ setCustomEmojiStickerSetThumbnail: boolean;
4380
+ deleteStickerSet: boolean;
4381
+ sendRichMessage: Message;
4382
+ sendRichMessageDraft: boolean;
4383
+ answerInlineQuery: boolean;
4384
+ sendInvoice: Message;
4385
+ createInvoiceLink: unknown;
4386
+ answerShippingQuery: boolean;
4387
+ answerPreCheckoutQuery: boolean;
4388
+ getMyStarBalance: unknown;
4389
+ getStarTransactions: unknown;
4390
+ refundStarPayment: boolean;
4391
+ editUserStarSubscription: boolean;
4392
+ setPassportDataErrors: boolean;
4393
+ sendGame: Message;
4394
+ setGameScore: boolean;
4395
+ getGameHighScores: unknown;
4396
+ }
4397
+ export type TelegramMethodName = keyof TelegramMethodParams;
4398
+ export declare const TELEGRAM_BOT_API_VERSION: "10.5";
4399
+ export declare const TELEGRAM_METHOD_NAMES: readonly TelegramMethodName[];
4400
+ export type UpdateType = "message" | "edited_message" | "channel_post" | "edited_channel_post" | "business_connection" | "business_message" | "edited_business_message" | "deleted_business_messages" | "guest_message" | "message_reaction" | "message_reaction_count" | "inline_query" | "chosen_inline_result" | "callback_query" | "widget_query" | "shared_widget_query" | "shipping_query" | "pre_checkout_query" | "purchased_paid_media" | "poll" | "poll_answer" | "my_chat_member" | "chat_member" | "chat_join_request" | "chat_boost" | "removed_chat_boost" | "managed_bot" | "subscription" | "stopped_message_generation";
4401
+ export declare const TELEGRAM_UPDATE_TYPES: readonly UpdateType[];
4402
+ //# sourceMappingURL=telegram.d.ts.map