@core-ease/telegram-kit 3.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (86) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +299 -0
  3. package/dist/animation/index.d.mts +4 -0
  4. package/dist/animation/index.d.ts +4 -0
  5. package/dist/animation/index.js +2413 -0
  6. package/dist/animation/index.mjs +5 -0
  7. package/dist/animation/lottie/index.d.mts +10 -0
  8. package/dist/animation/lottie/index.d.ts +10 -0
  9. package/dist/animation/lottie/index.js +2313 -0
  10. package/dist/animation/lottie/index.mjs +4 -0
  11. package/dist/animation/tgs/index.d.mts +18 -0
  12. package/dist/animation/tgs/index.d.ts +18 -0
  13. package/dist/animation/tgs/index.js +2402 -0
  14. package/dist/animation/tgs/index.mjs +4 -0
  15. package/dist/bot/index.d.mts +477 -0
  16. package/dist/bot/index.d.ts +477 -0
  17. package/dist/bot/index.js +870 -0
  18. package/dist/bot/index.mjs +847 -0
  19. package/dist/bot-D8BnLWIi.d.mts +2041 -0
  20. package/dist/bot-D8BnLWIi.d.ts +2041 -0
  21. package/dist/browser.global.js +23 -0
  22. package/dist/chunk-7AARTHNW.mjs +40 -0
  23. package/dist/chunk-7CVYPKAL.mjs +15 -0
  24. package/dist/chunk-B3PWALX5.mjs +4418 -0
  25. package/dist/chunk-BQEUEAVK.mjs +2262 -0
  26. package/dist/chunk-FPWYSKK2.mjs +3089 -0
  27. package/dist/chunk-JXK5HCDV.mjs +254 -0
  28. package/dist/chunk-OMH2JGOH.mjs +88 -0
  29. package/dist/chunk-PXO36YTU.mjs +38 -0
  30. package/dist/core/index.d.mts +151 -0
  31. package/dist/core/index.d.ts +151 -0
  32. package/dist/core/index.js +3837 -0
  33. package/dist/core/index.mjs +495 -0
  34. package/dist/dev/index.d.mts +77 -0
  35. package/dist/dev/index.d.ts +77 -0
  36. package/dist/dev/index.js +3214 -0
  37. package/dist/dev/index.mjs +151 -0
  38. package/dist/engine-BDm1_hzn.d.mts +382 -0
  39. package/dist/engine-BDm1_hzn.d.ts +382 -0
  40. package/dist/format/index.d.mts +61 -0
  41. package/dist/format/index.d.ts +61 -0
  42. package/dist/format/index.js +121 -0
  43. package/dist/format/index.mjs +112 -0
  44. package/dist/hooks/index.d.mts +1 -0
  45. package/dist/hooks/index.d.ts +1 -0
  46. package/dist/hooks/index.js +4234 -0
  47. package/dist/hooks/index.mjs +3 -0
  48. package/dist/hooks-C5Per70R.d.mts +1066 -0
  49. package/dist/hooks-C5Per70R.d.ts +1066 -0
  50. package/dist/index.d.mts +849 -0
  51. package/dist/index.d.ts +849 -0
  52. package/dist/index.js +5026 -0
  53. package/dist/index.mjs +478 -0
  54. package/dist/keyboards/index.d.mts +50 -0
  55. package/dist/keyboards/index.d.ts +50 -0
  56. package/dist/keyboards/index.js +127 -0
  57. package/dist/keyboards/index.mjs +124 -0
  58. package/dist/links/index.d.mts +53 -0
  59. package/dist/links/index.d.ts +53 -0
  60. package/dist/links/index.js +139 -0
  61. package/dist/links/index.mjs +133 -0
  62. package/dist/lottie/index.d.mts +3 -0
  63. package/dist/lottie/index.d.ts +3 -0
  64. package/dist/lottie/index.js +2313 -0
  65. package/dist/lottie/index.mjs +4 -0
  66. package/dist/qr/index.d.mts +75 -0
  67. package/dist/qr/index.d.ts +75 -0
  68. package/dist/qr/index.js +983 -0
  69. package/dist/qr/index.mjs +946 -0
  70. package/dist/sdk/index.d.mts +322 -0
  71. package/dist/sdk/index.d.ts +322 -0
  72. package/dist/sdk/index.js +3138 -0
  73. package/dist/sdk/index.mjs +2 -0
  74. package/dist/server/index.d.mts +28 -0
  75. package/dist/server/index.d.ts +28 -0
  76. package/dist/server/index.js +254 -0
  77. package/dist/server/index.mjs +246 -0
  78. package/dist/tgs/index.d.mts +3 -0
  79. package/dist/tgs/index.d.ts +3 -0
  80. package/dist/tgs/index.js +2402 -0
  81. package/dist/tgs/index.mjs +4 -0
  82. package/dist/webapp-B-3_74nK.d.mts +842 -0
  83. package/dist/webapp-B-3_74nK.d.ts +842 -0
  84. package/dist/webapp-BDi9q3-a.d.mts +42 -0
  85. package/dist/webapp-YvmwFYUQ.d.ts +42 -0
  86. package/package.json +165 -0
@@ -0,0 +1,2041 @@
1
+ interface User {
2
+ id: number;
3
+ is_bot: boolean;
4
+ first_name: string;
5
+ last_name?: string;
6
+ username?: string;
7
+ language_code?: string;
8
+ is_premium?: boolean;
9
+ added_to_attachment_menu?: boolean;
10
+ can_join_groups?: boolean;
11
+ can_read_all_group_messages?: boolean;
12
+ supports_inline_queries?: boolean;
13
+ can_connect_to_business?: boolean;
14
+ has_main_web_app?: boolean;
15
+ }
16
+ type ChatType = 'private' | 'group' | 'supergroup' | 'channel';
17
+ interface Chat {
18
+ id: number;
19
+ type: ChatType;
20
+ title?: string;
21
+ username?: string;
22
+ first_name?: string;
23
+ last_name?: string;
24
+ is_forum?: boolean;
25
+ }
26
+ interface ChatFullInfo extends Chat {
27
+ photo?: ChatPhoto;
28
+ active_usernames?: string[];
29
+ available_reactions?: ReactionType[];
30
+ accent_color_id?: number;
31
+ max_reaction_count?: number;
32
+ bio?: string;
33
+ has_private_forwards?: boolean;
34
+ has_restricted_voice_and_video_messages?: boolean;
35
+ join_to_send_messages?: boolean;
36
+ join_by_request?: boolean;
37
+ description?: string;
38
+ invite_link?: string;
39
+ pinned_message?: Message;
40
+ permissions?: ChatPermissions;
41
+ slow_mode_delay?: number;
42
+ unrestrict_boost_count?: number;
43
+ message_auto_delete_time?: number;
44
+ has_aggressive_anti_spam_enabled?: boolean;
45
+ has_hidden_members?: boolean;
46
+ has_protected_content?: boolean;
47
+ has_visible_history?: boolean;
48
+ sticker_set_name?: string;
49
+ can_set_sticker_set?: boolean;
50
+ custom_emoji_sticker_set_name?: string;
51
+ linked_chat_id?: number;
52
+ location?: ChatLocation;
53
+ background_custom_emoji_id?: string;
54
+ profile_accent_color_id?: number;
55
+ profile_background_custom_emoji_id?: string;
56
+ emoji_status_custom_emoji_id?: string;
57
+ emoji_status_expiration_date?: number;
58
+ business_intro?: BusinessIntro;
59
+ business_location?: BusinessLocation;
60
+ business_opening_hours?: BusinessOpeningHours;
61
+ personal_chat?: Chat;
62
+ birthdate?: Birthdate;
63
+ }
64
+ interface Message {
65
+ message_id: number;
66
+ message_thread_id?: number;
67
+ from?: User;
68
+ sender_chat?: Chat;
69
+ sender_boost_count?: number;
70
+ sender_business_bot?: User;
71
+ date: number;
72
+ business_connection_id?: string;
73
+ chat: Chat;
74
+ forward_origin?: MessageOrigin;
75
+ is_topic_message?: boolean;
76
+ is_automatic_forward?: boolean;
77
+ reply_to_message?: Message;
78
+ external_reply?: ExternalReplyInfo;
79
+ quote?: TextQuote;
80
+ reply_to_story?: Story;
81
+ via_bot?: User;
82
+ edit_date?: number;
83
+ has_protected_content?: boolean;
84
+ is_from_offline?: boolean;
85
+ media_group_id?: string;
86
+ author_signature?: string;
87
+ text?: string;
88
+ entities?: MessageEntity[];
89
+ link_preview_options?: LinkPreviewOptions;
90
+ effect_id?: string;
91
+ animation?: Animation;
92
+ audio?: Audio;
93
+ document?: Document;
94
+ paid_media?: PaidMediaInfo;
95
+ photo?: PhotoSize[];
96
+ sticker?: Sticker;
97
+ story?: Story;
98
+ video?: Video;
99
+ video_note?: VideoNote;
100
+ voice?: Voice;
101
+ caption?: string;
102
+ caption_entities?: MessageEntity[];
103
+ show_caption_above_media?: boolean;
104
+ has_media_spoiler?: boolean;
105
+ contact?: Contact;
106
+ dice?: Dice;
107
+ game?: Game;
108
+ poll?: Poll;
109
+ venue?: Venue;
110
+ location?: Location;
111
+ new_chat_members?: User[];
112
+ left_chat_member?: User;
113
+ new_chat_title?: string;
114
+ new_chat_photo?: PhotoSize[];
115
+ delete_chat_photo?: boolean;
116
+ group_chat_created?: boolean;
117
+ supergroup_chat_created?: boolean;
118
+ channel_chat_created?: boolean;
119
+ migrate_to_chat_id?: number;
120
+ migrate_from_chat_id?: number;
121
+ pinned_message?: Message;
122
+ invoice?: Invoice;
123
+ successful_payment?: SuccessfulPayment;
124
+ refunded_payment?: RefundedPayment;
125
+ users_shared?: UsersShared;
126
+ chat_shared?: ChatShared;
127
+ web_app_data?: WebAppData;
128
+ giveaway_created?: GiveawayCreated;
129
+ giveaway?: Giveaway;
130
+ giveaway_winners?: GiveawayWinners;
131
+ giveaway_completed?: GiveawayCompleted;
132
+ boost_added?: ChatBoostAdded;
133
+ chat_background_set?: ChatBackground;
134
+ proximity_alert_triggered?: ProximityAlertTriggered;
135
+ video_chat_scheduled?: VideoChatScheduled;
136
+ video_chat_started?: VideoChatStarted;
137
+ video_chat_ended?: VideoChatEnded;
138
+ video_chat_participants_invited?: VideoChatParticipantsInvited;
139
+ forum_topic_created?: ForumTopicCreated;
140
+ forum_topic_edited?: ForumTopicEdited;
141
+ forum_topic_closed?: ForumTopicClosed;
142
+ forum_topic_reopened?: ForumTopicReopened;
143
+ general_forum_topic_hidden?: GeneralForumTopicHidden;
144
+ general_forum_topic_unhidden?: GeneralForumTopicUnhidden;
145
+ message_auto_delete_timer_changed?: MessageAutoDeleteTimerChanged;
146
+ write_access_allowed?: WriteAccessAllowed;
147
+ connected_website?: string;
148
+ reply_markup?: InlineKeyboardMarkup;
149
+ }
150
+ interface MessageId {
151
+ message_id: number;
152
+ }
153
+ interface MessageEntity {
154
+ type: 'mention' | 'hashtag' | 'cashtag' | 'bot_command' | 'url' | 'email' | 'phone_number' | 'bold' | 'italic' | 'underline' | 'strikethrough' | 'spoiler' | 'blockquote' | 'expandable_blockquote' | 'code' | 'pre' | 'text_link' | 'text_mention' | 'custom_emoji';
155
+ offset: number;
156
+ length: number;
157
+ url?: string;
158
+ user?: User;
159
+ language?: string;
160
+ custom_emoji_id?: string;
161
+ }
162
+ interface PhotoSize {
163
+ file_id: string;
164
+ file_unique_id: string;
165
+ width: number;
166
+ height: number;
167
+ file_size?: number;
168
+ }
169
+ interface Audio {
170
+ file_id: string;
171
+ file_unique_id: string;
172
+ duration: number;
173
+ performer?: string;
174
+ title?: string;
175
+ file_name?: string;
176
+ mime_type?: string;
177
+ file_size?: number;
178
+ thumbnail?: PhotoSize;
179
+ }
180
+ interface Document {
181
+ file_id: string;
182
+ file_unique_id: string;
183
+ thumbnail?: PhotoSize;
184
+ file_name?: string;
185
+ mime_type?: string;
186
+ file_size?: number;
187
+ }
188
+ interface Video {
189
+ file_id: string;
190
+ file_unique_id: string;
191
+ width: number;
192
+ height: number;
193
+ duration: number;
194
+ thumbnail?: PhotoSize;
195
+ cover?: PhotoSize[];
196
+ start_timestamp?: number;
197
+ file_name?: string;
198
+ mime_type?: string;
199
+ file_size?: number;
200
+ }
201
+ interface Animation {
202
+ file_id: string;
203
+ file_unique_id: string;
204
+ width: number;
205
+ height: number;
206
+ duration: number;
207
+ thumbnail?: PhotoSize;
208
+ file_name?: string;
209
+ mime_type?: string;
210
+ file_size?: number;
211
+ }
212
+ interface Voice {
213
+ file_id: string;
214
+ file_unique_id: string;
215
+ duration: number;
216
+ mime_type?: string;
217
+ file_size?: number;
218
+ }
219
+ interface VideoNote {
220
+ file_id: string;
221
+ file_unique_id: string;
222
+ length: number;
223
+ duration: number;
224
+ thumbnail?: PhotoSize;
225
+ file_size?: number;
226
+ }
227
+ interface Sticker {
228
+ file_id: string;
229
+ file_unique_id: string;
230
+ type: 'regular' | 'mask' | 'custom_emoji';
231
+ width: number;
232
+ height: number;
233
+ is_animated: boolean;
234
+ is_video: boolean;
235
+ thumbnail?: PhotoSize;
236
+ emoji?: string;
237
+ set_name?: string;
238
+ premium_animation?: File;
239
+ mask_position?: MaskPosition;
240
+ custom_emoji_id?: string;
241
+ needs_repainting?: boolean;
242
+ file_size?: number;
243
+ }
244
+ interface MaskPosition {
245
+ point: 'forehead' | 'eyes' | 'mouth' | 'chin';
246
+ x_shift: number;
247
+ y_shift: number;
248
+ scale: number;
249
+ }
250
+ interface StickerSet {
251
+ name: string;
252
+ title: string;
253
+ sticker_type: 'regular' | 'mask' | 'custom_emoji';
254
+ stickers: Sticker[];
255
+ thumbnail?: PhotoSize;
256
+ }
257
+ interface Contact {
258
+ phone_number: string;
259
+ first_name: string;
260
+ last_name?: string;
261
+ user_id?: number;
262
+ vcard?: string;
263
+ }
264
+ interface Location {
265
+ longitude: number;
266
+ latitude: number;
267
+ horizontal_accuracy?: number;
268
+ live_period?: number;
269
+ heading?: number;
270
+ proximity_alert_radius?: number;
271
+ }
272
+ interface Venue {
273
+ location: Location;
274
+ title: string;
275
+ address: string;
276
+ foursquare_id?: string;
277
+ foursquare_type?: string;
278
+ google_place_id?: string;
279
+ google_place_type?: string;
280
+ }
281
+ interface Dice {
282
+ emoji: string;
283
+ value: number;
284
+ }
285
+ interface Poll {
286
+ id: string;
287
+ question: string;
288
+ question_entities?: MessageEntity[];
289
+ options: PollOption[];
290
+ total_voter_count: number;
291
+ is_closed: boolean;
292
+ is_anonymous: boolean;
293
+ type: 'regular' | 'quiz';
294
+ allows_multiple_answers: boolean;
295
+ correct_option_id?: number;
296
+ explanation?: string;
297
+ explanation_entities?: MessageEntity[];
298
+ open_period?: number;
299
+ close_date?: number;
300
+ }
301
+ interface PollOption {
302
+ text: string;
303
+ text_entities?: MessageEntity[];
304
+ voter_count: number;
305
+ }
306
+ interface File {
307
+ file_id: string;
308
+ file_unique_id: string;
309
+ file_size?: number;
310
+ file_path?: string;
311
+ }
312
+ interface UserProfilePhotos {
313
+ total_count: number;
314
+ photos: PhotoSize[][];
315
+ }
316
+ interface Update {
317
+ update_id: number;
318
+ message?: Message;
319
+ edited_message?: Message;
320
+ channel_post?: Message;
321
+ edited_channel_post?: Message;
322
+ business_connection?: BusinessConnection;
323
+ business_message?: Message;
324
+ edited_business_message?: Message;
325
+ deleted_business_messages?: BusinessMessagesDeleted;
326
+ message_reaction?: MessageReactionUpdated;
327
+ message_reaction_count?: MessageReactionCountUpdated;
328
+ inline_query?: InlineQuery;
329
+ chosen_inline_result?: ChosenInlineResult;
330
+ callback_query?: CallbackQuery;
331
+ shipping_query?: ShippingQuery;
332
+ pre_checkout_query?: PreCheckoutQuery;
333
+ purchased_paid_media?: PaidMediaPurchased;
334
+ poll?: Poll;
335
+ poll_answer?: PollAnswer;
336
+ my_chat_member?: ChatMemberUpdated;
337
+ chat_member?: ChatMemberUpdated;
338
+ chat_join_request?: ChatJoinRequest;
339
+ chat_boost?: ChatBoostUpdated;
340
+ removed_chat_boost?: ChatBoostRemoved;
341
+ }
342
+ interface WebhookInfo {
343
+ url: string;
344
+ has_custom_certificate: boolean;
345
+ pending_update_count: number;
346
+ ip_address?: string;
347
+ last_error_date?: number;
348
+ last_error_message?: string;
349
+ last_synchronization_error_date?: number;
350
+ max_connections?: number;
351
+ allowed_updates?: string[];
352
+ }
353
+ interface CallbackQuery {
354
+ id: string;
355
+ from: User;
356
+ message?: Message;
357
+ inline_message_id?: string;
358
+ chat_instance: string;
359
+ data?: string;
360
+ game_short_name?: string;
361
+ }
362
+ interface InlineQuery {
363
+ id: string;
364
+ from: User;
365
+ query: string;
366
+ offset: string;
367
+ chat_type?: 'sender' | 'private' | 'group' | 'supergroup' | 'channel';
368
+ location?: Location;
369
+ }
370
+ interface ChosenInlineResult {
371
+ result_id: string;
372
+ from: User;
373
+ location?: Location;
374
+ inline_message_id?: string;
375
+ query: string;
376
+ }
377
+ interface ShippingQuery {
378
+ id: string;
379
+ from: User;
380
+ invoice_payload: string;
381
+ shipping_address: ShippingAddress;
382
+ }
383
+ interface PreCheckoutQuery {
384
+ id: string;
385
+ from: User;
386
+ currency: string;
387
+ total_amount: number;
388
+ invoice_payload: string;
389
+ shipping_option_id?: string;
390
+ order_info?: OrderInfo;
391
+ }
392
+ interface PollAnswer {
393
+ poll_id: string;
394
+ voter_chat?: Chat;
395
+ user?: User;
396
+ option_ids: number[];
397
+ }
398
+ interface ChatMemberUpdated {
399
+ chat: Chat;
400
+ from: User;
401
+ date: number;
402
+ old_chat_member: ChatMember;
403
+ new_chat_member: ChatMember;
404
+ invite_link?: ChatInviteLink;
405
+ via_join_request?: boolean;
406
+ via_chat_folder_invite_link?: boolean;
407
+ }
408
+ type ChatMember = ChatMemberOwner | ChatMemberAdministrator | ChatMemberMember | ChatMemberRestricted | ChatMemberLeft | ChatMemberBanned;
409
+ interface ChatMemberOwner {
410
+ status: 'creator';
411
+ user: User;
412
+ is_anonymous: boolean;
413
+ custom_title?: string;
414
+ }
415
+ interface ChatMemberAdministrator {
416
+ status: 'administrator';
417
+ user: User;
418
+ can_be_edited: boolean;
419
+ is_anonymous: boolean;
420
+ can_manage_chat: boolean;
421
+ can_delete_messages: boolean;
422
+ can_manage_video_chats: boolean;
423
+ can_restrict_members: boolean;
424
+ can_promote_members: boolean;
425
+ can_change_info: boolean;
426
+ can_invite_users: boolean;
427
+ can_post_stories: boolean;
428
+ can_edit_stories: boolean;
429
+ can_delete_stories: boolean;
430
+ can_post_messages?: boolean;
431
+ can_edit_messages?: boolean;
432
+ can_pin_messages?: boolean;
433
+ can_manage_topics?: boolean;
434
+ custom_title?: string;
435
+ }
436
+ interface ChatMemberMember {
437
+ status: 'member';
438
+ user: User;
439
+ until_date?: number;
440
+ }
441
+ interface ChatMemberRestricted {
442
+ status: 'restricted';
443
+ user: User;
444
+ is_member: boolean;
445
+ can_send_messages: boolean;
446
+ can_send_audios: boolean;
447
+ can_send_documents: boolean;
448
+ can_send_photos: boolean;
449
+ can_send_videos: boolean;
450
+ can_send_video_notes: boolean;
451
+ can_send_voice_notes: boolean;
452
+ can_send_polls: boolean;
453
+ can_send_other_messages: boolean;
454
+ can_add_web_page_previews: boolean;
455
+ can_change_info: boolean;
456
+ can_invite_users: boolean;
457
+ can_pin_messages: boolean;
458
+ can_manage_topics: boolean;
459
+ until_date: number;
460
+ }
461
+ interface ChatMemberLeft {
462
+ status: 'left';
463
+ user: User;
464
+ }
465
+ interface ChatMemberBanned {
466
+ status: 'kicked';
467
+ user: User;
468
+ until_date: number;
469
+ }
470
+ interface ChatJoinRequest {
471
+ chat: Chat;
472
+ from: User;
473
+ user_chat_id: number;
474
+ date: number;
475
+ bio?: string;
476
+ invite_link?: ChatInviteLink;
477
+ }
478
+ interface ChatPhoto {
479
+ small_file_id: string;
480
+ small_file_unique_id: string;
481
+ big_file_id: string;
482
+ big_file_unique_id: string;
483
+ }
484
+ interface ChatInviteLink {
485
+ invite_link: string;
486
+ creator: User;
487
+ creates_join_request: boolean;
488
+ is_primary: boolean;
489
+ is_revoked: boolean;
490
+ name?: string;
491
+ expire_date?: number;
492
+ member_limit?: number;
493
+ pending_join_request_count?: number;
494
+ subscription_period?: number;
495
+ subscription_price?: number;
496
+ }
497
+ interface ChatPermissions {
498
+ can_send_messages?: boolean;
499
+ can_send_audios?: boolean;
500
+ can_send_documents?: boolean;
501
+ can_send_photos?: boolean;
502
+ can_send_videos?: boolean;
503
+ can_send_video_notes?: boolean;
504
+ can_send_voice_notes?: boolean;
505
+ can_send_polls?: boolean;
506
+ can_send_other_messages?: boolean;
507
+ can_add_web_page_previews?: boolean;
508
+ can_change_info?: boolean;
509
+ can_invite_users?: boolean;
510
+ can_pin_messages?: boolean;
511
+ can_manage_topics?: boolean;
512
+ }
513
+ interface ChatLocation {
514
+ location: Location;
515
+ address: string;
516
+ }
517
+ interface ChatAdministratorRights {
518
+ is_anonymous?: boolean;
519
+ can_manage_chat?: boolean;
520
+ can_delete_messages?: boolean;
521
+ can_manage_video_chats?: boolean;
522
+ can_restrict_members?: boolean;
523
+ can_promote_members?: boolean;
524
+ can_change_info?: boolean;
525
+ can_invite_users?: boolean;
526
+ can_post_stories?: boolean;
527
+ can_edit_stories?: boolean;
528
+ can_delete_stories?: boolean;
529
+ can_post_messages?: boolean;
530
+ can_edit_messages?: boolean;
531
+ can_pin_messages?: boolean;
532
+ can_manage_topics?: boolean;
533
+ }
534
+ interface InlineKeyboardMarkup {
535
+ inline_keyboard: InlineKeyboardButton[][];
536
+ }
537
+ interface InlineKeyboardButton {
538
+ text: string;
539
+ url?: string;
540
+ callback_data?: string;
541
+ web_app?: WebAppInfo;
542
+ login_url?: LoginUrl;
543
+ switch_inline_query?: string;
544
+ switch_inline_query_current_chat?: string;
545
+ switch_inline_query_chosen_chat?: SwitchInlineQueryChosenChat;
546
+ copy_text?: CopyTextButton;
547
+ callback_game?: CallbackGame;
548
+ pay?: boolean;
549
+ }
550
+ interface WebAppInfo {
551
+ url: string;
552
+ }
553
+ interface LoginUrl {
554
+ url: string;
555
+ forward_text?: string;
556
+ bot_username?: string;
557
+ request_write_access?: boolean;
558
+ }
559
+ interface SwitchInlineQueryChosenChat {
560
+ query?: string;
561
+ allow_user_chats?: boolean;
562
+ allow_bot_chats?: boolean;
563
+ allow_group_chats?: boolean;
564
+ allow_channel_chats?: boolean;
565
+ }
566
+ interface CopyTextButton {
567
+ text: string;
568
+ }
569
+ interface CallbackGame {
570
+ }
571
+ interface ReplyKeyboardMarkup {
572
+ keyboard: KeyboardButton[][];
573
+ is_persistent?: boolean;
574
+ resize_keyboard?: boolean;
575
+ one_time_keyboard?: boolean;
576
+ input_field_placeholder?: string;
577
+ selective?: boolean;
578
+ }
579
+ interface KeyboardButton {
580
+ text: string;
581
+ request_users?: KeyboardButtonRequestUsers;
582
+ request_chat?: KeyboardButtonRequestChat;
583
+ request_contact?: boolean;
584
+ request_location?: boolean;
585
+ request_poll?: KeyboardButtonPollType;
586
+ web_app?: WebAppInfo;
587
+ }
588
+ interface KeyboardButtonRequestUsers {
589
+ request_id: number;
590
+ user_is_bot?: boolean;
591
+ user_is_premium?: boolean;
592
+ max_quantity?: number;
593
+ request_name?: boolean;
594
+ request_username?: boolean;
595
+ request_photo?: boolean;
596
+ }
597
+ interface KeyboardButtonRequestChat {
598
+ request_id: number;
599
+ chat_is_channel: boolean;
600
+ chat_is_forum?: boolean;
601
+ chat_has_username?: boolean;
602
+ chat_is_created?: boolean;
603
+ user_administrator_rights?: ChatAdministratorRights;
604
+ bot_administrator_rights?: ChatAdministratorRights;
605
+ bot_is_member?: boolean;
606
+ request_title?: boolean;
607
+ request_username?: boolean;
608
+ request_photo?: boolean;
609
+ }
610
+ interface KeyboardButtonPollType {
611
+ type?: 'quiz' | 'regular';
612
+ }
613
+ interface ReplyKeyboardRemove {
614
+ remove_keyboard: true;
615
+ selective?: boolean;
616
+ }
617
+ interface ForceReply {
618
+ force_reply: true;
619
+ input_field_placeholder?: string;
620
+ selective?: boolean;
621
+ }
622
+ type ReplyMarkup = InlineKeyboardMarkup | ReplyKeyboardMarkup | ReplyKeyboardRemove | ForceReply;
623
+ interface ReplyParameters {
624
+ message_id: number;
625
+ chat_id?: number | string;
626
+ allow_sending_without_reply?: boolean;
627
+ quote?: string;
628
+ quote_parse_mode?: string;
629
+ quote_entities?: MessageEntity[];
630
+ quote_position?: number;
631
+ }
632
+ interface LinkPreviewOptions {
633
+ is_disabled?: boolean;
634
+ url?: string;
635
+ prefer_small_media?: boolean;
636
+ prefer_large_media?: boolean;
637
+ show_above_text?: boolean;
638
+ }
639
+ interface BotCommand {
640
+ command: string;
641
+ description: string;
642
+ }
643
+ type BotCommandScope = BotCommandScopeDefault | BotCommandScopeAllPrivateChats | BotCommandScopeAllGroupChats | BotCommandScopeAllChatAdministrators | BotCommandScopeChat | BotCommandScopeChatAdministrators | BotCommandScopeChatMember;
644
+ interface BotCommandScopeDefault {
645
+ type: 'default';
646
+ }
647
+ interface BotCommandScopeAllPrivateChats {
648
+ type: 'all_private_chats';
649
+ }
650
+ interface BotCommandScopeAllGroupChats {
651
+ type: 'all_group_chats';
652
+ }
653
+ interface BotCommandScopeAllChatAdministrators {
654
+ type: 'all_chat_administrators';
655
+ }
656
+ interface BotCommandScopeChat {
657
+ type: 'chat';
658
+ chat_id: number | string;
659
+ }
660
+ interface BotCommandScopeChatAdministrators {
661
+ type: 'chat_administrators';
662
+ chat_id: number | string;
663
+ }
664
+ interface BotCommandScopeChatMember {
665
+ type: 'chat_member';
666
+ chat_id: number | string;
667
+ user_id: number;
668
+ }
669
+ type MenuButton = MenuButtonCommands | MenuButtonWebApp | MenuButtonDefault;
670
+ interface MenuButtonCommands {
671
+ type: 'commands';
672
+ }
673
+ interface MenuButtonWebApp {
674
+ type: 'web_app';
675
+ text: string;
676
+ web_app: WebAppInfo;
677
+ }
678
+ interface MenuButtonDefault {
679
+ type: 'default';
680
+ }
681
+ interface BotDescription {
682
+ description: string;
683
+ }
684
+ interface BotShortDescription {
685
+ short_description: string;
686
+ }
687
+ interface BotName {
688
+ name: string;
689
+ }
690
+ type ReactionType = ReactionTypeEmoji | ReactionTypeCustomEmoji | ReactionTypePaid;
691
+ interface ReactionTypeEmoji {
692
+ type: 'emoji';
693
+ emoji: string;
694
+ }
695
+ interface ReactionTypeCustomEmoji {
696
+ type: 'custom_emoji';
697
+ custom_emoji_id: string;
698
+ }
699
+ interface ReactionTypePaid {
700
+ type: 'paid';
701
+ }
702
+ interface MessageReactionUpdated {
703
+ chat: Chat;
704
+ message_id: number;
705
+ user?: User;
706
+ actor_chat?: Chat;
707
+ date: number;
708
+ old_reaction: ReactionType[];
709
+ new_reaction: ReactionType[];
710
+ }
711
+ interface MessageReactionCountUpdated {
712
+ chat: Chat;
713
+ message_id: number;
714
+ date: number;
715
+ reactions: ReactionCount[];
716
+ }
717
+ interface ReactionCount {
718
+ type: ReactionType;
719
+ total_count: number;
720
+ }
721
+ interface Invoice {
722
+ title: string;
723
+ description: string;
724
+ start_parameter: string;
725
+ currency: string;
726
+ total_amount: number;
727
+ }
728
+ interface SuccessfulPayment {
729
+ currency: string;
730
+ total_amount: number;
731
+ invoice_payload: string;
732
+ subscription_expiration_date?: number;
733
+ is_recurring?: boolean;
734
+ is_first_recurring?: boolean;
735
+ shipping_option_id?: string;
736
+ order_info?: OrderInfo;
737
+ telegram_payment_charge_id: string;
738
+ provider_payment_charge_id: string;
739
+ }
740
+ interface RefundedPayment {
741
+ currency: string;
742
+ total_amount: number;
743
+ invoice_payload: string;
744
+ telegram_payment_charge_id: string;
745
+ provider_payment_charge_id?: string;
746
+ }
747
+ interface OrderInfo {
748
+ name?: string;
749
+ phone_number?: string;
750
+ email?: string;
751
+ shipping_address?: ShippingAddress;
752
+ }
753
+ interface ShippingAddress {
754
+ country_code: string;
755
+ state: string;
756
+ city: string;
757
+ street_line1: string;
758
+ street_line2: string;
759
+ post_code: string;
760
+ }
761
+ interface ShippingOption {
762
+ id: string;
763
+ title: string;
764
+ prices: LabeledPrice[];
765
+ }
766
+ interface LabeledPrice {
767
+ label: string;
768
+ amount: number;
769
+ }
770
+ interface PaidMediaInfo {
771
+ star_count: number;
772
+ paid_media: PaidMedia[];
773
+ }
774
+ type PaidMedia = PaidMediaPreview | PaidMediaPhoto | PaidMediaVideo;
775
+ interface PaidMediaPreview {
776
+ type: 'preview';
777
+ width?: number;
778
+ height?: number;
779
+ duration?: number;
780
+ }
781
+ interface PaidMediaPhoto {
782
+ type: 'photo';
783
+ photo: PhotoSize[];
784
+ }
785
+ interface PaidMediaVideo {
786
+ type: 'video';
787
+ video: Video;
788
+ }
789
+ interface Game {
790
+ title: string;
791
+ description: string;
792
+ photo: PhotoSize[];
793
+ text?: string;
794
+ text_entities?: MessageEntity[];
795
+ animation?: Animation;
796
+ }
797
+ interface GameHighScore {
798
+ position: number;
799
+ user: User;
800
+ score: number;
801
+ }
802
+ interface Story {
803
+ chat: Chat;
804
+ id: number;
805
+ }
806
+ interface BusinessMessagesDeleted {
807
+ business_connection_id: string;
808
+ chat: Chat;
809
+ message_ids: number[];
810
+ }
811
+ interface ExternalReplyInfo {
812
+ origin: MessageOrigin;
813
+ chat?: Chat;
814
+ message_id?: number;
815
+ link_preview_options?: LinkPreviewOptions;
816
+ animation?: Animation;
817
+ audio?: Audio;
818
+ document?: Document;
819
+ paid_media?: PaidMediaInfo;
820
+ photo?: PhotoSize[];
821
+ sticker?: Sticker;
822
+ story?: Story;
823
+ video?: Video;
824
+ video_note?: VideoNote;
825
+ voice?: Voice;
826
+ has_media_spoiler?: boolean;
827
+ contact?: Contact;
828
+ dice?: Dice;
829
+ game?: Game;
830
+ invoice?: Invoice;
831
+ location?: Location;
832
+ poll?: Poll;
833
+ venue?: Venue;
834
+ }
835
+ interface TextQuote {
836
+ text: string;
837
+ entities?: MessageEntity[];
838
+ position: number;
839
+ is_manual?: boolean;
840
+ }
841
+ type MessageOrigin = MessageOriginUser | MessageOriginHiddenUser | MessageOriginChat | MessageOriginChannel;
842
+ interface MessageOriginUser {
843
+ type: 'user';
844
+ date: number;
845
+ sender_user: User;
846
+ }
847
+ interface MessageOriginHiddenUser {
848
+ type: 'hidden_user';
849
+ date: number;
850
+ sender_user_name: string;
851
+ }
852
+ interface MessageOriginChat {
853
+ type: 'chat';
854
+ date: number;
855
+ sender_chat: Chat;
856
+ author_signature?: string;
857
+ }
858
+ interface MessageOriginChannel {
859
+ type: 'channel';
860
+ date: number;
861
+ chat: Chat;
862
+ message_id: number;
863
+ author_signature?: string;
864
+ }
865
+ interface ChatBoostUpdated {
866
+ chat: Chat;
867
+ boost: ChatBoost;
868
+ }
869
+ interface ChatBoostRemoved {
870
+ chat: Chat;
871
+ boost_id: string;
872
+ remove_date: number;
873
+ source: ChatBoostSource;
874
+ }
875
+ interface ChatBoost {
876
+ boost_id: string;
877
+ add_date: number;
878
+ expiration_date: number;
879
+ source: ChatBoostSource;
880
+ }
881
+ type ChatBoostSource = ChatBoostSourcePremium | ChatBoostSourceGiftCode | ChatBoostSourceGiveaway;
882
+ interface ChatBoostSourcePremium {
883
+ source: 'premium';
884
+ user: User;
885
+ }
886
+ interface ChatBoostSourceGiftCode {
887
+ source: 'gift_code';
888
+ user: User;
889
+ }
890
+ interface ChatBoostSourceGiveaway {
891
+ source: 'giveaway';
892
+ giveaway_message_id: number;
893
+ user?: User;
894
+ prize_star_count?: number;
895
+ is_unclaimed?: boolean;
896
+ }
897
+ interface InlineQueryResultsButton {
898
+ text: string;
899
+ web_app?: WebAppInfo;
900
+ start_parameter?: string;
901
+ }
902
+ type InlineQueryResult = InlineQueryResultArticle | InlineQueryResultPhoto | InlineQueryResultGif | InlineQueryResultMpeg4Gif | InlineQueryResultVideo | InlineQueryResultAudio | InlineQueryResultVoice | InlineQueryResultDocument | InlineQueryResultLocation | InlineQueryResultVenue | InlineQueryResultContact | InlineQueryResultGame | InlineQueryResultCachedPhoto | InlineQueryResultCachedGif | InlineQueryResultCachedMpeg4Gif | InlineQueryResultCachedSticker | InlineQueryResultCachedDocument | InlineQueryResultCachedVideo | InlineQueryResultCachedVoice | InlineQueryResultCachedAudio;
903
+ interface InlineQueryResultBase {
904
+ id: string;
905
+ reply_markup?: InlineKeyboardMarkup;
906
+ }
907
+ interface InputMessageContent {
908
+ message_text?: string;
909
+ parse_mode?: string;
910
+ entities?: MessageEntity[];
911
+ link_preview_options?: LinkPreviewOptions;
912
+ }
913
+ interface InlineQueryResultArticle extends InlineQueryResultBase {
914
+ type: 'article';
915
+ title: string;
916
+ input_message_content: InputMessageContent;
917
+ url?: string;
918
+ hide_url?: boolean;
919
+ description?: string;
920
+ thumbnail_url?: string;
921
+ thumbnail_width?: number;
922
+ thumbnail_height?: number;
923
+ }
924
+ interface InlineQueryResultPhoto extends InlineQueryResultBase {
925
+ type: 'photo';
926
+ photo_url: string;
927
+ thumbnail_url: string;
928
+ photo_width?: number;
929
+ photo_height?: number;
930
+ title?: string;
931
+ description?: string;
932
+ caption?: string;
933
+ parse_mode?: string;
934
+ caption_entities?: MessageEntity[];
935
+ show_caption_above_media?: boolean;
936
+ input_message_content?: InputMessageContent;
937
+ }
938
+ interface InlineQueryResultGif extends InlineQueryResultBase {
939
+ type: 'gif';
940
+ gif_url: string;
941
+ gif_width?: number;
942
+ gif_height?: number;
943
+ gif_duration?: number;
944
+ thumbnail_url: string;
945
+ thumbnail_mime_type?: string;
946
+ title?: string;
947
+ caption?: string;
948
+ parse_mode?: string;
949
+ input_message_content?: InputMessageContent;
950
+ }
951
+ interface InlineQueryResultMpeg4Gif extends InlineQueryResultBase {
952
+ type: 'mpeg4_gif';
953
+ mpeg4_url: string;
954
+ mpeg4_width?: number;
955
+ mpeg4_height?: number;
956
+ mpeg4_duration?: number;
957
+ thumbnail_url: string;
958
+ thumbnail_mime_type?: string;
959
+ title?: string;
960
+ caption?: string;
961
+ parse_mode?: string;
962
+ input_message_content?: InputMessageContent;
963
+ }
964
+ interface InlineQueryResultVideo extends InlineQueryResultBase {
965
+ type: 'video';
966
+ video_url: string;
967
+ mime_type: string;
968
+ thumbnail_url: string;
969
+ title: string;
970
+ caption?: string;
971
+ parse_mode?: string;
972
+ video_width?: number;
973
+ video_height?: number;
974
+ video_duration?: number;
975
+ description?: string;
976
+ input_message_content?: InputMessageContent;
977
+ }
978
+ interface InlineQueryResultAudio extends InlineQueryResultBase {
979
+ type: 'audio';
980
+ audio_url: string;
981
+ title: string;
982
+ caption?: string;
983
+ parse_mode?: string;
984
+ performer?: string;
985
+ audio_duration?: number;
986
+ input_message_content?: InputMessageContent;
987
+ }
988
+ interface InlineQueryResultVoice extends InlineQueryResultBase {
989
+ type: 'voice';
990
+ voice_url: string;
991
+ title: string;
992
+ caption?: string;
993
+ parse_mode?: string;
994
+ voice_duration?: number;
995
+ input_message_content?: InputMessageContent;
996
+ }
997
+ interface InlineQueryResultDocument extends InlineQueryResultBase {
998
+ type: 'document';
999
+ title: string;
1000
+ caption?: string;
1001
+ parse_mode?: string;
1002
+ document_url: string;
1003
+ mime_type: string;
1004
+ description?: string;
1005
+ input_message_content?: InputMessageContent;
1006
+ thumbnail_url?: string;
1007
+ thumbnail_width?: number;
1008
+ thumbnail_height?: number;
1009
+ }
1010
+ interface InlineQueryResultLocation extends InlineQueryResultBase {
1011
+ type: 'location';
1012
+ latitude: number;
1013
+ longitude: number;
1014
+ title: string;
1015
+ horizontal_accuracy?: number;
1016
+ live_period?: number;
1017
+ heading?: number;
1018
+ proximity_alert_radius?: number;
1019
+ input_message_content?: InputMessageContent;
1020
+ thumbnail_url?: string;
1021
+ thumbnail_width?: number;
1022
+ thumbnail_height?: number;
1023
+ }
1024
+ interface InlineQueryResultVenue extends InlineQueryResultBase {
1025
+ type: 'venue';
1026
+ latitude: number;
1027
+ longitude: number;
1028
+ title: string;
1029
+ address: string;
1030
+ foursquare_id?: string;
1031
+ foursquare_type?: string;
1032
+ google_place_id?: string;
1033
+ google_place_type?: string;
1034
+ input_message_content?: InputMessageContent;
1035
+ thumbnail_url?: string;
1036
+ thumbnail_width?: number;
1037
+ thumbnail_height?: number;
1038
+ }
1039
+ interface InlineQueryResultContact extends InlineQueryResultBase {
1040
+ type: 'contact';
1041
+ phone_number: string;
1042
+ first_name: string;
1043
+ last_name?: string;
1044
+ vcard?: string;
1045
+ input_message_content?: InputMessageContent;
1046
+ thumbnail_url?: string;
1047
+ thumbnail_width?: number;
1048
+ thumbnail_height?: number;
1049
+ }
1050
+ interface InlineQueryResultGame extends InlineQueryResultBase {
1051
+ type: 'game';
1052
+ game_short_name: string;
1053
+ }
1054
+ interface InlineQueryResultCachedPhoto extends InlineQueryResultBase {
1055
+ type: 'photo';
1056
+ photo_file_id: string;
1057
+ title?: string;
1058
+ description?: string;
1059
+ caption?: string;
1060
+ parse_mode?: string;
1061
+ input_message_content?: InputMessageContent;
1062
+ }
1063
+ interface InlineQueryResultCachedGif extends InlineQueryResultBase {
1064
+ type: 'gif';
1065
+ gif_file_id: string;
1066
+ title?: string;
1067
+ caption?: string;
1068
+ parse_mode?: string;
1069
+ input_message_content?: InputMessageContent;
1070
+ }
1071
+ interface InlineQueryResultCachedMpeg4Gif extends InlineQueryResultBase {
1072
+ type: 'mpeg4_gif';
1073
+ mpeg4_file_id: string;
1074
+ title?: string;
1075
+ caption?: string;
1076
+ parse_mode?: string;
1077
+ input_message_content?: InputMessageContent;
1078
+ }
1079
+ interface InlineQueryResultCachedSticker extends InlineQueryResultBase {
1080
+ type: 'sticker';
1081
+ sticker_file_id: string;
1082
+ input_message_content?: InputMessageContent;
1083
+ }
1084
+ interface InlineQueryResultCachedDocument extends InlineQueryResultBase {
1085
+ type: 'document';
1086
+ title: string;
1087
+ document_file_id: string;
1088
+ description?: string;
1089
+ caption?: string;
1090
+ parse_mode?: string;
1091
+ input_message_content?: InputMessageContent;
1092
+ }
1093
+ interface InlineQueryResultCachedVideo extends InlineQueryResultBase {
1094
+ type: 'video';
1095
+ video_file_id: string;
1096
+ title: string;
1097
+ description?: string;
1098
+ caption?: string;
1099
+ parse_mode?: string;
1100
+ input_message_content?: InputMessageContent;
1101
+ }
1102
+ interface InlineQueryResultCachedVoice extends InlineQueryResultBase {
1103
+ type: 'voice';
1104
+ voice_file_id: string;
1105
+ title: string;
1106
+ caption?: string;
1107
+ parse_mode?: string;
1108
+ input_message_content?: InputMessageContent;
1109
+ }
1110
+ interface InlineQueryResultCachedAudio extends InlineQueryResultBase {
1111
+ type: 'audio';
1112
+ audio_file_id: string;
1113
+ caption?: string;
1114
+ parse_mode?: string;
1115
+ input_message_content?: InputMessageContent;
1116
+ }
1117
+ interface SendCommonParams {
1118
+ chat_id: number | string;
1119
+ message_thread_id?: number;
1120
+ business_connection_id?: string;
1121
+ disable_notification?: boolean;
1122
+ protect_content?: boolean;
1123
+ allow_paid_broadcast?: boolean;
1124
+ reply_parameters?: ReplyParameters;
1125
+ reply_markup?: ReplyMarkup;
1126
+ message_effect_id?: string;
1127
+ }
1128
+ interface SendMessageParams extends SendCommonParams {
1129
+ text: string;
1130
+ parse_mode?: 'HTML' | 'Markdown' | 'MarkdownV2';
1131
+ entities?: MessageEntity[];
1132
+ link_preview_options?: LinkPreviewOptions;
1133
+ }
1134
+ interface SendPhotoParams extends SendCommonParams {
1135
+ photo: string;
1136
+ caption?: string;
1137
+ parse_mode?: 'HTML' | 'Markdown' | 'MarkdownV2';
1138
+ caption_entities?: MessageEntity[];
1139
+ show_caption_above_media?: boolean;
1140
+ has_spoiler?: boolean;
1141
+ }
1142
+ interface SendAudioParams extends SendCommonParams {
1143
+ audio: string;
1144
+ caption?: string;
1145
+ parse_mode?: 'HTML' | 'Markdown' | 'MarkdownV2';
1146
+ caption_entities?: MessageEntity[];
1147
+ duration?: number;
1148
+ performer?: string;
1149
+ title?: string;
1150
+ thumbnail?: string;
1151
+ }
1152
+ interface SendDocumentParams extends SendCommonParams {
1153
+ document: string;
1154
+ thumbnail?: string;
1155
+ caption?: string;
1156
+ parse_mode?: 'HTML' | 'Markdown' | 'MarkdownV2';
1157
+ caption_entities?: MessageEntity[];
1158
+ disable_content_type_detection?: boolean;
1159
+ }
1160
+ interface SendVideoParams extends SendCommonParams {
1161
+ video: string;
1162
+ duration?: number;
1163
+ width?: number;
1164
+ height?: number;
1165
+ thumbnail?: string;
1166
+ cover?: string;
1167
+ start_timestamp?: number;
1168
+ caption?: string;
1169
+ parse_mode?: 'HTML' | 'Markdown' | 'MarkdownV2';
1170
+ caption_entities?: MessageEntity[];
1171
+ show_caption_above_media?: boolean;
1172
+ has_spoiler?: boolean;
1173
+ supports_streaming?: boolean;
1174
+ }
1175
+ interface SendAnimationParams extends SendCommonParams {
1176
+ animation: string;
1177
+ duration?: number;
1178
+ width?: number;
1179
+ height?: number;
1180
+ thumbnail?: string;
1181
+ caption?: string;
1182
+ parse_mode?: 'HTML' | 'Markdown' | 'MarkdownV2';
1183
+ caption_entities?: MessageEntity[];
1184
+ show_caption_above_media?: boolean;
1185
+ has_spoiler?: boolean;
1186
+ }
1187
+ interface SendVoiceParams extends SendCommonParams {
1188
+ voice: string;
1189
+ caption?: string;
1190
+ parse_mode?: 'HTML' | 'Markdown' | 'MarkdownV2';
1191
+ caption_entities?: MessageEntity[];
1192
+ duration?: number;
1193
+ }
1194
+ interface SendVideoNoteParams extends SendCommonParams {
1195
+ video_note: string;
1196
+ duration?: number;
1197
+ length?: number;
1198
+ thumbnail?: string;
1199
+ }
1200
+ interface SendStickerParams extends SendCommonParams {
1201
+ sticker: string;
1202
+ emoji?: string;
1203
+ }
1204
+ interface SendLocationParams extends SendCommonParams {
1205
+ latitude: number;
1206
+ longitude: number;
1207
+ horizontal_accuracy?: number;
1208
+ live_period?: number;
1209
+ heading?: number;
1210
+ proximity_alert_radius?: number;
1211
+ }
1212
+ interface SendVenueParams extends SendCommonParams {
1213
+ latitude: number;
1214
+ longitude: number;
1215
+ title: string;
1216
+ address: string;
1217
+ foursquare_id?: string;
1218
+ foursquare_type?: string;
1219
+ google_place_id?: string;
1220
+ google_place_type?: string;
1221
+ }
1222
+ interface SendContactParams extends SendCommonParams {
1223
+ phone_number: string;
1224
+ first_name: string;
1225
+ last_name?: string;
1226
+ vcard?: string;
1227
+ }
1228
+ interface SendPollParams extends SendCommonParams {
1229
+ question: string;
1230
+ question_parse_mode?: 'HTML' | 'Markdown' | 'MarkdownV2';
1231
+ question_entities?: MessageEntity[];
1232
+ options: InputPollOption[];
1233
+ is_anonymous?: boolean;
1234
+ type?: 'quiz' | 'regular';
1235
+ allows_multiple_answers?: boolean;
1236
+ correct_option_id?: number;
1237
+ explanation?: string;
1238
+ explanation_parse_mode?: string;
1239
+ explanation_entities?: MessageEntity[];
1240
+ open_period?: number;
1241
+ close_date?: number;
1242
+ is_closed?: boolean;
1243
+ }
1244
+ interface InputPollOption {
1245
+ text: string;
1246
+ text_parse_mode?: string;
1247
+ text_entities?: MessageEntity[];
1248
+ }
1249
+ interface SendDiceParams extends SendCommonParams {
1250
+ emoji?: '🎲' | '🎯' | '🏀' | '⚽' | '🎳' | '🎰';
1251
+ }
1252
+ interface SendChatActionParams {
1253
+ chat_id: number | string;
1254
+ message_thread_id?: number;
1255
+ business_connection_id?: string;
1256
+ action: 'typing' | 'upload_photo' | 'record_video' | 'upload_video' | 'record_voice' | 'upload_voice' | 'upload_document' | 'choose_sticker' | 'find_location' | 'record_video_note' | 'upload_video_note';
1257
+ }
1258
+ interface ForwardMessageParams {
1259
+ chat_id: number | string;
1260
+ message_thread_id?: number;
1261
+ from_chat_id: number | string;
1262
+ message_id: number;
1263
+ video_start_timestamp?: number;
1264
+ disable_notification?: boolean;
1265
+ protect_content?: boolean;
1266
+ }
1267
+ interface ForwardMessagesParams {
1268
+ chat_id: number | string;
1269
+ message_thread_id?: number;
1270
+ from_chat_id: number | string;
1271
+ message_ids: number[];
1272
+ disable_notification?: boolean;
1273
+ protect_content?: boolean;
1274
+ }
1275
+ interface CopyMessageParams {
1276
+ chat_id: number | string;
1277
+ message_thread_id?: number;
1278
+ from_chat_id: number | string;
1279
+ message_id: number;
1280
+ video_start_timestamp?: number;
1281
+ caption?: string;
1282
+ parse_mode?: string;
1283
+ caption_entities?: MessageEntity[];
1284
+ show_caption_above_media?: boolean;
1285
+ disable_notification?: boolean;
1286
+ protect_content?: boolean;
1287
+ allow_paid_broadcast?: boolean;
1288
+ reply_parameters?: ReplyParameters;
1289
+ reply_markup?: ReplyMarkup;
1290
+ }
1291
+ interface CopyMessagesParams {
1292
+ chat_id: number | string;
1293
+ message_thread_id?: number;
1294
+ from_chat_id: number | string;
1295
+ message_ids: number[];
1296
+ disable_notification?: boolean;
1297
+ protect_content?: boolean;
1298
+ remove_caption?: boolean;
1299
+ }
1300
+ interface InputMediaPhoto {
1301
+ type: 'photo';
1302
+ media: string;
1303
+ caption?: string;
1304
+ parse_mode?: string;
1305
+ caption_entities?: MessageEntity[];
1306
+ show_caption_above_media?: boolean;
1307
+ has_spoiler?: boolean;
1308
+ }
1309
+ interface InputMediaVideo {
1310
+ type: 'video';
1311
+ media: string;
1312
+ thumbnail?: string;
1313
+ caption?: string;
1314
+ parse_mode?: string;
1315
+ caption_entities?: MessageEntity[];
1316
+ show_caption_above_media?: boolean;
1317
+ width?: number;
1318
+ height?: number;
1319
+ duration?: number;
1320
+ supports_streaming?: boolean;
1321
+ has_spoiler?: boolean;
1322
+ }
1323
+ interface InputMediaAnimation {
1324
+ type: 'animation';
1325
+ media: string;
1326
+ thumbnail?: string;
1327
+ caption?: string;
1328
+ parse_mode?: string;
1329
+ caption_entities?: MessageEntity[];
1330
+ show_caption_above_media?: boolean;
1331
+ width?: number;
1332
+ height?: number;
1333
+ duration?: number;
1334
+ has_spoiler?: boolean;
1335
+ }
1336
+ interface InputMediaAudio {
1337
+ type: 'audio';
1338
+ media: string;
1339
+ thumbnail?: string;
1340
+ caption?: string;
1341
+ parse_mode?: string;
1342
+ caption_entities?: MessageEntity[];
1343
+ duration?: number;
1344
+ performer?: string;
1345
+ title?: string;
1346
+ }
1347
+ interface InputMediaDocument {
1348
+ type: 'document';
1349
+ media: string;
1350
+ thumbnail?: string;
1351
+ caption?: string;
1352
+ parse_mode?: string;
1353
+ caption_entities?: MessageEntity[];
1354
+ disable_content_type_detection?: boolean;
1355
+ }
1356
+ type InputMedia = InputMediaPhoto | InputMediaVideo | InputMediaAnimation | InputMediaAudio | InputMediaDocument;
1357
+ interface SendMediaGroupParams {
1358
+ chat_id: number | string;
1359
+ message_thread_id?: number;
1360
+ business_connection_id?: string;
1361
+ media: InputMedia[];
1362
+ disable_notification?: boolean;
1363
+ protect_content?: boolean;
1364
+ allow_paid_broadcast?: boolean;
1365
+ message_effect_id?: string;
1366
+ reply_parameters?: ReplyParameters;
1367
+ }
1368
+ interface EditMessageTextParams {
1369
+ chat_id?: number | string;
1370
+ message_id?: number;
1371
+ inline_message_id?: string;
1372
+ business_connection_id?: string;
1373
+ text: string;
1374
+ parse_mode?: string;
1375
+ entities?: MessageEntity[];
1376
+ link_preview_options?: LinkPreviewOptions;
1377
+ reply_markup?: InlineKeyboardMarkup;
1378
+ }
1379
+ interface EditMessageCaptionParams {
1380
+ chat_id?: number | string;
1381
+ message_id?: number;
1382
+ inline_message_id?: string;
1383
+ business_connection_id?: string;
1384
+ caption?: string;
1385
+ parse_mode?: string;
1386
+ caption_entities?: MessageEntity[];
1387
+ show_caption_above_media?: boolean;
1388
+ reply_markup?: InlineKeyboardMarkup;
1389
+ }
1390
+ interface EditMessageMediaParams {
1391
+ chat_id?: number | string;
1392
+ message_id?: number;
1393
+ inline_message_id?: string;
1394
+ business_connection_id?: string;
1395
+ media: InputMedia;
1396
+ reply_markup?: InlineKeyboardMarkup;
1397
+ }
1398
+ interface EditMessageReplyMarkupParams {
1399
+ chat_id?: number | string;
1400
+ message_id?: number;
1401
+ inline_message_id?: string;
1402
+ business_connection_id?: string;
1403
+ reply_markup?: InlineKeyboardMarkup;
1404
+ }
1405
+ interface DeleteMessageParams {
1406
+ chat_id: number | string;
1407
+ message_id: number;
1408
+ }
1409
+ interface DeleteMessagesParams {
1410
+ chat_id: number | string;
1411
+ message_ids: number[];
1412
+ }
1413
+ interface PinChatMessageParams {
1414
+ chat_id: number | string;
1415
+ message_id: number;
1416
+ business_connection_id?: string;
1417
+ disable_notification?: boolean;
1418
+ }
1419
+ interface UnpinChatMessageParams {
1420
+ chat_id: number | string;
1421
+ message_id?: number;
1422
+ business_connection_id?: string;
1423
+ }
1424
+ interface BanChatMemberParams {
1425
+ chat_id: number | string;
1426
+ user_id: number;
1427
+ until_date?: number;
1428
+ revoke_messages?: boolean;
1429
+ }
1430
+ interface UnbanChatMemberParams {
1431
+ chat_id: number | string;
1432
+ user_id: number;
1433
+ only_if_banned?: boolean;
1434
+ }
1435
+ interface RestrictChatMemberParams {
1436
+ chat_id: number | string;
1437
+ user_id: number;
1438
+ permissions: ChatPermissions;
1439
+ use_independent_chat_permissions?: boolean;
1440
+ until_date?: number;
1441
+ }
1442
+ interface PromoteChatMemberParams {
1443
+ chat_id: number | string;
1444
+ user_id: number;
1445
+ is_anonymous?: boolean;
1446
+ can_manage_chat?: boolean;
1447
+ can_delete_messages?: boolean;
1448
+ can_manage_video_chats?: boolean;
1449
+ can_restrict_members?: boolean;
1450
+ can_promote_members?: boolean;
1451
+ can_change_info?: boolean;
1452
+ can_invite_users?: boolean;
1453
+ can_post_stories?: boolean;
1454
+ can_edit_stories?: boolean;
1455
+ can_delete_stories?: boolean;
1456
+ can_post_messages?: boolean;
1457
+ can_edit_messages?: boolean;
1458
+ can_pin_messages?: boolean;
1459
+ can_manage_topics?: boolean;
1460
+ }
1461
+ interface SendInvoiceParams extends SendCommonParams {
1462
+ title: string;
1463
+ description: string;
1464
+ payload: string;
1465
+ provider_token?: string;
1466
+ currency: string;
1467
+ prices: LabeledPrice[];
1468
+ max_tip_amount?: number;
1469
+ suggested_tip_amounts?: number[];
1470
+ start_parameter?: string;
1471
+ provider_data?: string;
1472
+ photo_url?: string;
1473
+ photo_size?: number;
1474
+ photo_width?: number;
1475
+ photo_height?: number;
1476
+ need_name?: boolean;
1477
+ need_phone_number?: boolean;
1478
+ need_email?: boolean;
1479
+ need_shipping_address?: boolean;
1480
+ send_phone_number_to_provider?: boolean;
1481
+ send_email_to_provider?: boolean;
1482
+ is_flexible?: boolean;
1483
+ }
1484
+ interface CreateInvoiceLinkParams {
1485
+ title: string;
1486
+ description: string;
1487
+ payload: string;
1488
+ provider_token?: string;
1489
+ currency: string;
1490
+ prices: LabeledPrice[];
1491
+ subscription_period?: number;
1492
+ max_tip_amount?: number;
1493
+ suggested_tip_amounts?: number[];
1494
+ provider_data?: string;
1495
+ photo_url?: string;
1496
+ photo_size?: number;
1497
+ photo_width?: number;
1498
+ photo_height?: number;
1499
+ need_name?: boolean;
1500
+ need_phone_number?: boolean;
1501
+ need_email?: boolean;
1502
+ need_shipping_address?: boolean;
1503
+ send_phone_number_to_provider?: boolean;
1504
+ send_email_to_provider?: boolean;
1505
+ is_flexible?: boolean;
1506
+ }
1507
+ interface SetMyCommandsParams {
1508
+ commands: BotCommand[];
1509
+ scope?: BotCommandScope;
1510
+ language_code?: string;
1511
+ }
1512
+ interface GetMyCommandsParams {
1513
+ scope?: BotCommandScope;
1514
+ language_code?: string;
1515
+ }
1516
+ interface DeleteMyCommandsParams {
1517
+ scope?: BotCommandScope;
1518
+ language_code?: string;
1519
+ }
1520
+ interface SetMessageReactionParams {
1521
+ chat_id: number | string;
1522
+ message_id: number;
1523
+ reaction?: ReactionType[];
1524
+ is_big?: boolean;
1525
+ }
1526
+ interface GetUpdatesParams {
1527
+ offset?: number;
1528
+ limit?: number;
1529
+ timeout?: number;
1530
+ allowed_updates?: string[];
1531
+ }
1532
+ interface SetWebhookParams {
1533
+ url: string;
1534
+ certificate?: string;
1535
+ ip_address?: string;
1536
+ max_connections?: number;
1537
+ allowed_updates?: string[];
1538
+ drop_pending_updates?: boolean;
1539
+ secret_token?: string;
1540
+ }
1541
+ interface DeleteWebhookParams {
1542
+ drop_pending_updates?: boolean;
1543
+ }
1544
+ interface AnswerCallbackQueryParams {
1545
+ callback_query_id: string;
1546
+ text?: string;
1547
+ show_alert?: boolean;
1548
+ url?: string;
1549
+ cache_time?: number;
1550
+ }
1551
+ interface AnswerInlineQueryParams {
1552
+ inline_query_id: string;
1553
+ results: InlineQueryResult[];
1554
+ cache_time?: number;
1555
+ is_personal?: boolean;
1556
+ next_offset?: string;
1557
+ button?: InlineQueryResultsButton;
1558
+ }
1559
+ interface AnswerWebAppQueryParams {
1560
+ web_app_query_id: string;
1561
+ result: InlineQueryResult;
1562
+ }
1563
+ interface AnswerShippingQueryParams {
1564
+ shipping_query_id: string;
1565
+ ok: boolean;
1566
+ shipping_options?: ShippingOption[];
1567
+ error_message?: string;
1568
+ }
1569
+ interface AnswerPreCheckoutQueryParams {
1570
+ pre_checkout_query_id: string;
1571
+ ok: boolean;
1572
+ error_message?: string;
1573
+ }
1574
+ interface GetUserProfilePhotosParams {
1575
+ user_id: number;
1576
+ offset?: number;
1577
+ limit?: number;
1578
+ }
1579
+ interface CreateChatInviteLinkParams {
1580
+ chat_id: number | string;
1581
+ name?: string;
1582
+ expire_date?: number;
1583
+ member_limit?: number;
1584
+ creates_join_request?: boolean;
1585
+ }
1586
+ interface EditChatInviteLinkParams extends CreateChatInviteLinkParams {
1587
+ invite_link: string;
1588
+ }
1589
+ interface RevokeChatInviteLinkParams {
1590
+ chat_id: number | string;
1591
+ invite_link: string;
1592
+ }
1593
+ interface SendGameParams {
1594
+ chat_id: number;
1595
+ message_thread_id?: number;
1596
+ business_connection_id?: string;
1597
+ game_short_name: string;
1598
+ disable_notification?: boolean;
1599
+ protect_content?: boolean;
1600
+ allow_paid_broadcast?: boolean;
1601
+ message_effect_id?: string;
1602
+ reply_parameters?: ReplyParameters;
1603
+ reply_markup?: InlineKeyboardMarkup;
1604
+ }
1605
+ interface SetGameScoreParams {
1606
+ user_id: number;
1607
+ score: number;
1608
+ force?: boolean;
1609
+ disable_edit_message?: boolean;
1610
+ chat_id?: number;
1611
+ message_id?: number;
1612
+ inline_message_id?: string;
1613
+ }
1614
+ interface GetGameHighScoresParams {
1615
+ user_id: number;
1616
+ chat_id?: number;
1617
+ message_id?: number;
1618
+ inline_message_id?: string;
1619
+ }
1620
+ interface CreateForumTopicParams {
1621
+ chat_id: number | string;
1622
+ name: string;
1623
+ icon_color?: number;
1624
+ icon_custom_emoji_id?: string;
1625
+ }
1626
+ interface EditForumTopicParams {
1627
+ chat_id: number | string;
1628
+ message_thread_id: number;
1629
+ name?: string;
1630
+ icon_custom_emoji_id?: string;
1631
+ }
1632
+ interface ForumTopic {
1633
+ message_thread_id: number;
1634
+ name: string;
1635
+ icon_color: number;
1636
+ icon_custom_emoji_id?: string;
1637
+ }
1638
+ interface InputSticker {
1639
+ sticker: string;
1640
+ format: 'static' | 'animated' | 'video';
1641
+ emoji_list: string[];
1642
+ mask_position?: MaskPosition;
1643
+ keywords?: string[];
1644
+ }
1645
+ interface CreateNewStickerSetParams {
1646
+ user_id: number;
1647
+ name: string;
1648
+ title: string;
1649
+ stickers: InputSticker[];
1650
+ sticker_type?: 'regular' | 'mask' | 'custom_emoji';
1651
+ needs_repainting?: boolean;
1652
+ }
1653
+ interface AddStickerToSetParams {
1654
+ user_id: number;
1655
+ name: string;
1656
+ sticker: InputSticker;
1657
+ }
1658
+ interface UsersShared {
1659
+ request_id: number;
1660
+ users: SharedUser[];
1661
+ }
1662
+ interface SharedUser {
1663
+ user_id: number;
1664
+ first_name?: string;
1665
+ last_name?: string;
1666
+ username?: string;
1667
+ photo?: PhotoSize[];
1668
+ }
1669
+ interface ChatShared {
1670
+ request_id: number;
1671
+ chat_id: number;
1672
+ title?: string;
1673
+ username?: string;
1674
+ photo?: PhotoSize[];
1675
+ }
1676
+ interface WebAppData {
1677
+ data: string;
1678
+ button_text: string;
1679
+ }
1680
+ interface GiveawayCreated {
1681
+ prize_star_count?: number;
1682
+ }
1683
+ interface Giveaway {
1684
+ chats: Chat[];
1685
+ winners_selection_date: number;
1686
+ winner_count: number;
1687
+ only_new_members?: boolean;
1688
+ has_public_winners?: boolean;
1689
+ prize_description?: string;
1690
+ country_codes?: string[];
1691
+ prize_star_count?: number;
1692
+ premium_subscription_month_count?: number;
1693
+ }
1694
+ interface GiveawayWinners {
1695
+ chat: Chat;
1696
+ giveaway_message_id: number;
1697
+ winners_selection_date: number;
1698
+ winner_count: number;
1699
+ winners: User[];
1700
+ additional_chat_count?: number;
1701
+ prize_star_count?: number;
1702
+ premium_subscription_month_count?: number;
1703
+ unclaimed_prize_count?: number;
1704
+ only_new_members?: boolean;
1705
+ was_refunded?: boolean;
1706
+ prize_description?: string;
1707
+ }
1708
+ interface GiveawayCompleted {
1709
+ winner_count: number;
1710
+ unclaimed_prize_count?: number;
1711
+ giveaway_message?: Message;
1712
+ is_star_giveaway?: boolean;
1713
+ }
1714
+ interface ChatBoostAdded {
1715
+ boost_count: number;
1716
+ }
1717
+ interface ChatBackground {
1718
+ type: BackgroundType;
1719
+ }
1720
+ type BackgroundType = BackgroundTypeFill | BackgroundTypeWallpaper | BackgroundTypePattern | BackgroundTypeChatTheme;
1721
+ interface BackgroundTypeFill {
1722
+ type: 'fill';
1723
+ fill: BackgroundFill;
1724
+ dark_theme_dimming: number;
1725
+ }
1726
+ interface BackgroundTypeWallpaper {
1727
+ type: 'wallpaper';
1728
+ document: Document;
1729
+ dark_theme_dimming: number;
1730
+ is_blurred?: boolean;
1731
+ is_moving?: boolean;
1732
+ }
1733
+ interface BackgroundTypePattern {
1734
+ type: 'pattern';
1735
+ document: Document;
1736
+ fill: BackgroundFill;
1737
+ intensity: number;
1738
+ is_inverted?: boolean;
1739
+ is_moving?: boolean;
1740
+ }
1741
+ interface BackgroundTypeChatTheme {
1742
+ type: 'chat_theme';
1743
+ theme_name: string;
1744
+ }
1745
+ type BackgroundFill = BackgroundFillSolid | BackgroundFillGradient | BackgroundFillFreeformGradient;
1746
+ interface BackgroundFillSolid {
1747
+ type: 'solid';
1748
+ color: number;
1749
+ }
1750
+ interface BackgroundFillGradient {
1751
+ type: 'gradient';
1752
+ top_color: number;
1753
+ bottom_color: number;
1754
+ rotation_angle: number;
1755
+ }
1756
+ interface BackgroundFillFreeformGradient {
1757
+ type: 'freeform_gradient';
1758
+ colors: number[];
1759
+ }
1760
+ interface ProximityAlertTriggered {
1761
+ traveler: User;
1762
+ watcher: User;
1763
+ distance: number;
1764
+ }
1765
+ interface VideoChatScheduled {
1766
+ start_date: number;
1767
+ }
1768
+ interface VideoChatStarted {
1769
+ }
1770
+ interface VideoChatEnded {
1771
+ duration: number;
1772
+ }
1773
+ interface VideoChatParticipantsInvited {
1774
+ users: User[];
1775
+ }
1776
+ interface ForumTopicCreated {
1777
+ name: string;
1778
+ icon_color: number;
1779
+ icon_custom_emoji_id?: string;
1780
+ }
1781
+ interface ForumTopicEdited {
1782
+ name?: string;
1783
+ icon_custom_emoji_id?: string;
1784
+ }
1785
+ interface ForumTopicClosed {
1786
+ }
1787
+ interface ForumTopicReopened {
1788
+ }
1789
+ interface GeneralForumTopicHidden {
1790
+ }
1791
+ interface GeneralForumTopicUnhidden {
1792
+ }
1793
+ interface MessageAutoDeleteTimerChanged {
1794
+ message_auto_delete_time: number;
1795
+ }
1796
+ interface WriteAccessAllowed {
1797
+ from_request?: boolean;
1798
+ web_app_name?: string;
1799
+ from_attachment_menu?: boolean;
1800
+ }
1801
+ interface BusinessIntro {
1802
+ title?: string;
1803
+ message?: string;
1804
+ sticker?: Sticker;
1805
+ }
1806
+ interface BusinessLocation {
1807
+ address: string;
1808
+ location?: Location;
1809
+ }
1810
+ interface BusinessOpeningHours {
1811
+ time_zone_name: string;
1812
+ opening_hours: BusinessOpeningHoursInterval[];
1813
+ }
1814
+ interface BusinessOpeningHoursInterval {
1815
+ opening_minute: number;
1816
+ closing_minute: number;
1817
+ }
1818
+ interface Birthdate {
1819
+ day: number;
1820
+ month: number;
1821
+ year?: number;
1822
+ }
1823
+ interface Gift {
1824
+ id: string;
1825
+ sticker: Sticker;
1826
+ star_count: number;
1827
+ total_count?: number;
1828
+ remaining_count?: number;
1829
+ upgrade_star_count?: number;
1830
+ }
1831
+ interface Gifts {
1832
+ gifts: Gift[];
1833
+ }
1834
+ interface StarTransaction {
1835
+ id: string;
1836
+ amount: number;
1837
+ nanostar_amount?: number;
1838
+ date: number;
1839
+ source?: TransactionPartner;
1840
+ receiver?: TransactionPartner;
1841
+ }
1842
+ interface StarTransactions {
1843
+ transactions: StarTransaction[];
1844
+ }
1845
+ type TransactionPartner = TransactionPartnerUser | TransactionPartnerFragment | TransactionPartnerTelegramAds | TransactionPartnerTelegramApi | TransactionPartnerOther;
1846
+ interface TransactionPartnerUser {
1847
+ type: 'user';
1848
+ user: User;
1849
+ affiliate?: AffiliateInfo;
1850
+ invoice_payload?: string;
1851
+ subscription_period?: number;
1852
+ paid_media?: PaidMedia[];
1853
+ paid_media_payload?: string;
1854
+ gift?: Gift;
1855
+ }
1856
+ interface TransactionPartnerFragment {
1857
+ type: 'fragment';
1858
+ withdrawal_state?: RevenueWithdrawalState;
1859
+ }
1860
+ interface TransactionPartnerTelegramAds {
1861
+ type: 'telegram_ads';
1862
+ }
1863
+ interface TransactionPartnerTelegramApi {
1864
+ type: 'telegram_api';
1865
+ request_count: number;
1866
+ }
1867
+ interface TransactionPartnerOther {
1868
+ type: 'other';
1869
+ }
1870
+ interface AffiliateInfo {
1871
+ affiliate_user?: User;
1872
+ affiliate_chat?: Chat;
1873
+ commission_per_mille: number;
1874
+ amount: number;
1875
+ nanostar_amount?: number;
1876
+ }
1877
+ interface RevenueWithdrawalState {
1878
+ type: 'pending' | 'succeeded' | 'failed';
1879
+ date?: number;
1880
+ url?: string;
1881
+ }
1882
+ interface PaidMediaPurchased {
1883
+ from: User;
1884
+ paid_media_payload: string;
1885
+ }
1886
+ interface PaidMediaPurchased {
1887
+ from: User;
1888
+ paid_media_payload: string;
1889
+ }
1890
+ interface BusinessConnection {
1891
+ id: string;
1892
+ user: User;
1893
+ user_chat_id: number;
1894
+ date: number;
1895
+ can_reply: boolean;
1896
+ is_enabled: boolean;
1897
+ }
1898
+ interface BusinessConnection {
1899
+ id: string;
1900
+ user: User;
1901
+ user_chat_id: number;
1902
+ date: number;
1903
+ can_reply: boolean;
1904
+ is_enabled: boolean;
1905
+ }
1906
+ interface UserChatBoosts {
1907
+ boosts: ChatBoost[];
1908
+ }
1909
+ interface SendPaidMediaParams {
1910
+ business_connection_id?: string;
1911
+ chat_id: number | string;
1912
+ star_count: number;
1913
+ media: InputPaidMedia[];
1914
+ payload?: string;
1915
+ caption?: string;
1916
+ parse_mode?: string;
1917
+ caption_entities?: MessageEntity[];
1918
+ show_caption_above_media?: boolean;
1919
+ disable_notification?: boolean;
1920
+ protect_content?: boolean;
1921
+ reply_parameters?: ReplyParameters;
1922
+ reply_markup?: ReplyMarkup;
1923
+ allow_paid_broadcast?: boolean;
1924
+ }
1925
+ interface InputPaidMedia {
1926
+ type: 'photo' | 'video';
1927
+ media: string;
1928
+ thumbnail?: string;
1929
+ width?: number;
1930
+ height?: number;
1931
+ duration?: number;
1932
+ supports_streaming?: boolean;
1933
+ }
1934
+ interface GetBusinessConnectionParams {
1935
+ business_connection_id: string;
1936
+ }
1937
+ interface SetChatStickerSetParams {
1938
+ chat_id: number | string;
1939
+ sticker_set_name: string;
1940
+ }
1941
+ interface DeleteChatStickerSetParams {
1942
+ chat_id: number | string;
1943
+ }
1944
+ interface CreateChatSubscriptionInviteLinkParams {
1945
+ chat_id: number | string;
1946
+ name?: string;
1947
+ subscription_period: number;
1948
+ subscription_price: number;
1949
+ }
1950
+ interface EditChatSubscriptionInviteLinkParams {
1951
+ chat_id: number | string;
1952
+ invite_link: string;
1953
+ name?: string;
1954
+ }
1955
+ interface GetAvailableGiftsParams {
1956
+ }
1957
+ interface SendGiftParams {
1958
+ user_id: number;
1959
+ gift_id: string;
1960
+ pay_for_upgrade?: boolean;
1961
+ text?: string;
1962
+ text_parse_mode?: string;
1963
+ text_entities?: MessageEntity[];
1964
+ }
1965
+ interface SetUserEmojiStatusParams {
1966
+ user_id: number;
1967
+ emoji_status_custom_emoji_id?: string;
1968
+ emoji_status_expiration_date?: number;
1969
+ }
1970
+ interface VerifyUserParams {
1971
+ user_id: number;
1972
+ custom_description?: string;
1973
+ }
1974
+ interface RemoveUserVerificationParams {
1975
+ user_id: number;
1976
+ }
1977
+ interface VerifyChatParams {
1978
+ chat_id: number | string;
1979
+ custom_description?: string;
1980
+ }
1981
+ interface RemoveChatVerificationParams {
1982
+ chat_id: number | string;
1983
+ }
1984
+ interface ReadBusinessMessageParams {
1985
+ business_connection_id: string;
1986
+ chat_id: number;
1987
+ message_id: number;
1988
+ }
1989
+ interface DeleteBusinessMessagesParams {
1990
+ business_connection_id: string;
1991
+ message_ids: number[];
1992
+ }
1993
+ interface AllowUserMessagesParams {
1994
+ user_id: number;
1995
+ }
1996
+ interface DisallowUserMessagesParams {
1997
+ user_id: number;
1998
+ }
1999
+ interface GetUserChatBoostsParams {
2000
+ chat_id: number | string;
2001
+ user_id: number;
2002
+ }
2003
+ interface GetStarTransactionsParams {
2004
+ offset?: number;
2005
+ limit?: number;
2006
+ }
2007
+ interface RefundStarPaymentParams {
2008
+ user_id: number;
2009
+ telegram_payment_charge_id: string;
2010
+ }
2011
+ interface SavePreparedInlineMessageParams {
2012
+ user_id: number;
2013
+ result: InlineQueryResult;
2014
+ allow_user_chats?: boolean;
2015
+ allow_bot_chats?: boolean;
2016
+ allow_group_chats?: boolean;
2017
+ allow_channel_chats?: boolean;
2018
+ }
2019
+ interface PreparedInlineMessage {
2020
+ id: string;
2021
+ expiration_date: number;
2022
+ }
2023
+ interface TelegramApiResponse<T> {
2024
+ ok: boolean;
2025
+ result?: T;
2026
+ description?: string;
2027
+ error_code?: number;
2028
+ parameters?: ResponseParameters;
2029
+ }
2030
+ interface ResponseParameters {
2031
+ migrate_to_chat_id?: number;
2032
+ retry_after?: number;
2033
+ }
2034
+ declare class TelegramApiError extends Error {
2035
+ readonly errorCode: number;
2036
+ readonly description: string;
2037
+ readonly parameters?: ResponseParameters | undefined;
2038
+ constructor(errorCode: number, description: string, parameters?: ResponseParameters | undefined);
2039
+ }
2040
+
2041
+ export { type EditChatInviteLinkParams as $, type DeleteMessageParams as A, type BotDescription as B, type CopyMessageParams as C, type DeleteWebhookParams as D, type EditMessageTextParams as E, type ForwardMessageParams as F, type GetUpdatesParams as G, type DeleteMessagesParams as H, type PinChatMessageParams as I, type UnpinChatMessageParams as J, type File as K, type GetUserProfilePhotosParams as L, type Message as M, type UserProfilePhotos as N, type ChatFullInfo as O, type Poll as P, type ChatMember as Q, type ReplyMarkup as R, type SetWebhookParams as S, type BanChatMemberParams as T, type Update as U, type UnbanChatMemberParams as V, type WebhookInfo as W, type RestrictChatMemberParams as X, type PromoteChatMemberParams as Y, type CreateChatInviteLinkParams as Z, type ChatInviteLink as _, type User as a, type PaidMediaPurchased as a$, type RevokeChatInviteLinkParams as a0, type SetMyCommandsParams as a1, type GetMyCommandsParams as a2, type BotCommand as a3, type DeleteMyCommandsParams as a4, type MenuButton as a5, type AnswerCallbackQueryParams as a6, type AnswerInlineQueryParams as a7, type AnswerWebAppQueryParams as a8, type AnswerShippingQueryParams as a9, type Gifts as aA, type SendGiftParams as aB, type SetUserEmojiStatusParams as aC, type VerifyUserParams as aD, type RemoveUserVerificationParams as aE, type VerifyChatParams as aF, type RemoveChatVerificationParams as aG, type ReadBusinessMessageParams as aH, type DeleteBusinessMessagesParams as aI, type AllowUserMessagesParams as aJ, type DisallowUserMessagesParams as aK, type GetUserChatBoostsParams as aL, type UserChatBoosts as aM, type SavePreparedInlineMessageParams as aN, type PreparedInlineMessage as aO, type BusinessMessagesDeleted as aP, type CallbackQuery as aQ, type InlineQuery as aR, type ChosenInlineResult as aS, type ShippingQuery as aT, type PreCheckoutQuery as aU, type PollAnswer as aV, type ChatMemberUpdated as aW, type ChatJoinRequest as aX, type ChatBoostUpdated as aY, type ChatBoostRemoved as aZ, type MessageReactionUpdated as a_, type AnswerPreCheckoutQueryParams as aa, type SendInvoiceParams as ab, type CreateInvoiceLinkParams as ac, type StickerSet as ad, type Sticker as ae, type CreateNewStickerSetParams as af, type AddStickerToSetParams as ag, type InputSticker as ah, type SendGameParams as ai, type SetGameScoreParams as aj, type GetGameHighScoresParams as ak, type GameHighScore as al, type CreateForumTopicParams as am, type ForumTopic as an, type EditForumTopicParams as ao, type GetStarTransactionsParams as ap, type StarTransactions as aq, type RefundStarPaymentParams as ar, type SendPaidMediaParams as as, type GetBusinessConnectionParams as at, type BusinessConnection as au, type SetChatStickerSetParams as av, type DeleteChatStickerSetParams as aw, type CreateChatSubscriptionInviteLinkParams as ax, type EditChatSubscriptionInviteLinkParams as ay, type GetAvailableGiftsParams as az, type BotShortDescription as b, type ProximityAlertTriggered as b$, type MessageReactionCountUpdated as b0, type AffiliateInfo as b1, type Animation as b2, type Audio as b3, type BackgroundFill as b4, type BackgroundType as b5, type Birthdate as b6, type BotCommandScope as b7, type BusinessIntro as b8, type BusinessLocation as b9, type GeneralForumTopicUnhidden as bA, type Gift as bB, type Giveaway as bC, type GiveawayCompleted as bD, type GiveawayCreated as bE, type GiveawayWinners as bF, type InlineKeyboardButton as bG, type InlineKeyboardMarkup as bH, type InlineQueryResult as bI, type InlineQueryResultsButton as bJ, type InputMedia as bK, type InputPaidMedia as bL, type InputPollOption as bM, type Invoice as bN, type KeyboardButton as bO, type LabeledPrice as bP, type LinkPreviewOptions as bQ, type Location as bR, type LoginUrl as bS, type MaskPosition as bT, type MessageAutoDeleteTimerChanged as bU, type MessageEntity as bV, type MessageOrigin as bW, type OrderInfo as bX, type PaidMediaInfo as bY, type PhotoSize as bZ, type PollOption as b_, type BusinessOpeningHours as ba, type BusinessOpeningHoursInterval as bb, type Chat as bc, type ChatBackground as bd, type ChatBoostAdded as be, type ChatLocation as bf, type ChatMemberAdministrator as bg, type ChatMemberBanned as bh, type ChatMemberLeft as bi, type ChatMemberMember as bj, type ChatMemberOwner as bk, type ChatMemberRestricted as bl, type ChatPermissions as bm, type ChatPhoto as bn, type ChatShared as bo, type ChatType as bp, type Contact as bq, type Dice as br, type Document as bs, type ForceReply as bt, type ForumTopicClosed as bu, type ForumTopicCreated as bv, type ForumTopicEdited as bw, type ForumTopicReopened as bx, type Game as by, type GeneralForumTopicHidden as bz, type BotName as c, type ReactionType as c0, type RefundedPayment as c1, type ReplyKeyboardMarkup as c2, type ReplyKeyboardRemove as c3, type ReplyParameters as c4, type ResponseParameters as c5, type RevenueWithdrawalState as c6, type SendCommonParams as c7, type SharedUser as c8, type ShippingAddress as c9, type ShippingOption as ca, type StarTransaction as cb, type Story as cc, type SuccessfulPayment as cd, TelegramApiError as ce, type TelegramApiResponse as cf, type TransactionPartner as cg, type UsersShared as ch, type Venue as ci, type Video as cj, type VideoChatEnded as ck, type VideoChatParticipantsInvited as cl, type VideoChatScheduled as cm, type VideoChatStarted as cn, type VideoNote as co, type Voice as cp, type WebAppData as cq, type WebAppInfo as cr, type WriteAccessAllowed as cs, type SwitchInlineQueryChosenChat as ct, type CopyTextButton as cu, type KeyboardButtonPollType as cv, type KeyboardButtonRequestUsers as cw, type KeyboardButtonRequestChat as cx, type SendMessageParams as d, type ForwardMessagesParams as e, type MessageId as f, type CopyMessagesParams as g, type SendPhotoParams as h, type SendAudioParams as i, type SendDocumentParams as j, type SendVideoParams as k, type SendAnimationParams as l, type SendVoiceParams as m, type SendVideoNoteParams as n, type SendStickerParams as o, type SendMediaGroupParams as p, type SendLocationParams as q, type SendVenueParams as r, type SendContactParams as s, type SendPollParams as t, type SendDiceParams as u, type SendChatActionParams as v, type SetMessageReactionParams as w, type EditMessageCaptionParams as x, type EditMessageMediaParams as y, type EditMessageReplyMarkupParams as z };