@effect-ak/tg-bot-client 0.2.1 → 0.2.3

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 (80) hide show
  1. package/dist/index.d.ts +2833 -0
  2. package/dist/index.js +483 -0
  3. package/dist/index.mjs +439 -0
  4. package/package.json +16 -16
  5. package/readme.md +2 -1
  6. package/dist/cjs/bot/factory/_service.js +0 -59
  7. package/dist/cjs/bot/factory/client-config.js +0 -68
  8. package/dist/cjs/bot/factory/make-bot.js +0 -59
  9. package/dist/cjs/bot/message-handler/_service.js +0 -51
  10. package/dist/cjs/bot/message-handler/types.js +0 -5
  11. package/dist/cjs/bot/message-handler/utils.js +0 -19
  12. package/dist/cjs/bot/run.js +0 -10
  13. package/dist/cjs/bot/update-poller/_service.js +0 -78
  14. package/dist/cjs/bot/update-poller/errors.js +0 -5
  15. package/dist/cjs/bot/update-poller/fetch-updates.js +0 -109
  16. package/dist/cjs/bot/update-poller/poll-and-handle.js +0 -89
  17. package/dist/cjs/bot/update-poller/settings.js +0 -23
  18. package/dist/cjs/client/_client.js +0 -64
  19. package/dist/cjs/client/config.js +0 -56
  20. package/dist/cjs/client/errors.js +0 -57
  21. package/dist/cjs/client/execute-request/_service.js +0 -59
  22. package/dist/cjs/client/execute-request/execute.js +0 -98
  23. package/dist/cjs/client/execute-request/payload.js +0 -24
  24. package/dist/cjs/client/file/_service.js +0 -61
  25. package/dist/cjs/client/file/get-file.js +0 -77
  26. package/dist/cjs/client/guards.js +0 -12
  27. package/dist/cjs/const.js +0 -20
  28. package/dist/cjs/index.js +0 -29
  29. package/dist/cjs/specification/api.js +0 -5
  30. package/dist/cjs/specification/types.js +0 -5
  31. package/dist/dts/bot/factory/_service.d.ts +0 -37
  32. package/dist/dts/bot/factory/client-config.d.ts +0 -3
  33. package/dist/dts/bot/factory/make-bot.d.ts +0 -7
  34. package/dist/dts/bot/message-handler/_service.d.ts +0 -6
  35. package/dist/dts/bot/message-handler/types.d.ts +0 -16
  36. package/dist/dts/bot/message-handler/utils.d.ts +0 -6
  37. package/dist/dts/bot/run.d.ts +0 -7
  38. package/dist/dts/bot/update-poller/_service.d.ts +0 -21
  39. package/dist/dts/bot/update-poller/errors.d.ts +0 -1
  40. package/dist/dts/bot/update-poller/fetch-updates.d.ts +0 -17
  41. package/dist/dts/bot/update-poller/poll-and-handle.d.ts +0 -16
  42. package/dist/dts/bot/update-poller/settings.d.ts +0 -6
  43. package/dist/dts/client/_client.d.ts +0 -8
  44. package/dist/dts/client/config.d.ts +0 -8
  45. package/dist/dts/client/errors.d.ts +0 -23
  46. package/dist/dts/client/execute-request/_service.d.ts +0 -15
  47. package/dist/dts/client/execute-request/execute.d.ts +0 -5
  48. package/dist/dts/client/execute-request/payload.d.ts +0 -1
  49. package/dist/dts/client/file/_service.d.ts +0 -16
  50. package/dist/dts/client/file/get-file.d.ts +0 -5
  51. package/dist/dts/client/guards.d.ts +0 -17
  52. package/dist/dts/const.d.ts +0 -12
  53. package/dist/dts/index.d.ts +0 -5
  54. package/dist/dts/specification/api.d.ts +0 -1030
  55. package/dist/dts/specification/types.d.ts +0 -1663
  56. package/dist/esm/bot/factory/_service.js +0 -49
  57. package/dist/esm/bot/factory/client-config.js +0 -57
  58. package/dist/esm/bot/factory/make-bot.js +0 -46
  59. package/dist/esm/bot/message-handler/_service.js +0 -41
  60. package/dist/esm/bot/message-handler/types.js +0 -2
  61. package/dist/esm/bot/message-handler/utils.js +0 -16
  62. package/dist/esm/bot/run.js +0 -10
  63. package/dist/esm/bot/update-poller/_service.js +0 -68
  64. package/dist/esm/bot/update-poller/errors.js +0 -2
  65. package/dist/esm/bot/update-poller/fetch-updates.js +0 -86
  66. package/dist/esm/bot/update-poller/poll-and-handle.js +0 -74
  67. package/dist/esm/bot/update-poller/settings.js +0 -19
  68. package/dist/esm/client/_client.js +0 -53
  69. package/dist/esm/client/config.js +0 -46
  70. package/dist/esm/client/errors.js +0 -46
  71. package/dist/esm/client/execute-request/_service.js +0 -49
  72. package/dist/esm/client/execute-request/execute.js +0 -74
  73. package/dist/esm/client/execute-request/payload.js +0 -25
  74. package/dist/esm/client/file/_service.js +0 -51
  75. package/dist/esm/client/file/get-file.js +0 -61
  76. package/dist/esm/client/guards.js +0 -13
  77. package/dist/esm/const.js +0 -17
  78. package/dist/esm/index.js +0 -21
  79. package/dist/esm/specification/api.js +0 -2
  80. package/dist/esm/specification/types.js +0 -2
@@ -1,1663 +0,0 @@
1
- export interface AffiliateInfo {
2
- commission_per_mille: number;
3
- amount: number;
4
- affiliate_user?: User;
5
- affiliate_chat?: Chat;
6
- nanostar_amount?: number;
7
- }
8
- export interface Animation {
9
- file_id: string;
10
- file_unique_id: string;
11
- width: number;
12
- height: number;
13
- duration: number;
14
- thumbnail?: PhotoSize;
15
- file_name?: string;
16
- mime_type?: string;
17
- file_size?: number;
18
- }
19
- export interface Audio {
20
- file_id: string;
21
- file_unique_id: string;
22
- duration: number;
23
- performer?: string;
24
- title?: string;
25
- file_name?: string;
26
- mime_type?: string;
27
- file_size?: number;
28
- thumbnail?: PhotoSize;
29
- }
30
- export type BackgroundFill = BackgroundFillSolid | BackgroundFillGradient | BackgroundFillFreeformGradient;
31
- export interface BackgroundFillFreeformGradient {
32
- type: "freeform_gradient";
33
- colors: number[];
34
- }
35
- export interface BackgroundFillGradient {
36
- type: "gradient";
37
- top_color: number;
38
- bottom_color: number;
39
- rotation_angle: number;
40
- }
41
- export interface BackgroundFillSolid {
42
- type: "solid";
43
- color: number;
44
- }
45
- export type BackgroundType = BackgroundTypeFill | BackgroundTypeWallpaper | BackgroundTypePattern | BackgroundTypeChatTheme;
46
- export interface BackgroundTypeChatTheme {
47
- type: "chat_theme";
48
- theme_name: string;
49
- }
50
- export interface BackgroundTypeFill {
51
- type: "fill";
52
- fill: BackgroundFill;
53
- dark_theme_dimming: number;
54
- }
55
- export interface BackgroundTypePattern {
56
- type: "pattern";
57
- document: Document;
58
- fill: BackgroundFill;
59
- intensity: number;
60
- is_inverted?: boolean;
61
- is_moving?: boolean;
62
- }
63
- export interface BackgroundTypeWallpaper {
64
- type: "wallpaper";
65
- document: Document;
66
- dark_theme_dimming: number;
67
- is_blurred?: boolean;
68
- is_moving?: boolean;
69
- }
70
- export interface Birthdate {
71
- day: number;
72
- month: number;
73
- year?: number;
74
- }
75
- export interface BotCommand {
76
- command: string;
77
- description: string;
78
- }
79
- export type BotCommandScope = BotCommandScopeDefault | BotCommandScopeAllPrivateChats | BotCommandScopeAllGroupChats | BotCommandScopeAllChatAdministrators | BotCommandScopeChat | BotCommandScopeChatAdministrators | BotCommandScopeChatMember;
80
- export interface BotCommandScopeAllChatAdministrators {
81
- type: "all_chat_administrators";
82
- }
83
- export interface BotCommandScopeAllGroupChats {
84
- type: "all_group_chats";
85
- }
86
- export interface BotCommandScopeAllPrivateChats {
87
- type: "all_private_chats";
88
- }
89
- export interface BotCommandScopeChat {
90
- type: "chat";
91
- chat_id: number | string;
92
- }
93
- export interface BotCommandScopeChatAdministrators {
94
- type: "chat_administrators";
95
- chat_id: number | string;
96
- }
97
- export interface BotCommandScopeChatMember {
98
- type: "chat_member";
99
- chat_id: number | string;
100
- user_id: number;
101
- }
102
- export interface BotCommandScopeDefault {
103
- type: "default";
104
- }
105
- export interface BotDescription {
106
- description: string;
107
- }
108
- export interface BotName {
109
- name: string;
110
- }
111
- export interface BotShortDescription {
112
- short_description: string;
113
- }
114
- export interface BusinessConnection {
115
- id: string;
116
- user: User;
117
- user_chat_id: number;
118
- date: number;
119
- can_reply: boolean;
120
- is_enabled: boolean;
121
- }
122
- export interface BusinessIntro {
123
- title?: string;
124
- message?: string;
125
- sticker?: Sticker;
126
- }
127
- export interface BusinessLocation {
128
- address: string;
129
- location?: Location;
130
- }
131
- export interface BusinessMessagesDeleted {
132
- business_connection_id: string;
133
- chat: Chat;
134
- message_ids: number[];
135
- }
136
- export interface BusinessOpeningHours {
137
- time_zone_name: string;
138
- opening_hours: BusinessOpeningHoursInterval[];
139
- }
140
- export interface BusinessOpeningHoursInterval {
141
- opening_minute: number;
142
- closing_minute: number;
143
- }
144
- export type CallbackGame = never;
145
- export interface CallbackQuery {
146
- id: string;
147
- from: User;
148
- chat_instance: string;
149
- message?: MaybeInaccessibleMessage;
150
- inline_message_id?: string;
151
- data?: string;
152
- game_short_name?: string;
153
- }
154
- export interface Chat {
155
- id: number;
156
- type: "private" | "group" | "supergroup" | "channel";
157
- title?: string;
158
- username?: string;
159
- first_name?: string;
160
- last_name?: string;
161
- is_forum?: boolean;
162
- }
163
- export interface ChatAdministratorRights {
164
- is_anonymous: boolean;
165
- can_manage_chat: boolean;
166
- can_delete_messages: boolean;
167
- can_manage_video_chats: boolean;
168
- can_restrict_members: boolean;
169
- can_promote_members: boolean;
170
- can_change_info: boolean;
171
- can_invite_users: boolean;
172
- can_post_stories: boolean;
173
- can_edit_stories: boolean;
174
- can_delete_stories: boolean;
175
- can_post_messages?: boolean;
176
- can_edit_messages?: boolean;
177
- can_pin_messages?: boolean;
178
- can_manage_topics?: boolean;
179
- }
180
- export interface ChatBackground {
181
- type: BackgroundType;
182
- }
183
- export interface ChatBoost {
184
- boost_id: string;
185
- add_date: number;
186
- expiration_date: number;
187
- source: ChatBoostSource;
188
- }
189
- export interface ChatBoostAdded {
190
- boost_count: number;
191
- }
192
- export interface ChatBoostRemoved {
193
- chat: Chat;
194
- boost_id: string;
195
- remove_date: number;
196
- source: ChatBoostSource;
197
- }
198
- export type ChatBoostSource = ChatBoostSourcePremium | ChatBoostSourceGiftCode | ChatBoostSourceGiveaway;
199
- export interface ChatBoostSourceGiftCode {
200
- source: "gift_code";
201
- user: User;
202
- }
203
- export interface ChatBoostSourceGiveaway {
204
- source: "giveaway";
205
- giveaway_message_id: number;
206
- user?: User;
207
- prize_star_count?: number;
208
- is_unclaimed?: boolean;
209
- }
210
- export interface ChatBoostSourcePremium {
211
- source: "premium";
212
- user: User;
213
- }
214
- export interface ChatBoostUpdated {
215
- chat: Chat;
216
- boost: ChatBoost;
217
- }
218
- export interface ChatFullInfo {
219
- id: number;
220
- type: "private" | "group" | "supergroup" | "channel";
221
- accent_color_id: number;
222
- max_reaction_count: number;
223
- title?: string;
224
- username?: string;
225
- first_name?: string;
226
- last_name?: string;
227
- is_forum?: boolean;
228
- photo?: ChatPhoto;
229
- active_usernames?: string[];
230
- birthdate?: Birthdate;
231
- business_intro?: BusinessIntro;
232
- business_location?: BusinessLocation;
233
- business_opening_hours?: BusinessOpeningHours;
234
- personal_chat?: Chat;
235
- available_reactions?: ReactionType[];
236
- background_custom_emoji_id?: string;
237
- profile_accent_color_id?: number;
238
- profile_background_custom_emoji_id?: string;
239
- emoji_status_custom_emoji_id?: string;
240
- emoji_status_expiration_date?: number;
241
- bio?: string;
242
- has_private_forwards?: boolean;
243
- has_restricted_voice_and_video_messages?: boolean;
244
- join_to_send_messages?: boolean;
245
- join_by_request?: boolean;
246
- description?: string;
247
- invite_link?: string;
248
- pinned_message?: Message;
249
- permissions?: ChatPermissions;
250
- can_send_paid_media?: boolean;
251
- slow_mode_delay?: number;
252
- unrestrict_boost_count?: number;
253
- message_auto_delete_time?: number;
254
- has_aggressive_anti_spam_enabled?: boolean;
255
- has_hidden_members?: boolean;
256
- has_protected_content?: boolean;
257
- has_visible_history?: boolean;
258
- sticker_set_name?: string;
259
- can_set_sticker_set?: boolean;
260
- custom_emoji_sticker_set_name?: string;
261
- linked_chat_id?: number;
262
- location?: ChatLocation;
263
- }
264
- export interface ChatInviteLink {
265
- invite_link: string;
266
- creator: User;
267
- creates_join_request: boolean;
268
- is_primary: boolean;
269
- is_revoked: boolean;
270
- name?: string;
271
- expire_date?: number;
272
- member_limit?: number;
273
- pending_join_request_count?: number;
274
- subscription_period?: number;
275
- subscription_price?: number;
276
- }
277
- export interface ChatJoinRequest {
278
- chat: Chat;
279
- from: User;
280
- user_chat_id: number;
281
- date: number;
282
- bio?: string;
283
- invite_link?: ChatInviteLink;
284
- }
285
- export interface ChatLocation {
286
- location: Location;
287
- address: string;
288
- }
289
- export type ChatMember = ChatMemberOwner | ChatMemberAdministrator | ChatMemberMember | ChatMemberRestricted | ChatMemberLeft | ChatMemberBanned;
290
- export interface ChatMemberAdministrator {
291
- status: "administrator";
292
- user: User;
293
- can_be_edited: boolean;
294
- is_anonymous: boolean;
295
- can_manage_chat: boolean;
296
- can_delete_messages: boolean;
297
- can_manage_video_chats: boolean;
298
- can_restrict_members: boolean;
299
- can_promote_members: boolean;
300
- can_change_info: boolean;
301
- can_invite_users: boolean;
302
- can_post_stories: boolean;
303
- can_edit_stories: boolean;
304
- can_delete_stories: boolean;
305
- can_post_messages?: boolean;
306
- can_edit_messages?: boolean;
307
- can_pin_messages?: boolean;
308
- can_manage_topics?: boolean;
309
- custom_title?: string;
310
- }
311
- export interface ChatMemberBanned {
312
- status: "kicked";
313
- user: User;
314
- until_date: number;
315
- }
316
- export interface ChatMemberLeft {
317
- status: "left";
318
- user: User;
319
- }
320
- export interface ChatMemberMember {
321
- status: "member";
322
- user: User;
323
- until_date?: number;
324
- }
325
- export interface ChatMemberOwner {
326
- status: "creator";
327
- user: User;
328
- is_anonymous: boolean;
329
- custom_title?: string;
330
- }
331
- export interface ChatMemberRestricted {
332
- status: "restricted";
333
- user: User;
334
- is_member: boolean;
335
- can_send_messages: boolean;
336
- can_send_audios: boolean;
337
- can_send_documents: boolean;
338
- can_send_photos: boolean;
339
- can_send_videos: boolean;
340
- can_send_video_notes: boolean;
341
- can_send_voice_notes: boolean;
342
- can_send_polls: boolean;
343
- can_send_other_messages: boolean;
344
- can_add_web_page_previews: boolean;
345
- can_change_info: boolean;
346
- can_invite_users: boolean;
347
- can_pin_messages: boolean;
348
- can_manage_topics: boolean;
349
- until_date: number;
350
- }
351
- export interface ChatMemberUpdated {
352
- chat: Chat;
353
- from: User;
354
- date: number;
355
- old_chat_member: ChatMember;
356
- new_chat_member: ChatMember;
357
- invite_link?: ChatInviteLink;
358
- via_join_request?: boolean;
359
- via_chat_folder_invite_link?: boolean;
360
- }
361
- export interface ChatPermissions {
362
- can_send_messages?: boolean;
363
- can_send_audios?: boolean;
364
- can_send_documents?: boolean;
365
- can_send_photos?: boolean;
366
- can_send_videos?: boolean;
367
- can_send_video_notes?: boolean;
368
- can_send_voice_notes?: boolean;
369
- can_send_polls?: boolean;
370
- can_send_other_messages?: boolean;
371
- can_add_web_page_previews?: boolean;
372
- can_change_info?: boolean;
373
- can_invite_users?: boolean;
374
- can_pin_messages?: boolean;
375
- can_manage_topics?: boolean;
376
- }
377
- export interface ChatPhoto {
378
- small_file_id: string;
379
- small_file_unique_id: string;
380
- big_file_id: string;
381
- big_file_unique_id: string;
382
- }
383
- export interface ChatShared {
384
- request_id: number;
385
- chat_id: number;
386
- title?: string;
387
- username?: string;
388
- photo?: PhotoSize[];
389
- }
390
- export interface ChosenInlineResult {
391
- result_id: string;
392
- from: User;
393
- query: string;
394
- location?: Location;
395
- inline_message_id?: string;
396
- }
397
- export interface Contact {
398
- phone_number: string;
399
- first_name: string;
400
- last_name?: string;
401
- user_id?: number;
402
- vcard?: string;
403
- }
404
- export interface CopyTextButton {
405
- text: string;
406
- }
407
- export interface Dice {
408
- emoji: string;
409
- value: number;
410
- }
411
- export interface Document {
412
- file_id: string;
413
- file_unique_id: string;
414
- thumbnail?: PhotoSize;
415
- file_name?: string;
416
- mime_type?: string;
417
- file_size?: number;
418
- }
419
- export interface EncryptedCredentials {
420
- data: string;
421
- hash: string;
422
- secret: string;
423
- }
424
- export interface EncryptedPassportElement {
425
- type: string;
426
- hash: string;
427
- data?: string;
428
- phone_number?: string;
429
- email?: string;
430
- files?: PassportFile[];
431
- front_side?: PassportFile;
432
- reverse_side?: PassportFile;
433
- selfie?: PassportFile;
434
- translation?: PassportFile[];
435
- }
436
- export interface ExternalReplyInfo {
437
- origin: MessageOrigin;
438
- chat?: Chat;
439
- message_id?: number;
440
- link_preview_options?: LinkPreviewOptions;
441
- animation?: Animation;
442
- audio?: Audio;
443
- document?: Document;
444
- paid_media?: PaidMediaInfo;
445
- photo?: PhotoSize[];
446
- sticker?: Sticker;
447
- story?: Story;
448
- video?: Video;
449
- video_note?: VideoNote;
450
- voice?: Voice;
451
- has_media_spoiler?: boolean;
452
- contact?: Contact;
453
- dice?: Dice;
454
- game?: Game;
455
- giveaway?: Giveaway;
456
- giveaway_winners?: GiveawayWinners;
457
- invoice?: Invoice;
458
- location?: Location;
459
- poll?: Poll;
460
- venue?: Venue;
461
- }
462
- export interface File {
463
- file_id: string;
464
- file_unique_id: string;
465
- file_size?: number;
466
- file_path?: string;
467
- }
468
- export interface ForceReply {
469
- force_reply: boolean;
470
- input_field_placeholder?: string;
471
- selective?: boolean;
472
- }
473
- export interface ForumTopic {
474
- message_thread_id: number;
475
- name: string;
476
- icon_color: number;
477
- icon_custom_emoji_id?: string;
478
- }
479
- export type ForumTopicClosed = never;
480
- export interface ForumTopicCreated {
481
- name: string;
482
- icon_color: number;
483
- icon_custom_emoji_id?: string;
484
- }
485
- export interface ForumTopicEdited {
486
- name?: string;
487
- icon_custom_emoji_id?: string;
488
- }
489
- export type ForumTopicReopened = never;
490
- export interface Game {
491
- title: string;
492
- description: string;
493
- photo: PhotoSize[];
494
- text?: string;
495
- text_entities?: MessageEntity[];
496
- animation?: Animation;
497
- }
498
- export interface GameHighScore {
499
- position: number;
500
- user: User;
501
- score: number;
502
- }
503
- export type GeneralForumTopicHidden = never;
504
- export type GeneralForumTopicUnhidden = never;
505
- export interface Gift {
506
- id: string;
507
- sticker: Sticker;
508
- star_count: number;
509
- total_count?: number;
510
- remaining_count?: number;
511
- }
512
- export interface Gifts {
513
- gifts: Gift[];
514
- }
515
- export interface Giveaway {
516
- chats: Chat[];
517
- winners_selection_date: number;
518
- winner_count: number;
519
- only_new_members?: boolean;
520
- has_public_winners?: boolean;
521
- prize_description?: string;
522
- country_codes?: string[];
523
- prize_star_count?: number;
524
- premium_subscription_month_count?: number;
525
- }
526
- export interface GiveawayCompleted {
527
- winner_count: number;
528
- unclaimed_prize_count?: number;
529
- giveaway_message?: Message;
530
- is_star_giveaway?: boolean;
531
- }
532
- export interface GiveawayCreated {
533
- prize_star_count?: number;
534
- }
535
- export interface GiveawayWinners {
536
- chat: Chat;
537
- giveaway_message_id: number;
538
- winners_selection_date: number;
539
- winner_count: number;
540
- winners: User[];
541
- additional_chat_count?: number;
542
- prize_star_count?: number;
543
- premium_subscription_month_count?: number;
544
- unclaimed_prize_count?: number;
545
- only_new_members?: boolean;
546
- was_refunded?: boolean;
547
- prize_description?: string;
548
- }
549
- export interface InaccessibleMessage {
550
- chat: Chat;
551
- message_id: number;
552
- date: number;
553
- }
554
- export interface InlineKeyboardButton {
555
- text: string;
556
- url?: string;
557
- callback_data?: string;
558
- web_app?: WebAppInfo;
559
- login_url?: LoginUrl;
560
- switch_inline_query?: string;
561
- switch_inline_query_current_chat?: string;
562
- switch_inline_query_chosen_chat?: SwitchInlineQueryChosenChat;
563
- copy_text?: CopyTextButton;
564
- callback_game?: CallbackGame;
565
- pay?: boolean;
566
- }
567
- export interface InlineKeyboardMarkup {
568
- inline_keyboard: InlineKeyboardButton[][];
569
- }
570
- export interface InlineQuery {
571
- id: string;
572
- from: User;
573
- query: string;
574
- offset: string;
575
- chat_type?: string;
576
- location?: Location;
577
- }
578
- export type InlineQueryResult = InlineQueryResultCachedAudio | InlineQueryResultCachedDocument | InlineQueryResultCachedGif | InlineQueryResultCachedMpeg4Gif | InlineQueryResultCachedPhoto | InlineQueryResultCachedSticker | InlineQueryResultCachedVideo | InlineQueryResultCachedVoice | InlineQueryResultArticle | InlineQueryResultAudio | InlineQueryResultContact | InlineQueryResultGame | InlineQueryResultDocument | InlineQueryResultGif | InlineQueryResultLocation | InlineQueryResultMpeg4Gif | InlineQueryResultPhoto | InlineQueryResultVenue | InlineQueryResultVideo | InlineQueryResultVoice;
579
- export interface InlineQueryResultArticle {
580
- type: "article";
581
- id: string;
582
- title: string;
583
- input_message_content: InputMessageContent;
584
- reply_markup?: InlineKeyboardMarkup;
585
- url?: string;
586
- hide_url?: boolean;
587
- description?: string;
588
- thumbnail_url?: string;
589
- thumbnail_width?: number;
590
- thumbnail_height?: number;
591
- }
592
- export interface InlineQueryResultAudio {
593
- type: "audio";
594
- id: string;
595
- audio_url: string;
596
- title: string;
597
- caption?: string;
598
- parse_mode?: "HTML" | "MarkdownV2";
599
- caption_entities?: MessageEntity[];
600
- performer?: string;
601
- audio_duration?: number;
602
- reply_markup?: InlineKeyboardMarkup;
603
- input_message_content?: InputMessageContent;
604
- }
605
- export interface InlineQueryResultCachedAudio {
606
- type: "audio";
607
- id: string;
608
- audio_file_id: string;
609
- caption?: string;
610
- parse_mode?: "HTML" | "MarkdownV2";
611
- caption_entities?: MessageEntity[];
612
- reply_markup?: InlineKeyboardMarkup;
613
- input_message_content?: InputMessageContent;
614
- }
615
- export interface InlineQueryResultCachedDocument {
616
- type: "document";
617
- id: string;
618
- title: string;
619
- document_file_id: string;
620
- description?: string;
621
- caption?: string;
622
- parse_mode?: "HTML" | "MarkdownV2";
623
- caption_entities?: MessageEntity[];
624
- reply_markup?: InlineKeyboardMarkup;
625
- input_message_content?: InputMessageContent;
626
- }
627
- export interface InlineQueryResultCachedGif {
628
- type: "gif";
629
- id: string;
630
- gif_file_id: string;
631
- title?: string;
632
- caption?: string;
633
- parse_mode?: "HTML" | "MarkdownV2";
634
- caption_entities?: MessageEntity[];
635
- show_caption_above_media?: boolean;
636
- reply_markup?: InlineKeyboardMarkup;
637
- input_message_content?: InputMessageContent;
638
- }
639
- export interface InlineQueryResultCachedMpeg4Gif {
640
- type: "mpeg4_gif";
641
- id: string;
642
- mpeg4_file_id: string;
643
- title?: string;
644
- caption?: string;
645
- parse_mode?: "HTML" | "MarkdownV2";
646
- caption_entities?: MessageEntity[];
647
- show_caption_above_media?: boolean;
648
- reply_markup?: InlineKeyboardMarkup;
649
- input_message_content?: InputMessageContent;
650
- }
651
- export interface InlineQueryResultCachedPhoto {
652
- type: "photo";
653
- id: string;
654
- photo_file_id: string;
655
- title?: string;
656
- description?: string;
657
- caption?: string;
658
- parse_mode?: "HTML" | "MarkdownV2";
659
- caption_entities?: MessageEntity[];
660
- show_caption_above_media?: boolean;
661
- reply_markup?: InlineKeyboardMarkup;
662
- input_message_content?: InputMessageContent;
663
- }
664
- export interface InlineQueryResultCachedSticker {
665
- type: "sticker";
666
- id: string;
667
- sticker_file_id: string;
668
- reply_markup?: InlineKeyboardMarkup;
669
- input_message_content?: InputMessageContent;
670
- }
671
- export interface InlineQueryResultCachedVideo {
672
- type: "video";
673
- id: string;
674
- video_file_id: string;
675
- title: string;
676
- description?: string;
677
- caption?: string;
678
- parse_mode?: "HTML" | "MarkdownV2";
679
- caption_entities?: MessageEntity[];
680
- show_caption_above_media?: boolean;
681
- reply_markup?: InlineKeyboardMarkup;
682
- input_message_content?: InputMessageContent;
683
- }
684
- export interface InlineQueryResultCachedVoice {
685
- type: "voice";
686
- id: string;
687
- voice_file_id: string;
688
- title: string;
689
- caption?: string;
690
- parse_mode?: "HTML" | "MarkdownV2";
691
- caption_entities?: MessageEntity[];
692
- reply_markup?: InlineKeyboardMarkup;
693
- input_message_content?: InputMessageContent;
694
- }
695
- export interface InlineQueryResultContact {
696
- type: "contact";
697
- id: string;
698
- phone_number: string;
699
- first_name: string;
700
- last_name?: string;
701
- vcard?: string;
702
- reply_markup?: InlineKeyboardMarkup;
703
- input_message_content?: InputMessageContent;
704
- thumbnail_url?: string;
705
- thumbnail_width?: number;
706
- thumbnail_height?: number;
707
- }
708
- export interface InlineQueryResultDocument {
709
- type: "document";
710
- id: string;
711
- title: string;
712
- document_url: string;
713
- mime_type: string;
714
- caption?: string;
715
- parse_mode?: "HTML" | "MarkdownV2";
716
- caption_entities?: MessageEntity[];
717
- description?: string;
718
- reply_markup?: InlineKeyboardMarkup;
719
- input_message_content?: InputMessageContent;
720
- thumbnail_url?: string;
721
- thumbnail_width?: number;
722
- thumbnail_height?: number;
723
- }
724
- export interface InlineQueryResultGame {
725
- type: "game";
726
- id: string;
727
- game_short_name: string;
728
- reply_markup?: InlineKeyboardMarkup;
729
- }
730
- export interface InlineQueryResultGif {
731
- type: "gif";
732
- id: string;
733
- gif_url: string;
734
- thumbnail_url: string;
735
- gif_width?: number;
736
- gif_height?: number;
737
- gif_duration?: number;
738
- thumbnail_mime_type?: "image/jpeg" | "image/gif" | "video/mp4";
739
- title?: string;
740
- caption?: string;
741
- parse_mode?: "HTML" | "MarkdownV2";
742
- caption_entities?: MessageEntity[];
743
- show_caption_above_media?: boolean;
744
- reply_markup?: InlineKeyboardMarkup;
745
- input_message_content?: InputMessageContent;
746
- }
747
- export interface InlineQueryResultLocation {
748
- type: "location";
749
- id: string;
750
- latitude: number;
751
- longitude: number;
752
- title: string;
753
- horizontal_accuracy?: number;
754
- live_period?: number;
755
- heading?: number;
756
- proximity_alert_radius?: number;
757
- reply_markup?: InlineKeyboardMarkup;
758
- input_message_content?: InputMessageContent;
759
- thumbnail_url?: string;
760
- thumbnail_width?: number;
761
- thumbnail_height?: number;
762
- }
763
- export interface InlineQueryResultMpeg4Gif {
764
- type: "mpeg4_gif";
765
- id: string;
766
- mpeg4_url: string;
767
- thumbnail_url: string;
768
- mpeg4_width?: number;
769
- mpeg4_height?: number;
770
- mpeg4_duration?: number;
771
- thumbnail_mime_type?: "image/jpeg" | "image/gif" | "video/mp4";
772
- title?: string;
773
- caption?: string;
774
- parse_mode?: "HTML" | "MarkdownV2";
775
- caption_entities?: MessageEntity[];
776
- show_caption_above_media?: boolean;
777
- reply_markup?: InlineKeyboardMarkup;
778
- input_message_content?: InputMessageContent;
779
- }
780
- export interface InlineQueryResultPhoto {
781
- type: "photo";
782
- id: string;
783
- photo_url: string;
784
- thumbnail_url: string;
785
- photo_width?: number;
786
- photo_height?: number;
787
- title?: string;
788
- description?: string;
789
- caption?: string;
790
- parse_mode?: "HTML" | "MarkdownV2";
791
- caption_entities?: MessageEntity[];
792
- show_caption_above_media?: boolean;
793
- reply_markup?: InlineKeyboardMarkup;
794
- input_message_content?: InputMessageContent;
795
- }
796
- export interface InlineQueryResultsButton {
797
- text: string;
798
- web_app?: WebAppInfo;
799
- start_parameter?: string;
800
- }
801
- export interface InlineQueryResultVenue {
802
- type: "venue";
803
- id: string;
804
- latitude: number;
805
- longitude: number;
806
- title: string;
807
- address: string;
808
- foursquare_id?: string;
809
- foursquare_type?: string;
810
- google_place_id?: string;
811
- google_place_type?: string;
812
- reply_markup?: InlineKeyboardMarkup;
813
- input_message_content?: InputMessageContent;
814
- thumbnail_url?: string;
815
- thumbnail_width?: number;
816
- thumbnail_height?: number;
817
- }
818
- export interface InlineQueryResultVideo {
819
- type: "video";
820
- id: string;
821
- video_url: string;
822
- mime_type: string;
823
- thumbnail_url: string;
824
- title: string;
825
- caption?: string;
826
- parse_mode?: "HTML" | "MarkdownV2";
827
- caption_entities?: MessageEntity[];
828
- show_caption_above_media?: boolean;
829
- video_width?: number;
830
- video_height?: number;
831
- video_duration?: number;
832
- description?: string;
833
- reply_markup?: InlineKeyboardMarkup;
834
- input_message_content?: InputMessageContent;
835
- }
836
- export interface InlineQueryResultVoice {
837
- type: "voice";
838
- id: string;
839
- voice_url: string;
840
- title: string;
841
- caption?: string;
842
- parse_mode?: "HTML" | "MarkdownV2";
843
- caption_entities?: MessageEntity[];
844
- voice_duration?: number;
845
- reply_markup?: InlineKeyboardMarkup;
846
- input_message_content?: InputMessageContent;
847
- }
848
- export interface InputContactMessageContent {
849
- phone_number: string;
850
- first_name: string;
851
- last_name?: string;
852
- vcard?: string;
853
- }
854
- export type InputFile = {
855
- file_content: Uint8Array;
856
- file_name: string;
857
- };
858
- export interface InputInvoiceMessageContent {
859
- title: string;
860
- description: string;
861
- payload: string;
862
- currency: string;
863
- prices: LabeledPrice[];
864
- provider_token?: string;
865
- max_tip_amount?: number;
866
- suggested_tip_amounts?: number[];
867
- provider_data?: string;
868
- photo_url?: string;
869
- photo_size?: number;
870
- photo_width?: number;
871
- photo_height?: number;
872
- need_name?: boolean;
873
- need_phone_number?: boolean;
874
- need_email?: boolean;
875
- need_shipping_address?: boolean;
876
- send_phone_number_to_provider?: boolean;
877
- send_email_to_provider?: boolean;
878
- is_flexible?: boolean;
879
- }
880
- export interface InputLocationMessageContent {
881
- latitude: number;
882
- longitude: number;
883
- horizontal_accuracy?: number;
884
- live_period?: number;
885
- heading?: number;
886
- proximity_alert_radius?: number;
887
- }
888
- export type InputMedia = InputMediaAnimation | InputMediaDocument | InputMediaAudio | InputMediaPhoto | InputMediaVideo;
889
- export interface InputMediaAnimation {
890
- type: "animation";
891
- media: string;
892
- thumbnail?: InputFile | string;
893
- caption?: string;
894
- parse_mode?: "HTML" | "MarkdownV2";
895
- caption_entities?: MessageEntity[];
896
- show_caption_above_media?: boolean;
897
- width?: number;
898
- height?: number;
899
- duration?: number;
900
- has_spoiler?: boolean;
901
- }
902
- export interface InputMediaAudio {
903
- type: "audio";
904
- media: string;
905
- thumbnail?: InputFile | string;
906
- caption?: string;
907
- parse_mode?: "HTML" | "MarkdownV2";
908
- caption_entities?: MessageEntity[];
909
- duration?: number;
910
- performer?: string;
911
- title?: string;
912
- }
913
- export interface InputMediaDocument {
914
- type: "document";
915
- media: string;
916
- thumbnail?: InputFile | string;
917
- caption?: string;
918
- parse_mode?: "HTML" | "MarkdownV2";
919
- caption_entities?: MessageEntity[];
920
- disable_content_type_detection?: boolean;
921
- }
922
- export interface InputMediaPhoto {
923
- type: "photo";
924
- media: string;
925
- caption?: string;
926
- parse_mode?: "HTML" | "MarkdownV2";
927
- caption_entities?: MessageEntity[];
928
- show_caption_above_media?: boolean;
929
- has_spoiler?: boolean;
930
- }
931
- export interface InputMediaVideo {
932
- type: "video";
933
- media: string;
934
- thumbnail?: InputFile | string;
935
- caption?: string;
936
- parse_mode?: "HTML" | "MarkdownV2";
937
- caption_entities?: MessageEntity[];
938
- show_caption_above_media?: boolean;
939
- width?: number;
940
- height?: number;
941
- duration?: number;
942
- supports_streaming?: boolean;
943
- has_spoiler?: boolean;
944
- }
945
- export type InputMessageContent = InputTextMessageContent | InputLocationMessageContent | InputVenueMessageContent | InputContactMessageContent | InputInvoiceMessageContent;
946
- export type InputPaidMedia = InputPaidMediaPhoto | InputPaidMediaVideo;
947
- export interface InputPaidMediaPhoto {
948
- type: "photo";
949
- media: string;
950
- }
951
- export interface InputPaidMediaVideo {
952
- type: "video";
953
- media: string;
954
- thumbnail?: InputFile | string;
955
- width?: number;
956
- height?: number;
957
- duration?: number;
958
- supports_streaming?: boolean;
959
- }
960
- export interface InputPollOption {
961
- text: string;
962
- text_parse_mode?: "HTML" | "MarkdownV2";
963
- text_entities?: MessageEntity[];
964
- }
965
- export interface InputSticker {
966
- sticker: InputFile | string;
967
- format: "static" | "animated" | "video";
968
- emoji_list: string[];
969
- mask_position?: MaskPosition;
970
- keywords?: string[];
971
- }
972
- export interface InputTextMessageContent {
973
- message_text: string;
974
- parse_mode?: "HTML" | "MarkdownV2";
975
- entities?: MessageEntity[];
976
- link_preview_options?: LinkPreviewOptions;
977
- }
978
- export interface InputVenueMessageContent {
979
- latitude: number;
980
- longitude: number;
981
- title: string;
982
- address: string;
983
- foursquare_id?: string;
984
- foursquare_type?: string;
985
- google_place_id?: string;
986
- google_place_type?: string;
987
- }
988
- export interface Invoice {
989
- title: string;
990
- description: string;
991
- start_parameter: string;
992
- currency: string;
993
- total_amount: number;
994
- }
995
- export interface KeyboardButton {
996
- text: string;
997
- request_users?: KeyboardButtonRequestUsers;
998
- request_chat?: KeyboardButtonRequestChat;
999
- request_contact?: boolean;
1000
- request_location?: boolean;
1001
- request_poll?: KeyboardButtonPollType;
1002
- web_app?: WebAppInfo;
1003
- }
1004
- export interface KeyboardButtonPollType {
1005
- type?: string;
1006
- }
1007
- export interface KeyboardButtonRequestChat {
1008
- request_id: number;
1009
- chat_is_channel: boolean;
1010
- chat_is_forum?: boolean;
1011
- chat_has_username?: boolean;
1012
- chat_is_created?: boolean;
1013
- user_administrator_rights?: ChatAdministratorRights;
1014
- bot_administrator_rights?: ChatAdministratorRights;
1015
- bot_is_member?: boolean;
1016
- request_title?: boolean;
1017
- request_username?: boolean;
1018
- request_photo?: boolean;
1019
- }
1020
- export interface KeyboardButtonRequestUsers {
1021
- request_id: number;
1022
- user_is_bot?: boolean;
1023
- user_is_premium?: boolean;
1024
- max_quantity?: number;
1025
- request_name?: boolean;
1026
- request_username?: boolean;
1027
- request_photo?: boolean;
1028
- }
1029
- export interface LabeledPrice {
1030
- label: string;
1031
- amount: number;
1032
- }
1033
- export interface LinkPreviewOptions {
1034
- is_disabled?: boolean;
1035
- url?: string;
1036
- prefer_small_media?: boolean;
1037
- prefer_large_media?: boolean;
1038
- show_above_text?: boolean;
1039
- }
1040
- export interface Location {
1041
- latitude: number;
1042
- longitude: number;
1043
- horizontal_accuracy?: number;
1044
- live_period?: number;
1045
- heading?: number;
1046
- proximity_alert_radius?: number;
1047
- }
1048
- export interface LoginUrl {
1049
- url: string;
1050
- forward_text?: string;
1051
- bot_username?: string;
1052
- request_write_access?: boolean;
1053
- }
1054
- export interface MaskPosition {
1055
- point: string;
1056
- x_shift: number;
1057
- y_shift: number;
1058
- scale: number;
1059
- }
1060
- export type MaybeInaccessibleMessage = Message | InaccessibleMessage;
1061
- export type MenuButton = MenuButtonCommands | MenuButtonWebApp | MenuButtonDefault;
1062
- export interface MenuButtonCommands {
1063
- type: "commands";
1064
- }
1065
- export interface MenuButtonDefault {
1066
- type: "default";
1067
- }
1068
- export interface MenuButtonWebApp {
1069
- type: "web_app";
1070
- text: string;
1071
- web_app: WebAppInfo;
1072
- }
1073
- export interface Message {
1074
- message_id: number;
1075
- date: number;
1076
- chat: Chat;
1077
- message_thread_id?: number;
1078
- from?: User;
1079
- sender_chat?: Chat;
1080
- sender_boost_count?: number;
1081
- sender_business_bot?: User;
1082
- business_connection_id?: string;
1083
- forward_origin?: MessageOrigin;
1084
- is_topic_message?: boolean;
1085
- is_automatic_forward?: boolean;
1086
- reply_to_message?: Message;
1087
- external_reply?: ExternalReplyInfo;
1088
- quote?: TextQuote;
1089
- reply_to_story?: Story;
1090
- via_bot?: User;
1091
- edit_date?: number;
1092
- has_protected_content?: boolean;
1093
- is_from_offline?: boolean;
1094
- media_group_id?: string;
1095
- author_signature?: string;
1096
- text?: string;
1097
- entities?: MessageEntity[];
1098
- link_preview_options?: LinkPreviewOptions;
1099
- effect_id?: string;
1100
- animation?: Animation;
1101
- audio?: Audio;
1102
- document?: Document;
1103
- paid_media?: PaidMediaInfo;
1104
- photo?: PhotoSize[];
1105
- sticker?: Sticker;
1106
- story?: Story;
1107
- video?: Video;
1108
- video_note?: VideoNote;
1109
- voice?: Voice;
1110
- caption?: string;
1111
- caption_entities?: MessageEntity[];
1112
- show_caption_above_media?: boolean;
1113
- has_media_spoiler?: boolean;
1114
- contact?: Contact;
1115
- dice?: Dice;
1116
- game?: Game;
1117
- poll?: Poll;
1118
- venue?: Venue;
1119
- location?: Location;
1120
- new_chat_members?: User[];
1121
- left_chat_member?: User;
1122
- new_chat_title?: string;
1123
- new_chat_photo?: PhotoSize[];
1124
- delete_chat_photo?: boolean;
1125
- group_chat_created?: boolean;
1126
- supergroup_chat_created?: boolean;
1127
- channel_chat_created?: boolean;
1128
- message_auto_delete_timer_changed?: MessageAutoDeleteTimerChanged;
1129
- migrate_to_chat_id?: number;
1130
- migrate_from_chat_id?: number;
1131
- pinned_message?: MaybeInaccessibleMessage;
1132
- invoice?: Invoice;
1133
- successful_payment?: SuccessfulPayment;
1134
- refunded_payment?: RefundedPayment;
1135
- users_shared?: UsersShared;
1136
- chat_shared?: ChatShared;
1137
- connected_website?: string;
1138
- write_access_allowed?: WriteAccessAllowed;
1139
- passport_data?: PassportData;
1140
- proximity_alert_triggered?: ProximityAlertTriggered;
1141
- boost_added?: ChatBoostAdded;
1142
- chat_background_set?: ChatBackground;
1143
- forum_topic_created?: ForumTopicCreated;
1144
- forum_topic_edited?: ForumTopicEdited;
1145
- forum_topic_closed?: ForumTopicClosed;
1146
- forum_topic_reopened?: ForumTopicReopened;
1147
- general_forum_topic_hidden?: GeneralForumTopicHidden;
1148
- general_forum_topic_unhidden?: GeneralForumTopicUnhidden;
1149
- giveaway_created?: GiveawayCreated;
1150
- giveaway?: Giveaway;
1151
- giveaway_winners?: GiveawayWinners;
1152
- giveaway_completed?: GiveawayCompleted;
1153
- video_chat_scheduled?: VideoChatScheduled;
1154
- video_chat_started?: VideoChatStarted;
1155
- video_chat_ended?: VideoChatEnded;
1156
- video_chat_participants_invited?: VideoChatParticipantsInvited;
1157
- web_app_data?: WebAppData;
1158
- reply_markup?: InlineKeyboardMarkup;
1159
- }
1160
- export interface MessageAutoDeleteTimerChanged {
1161
- message_auto_delete_time: number;
1162
- }
1163
- export interface MessageEntity {
1164
- 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";
1165
- offset: number;
1166
- length: number;
1167
- url?: string;
1168
- user?: User;
1169
- language?: string;
1170
- custom_emoji_id?: string;
1171
- }
1172
- export interface MessageId {
1173
- message_id: number;
1174
- }
1175
- export type MessageOrigin = MessageOriginUser | MessageOriginHiddenUser | MessageOriginChat | MessageOriginChannel;
1176
- export interface MessageOriginChannel {
1177
- type: "channel";
1178
- date: number;
1179
- chat: Chat;
1180
- message_id: number;
1181
- author_signature?: string;
1182
- }
1183
- export interface MessageOriginChat {
1184
- type: "chat";
1185
- date: number;
1186
- sender_chat: Chat;
1187
- author_signature?: string;
1188
- }
1189
- export interface MessageOriginHiddenUser {
1190
- type: "hidden_user";
1191
- date: number;
1192
- sender_user_name: string;
1193
- }
1194
- export interface MessageOriginUser {
1195
- type: "user";
1196
- date: number;
1197
- sender_user: User;
1198
- }
1199
- export interface MessageReactionCountUpdated {
1200
- chat: Chat;
1201
- message_id: number;
1202
- date: number;
1203
- reactions: ReactionCount[];
1204
- }
1205
- export interface MessageReactionUpdated {
1206
- chat: Chat;
1207
- message_id: number;
1208
- date: number;
1209
- old_reaction: ReactionType[];
1210
- new_reaction: ReactionType[];
1211
- user?: User;
1212
- actor_chat?: Chat;
1213
- }
1214
- export interface OrderInfo {
1215
- name?: string;
1216
- phone_number?: string;
1217
- email?: string;
1218
- shipping_address?: ShippingAddress;
1219
- }
1220
- export type PaidMedia = PaidMediaPreview | PaidMediaPhoto | PaidMediaVideo;
1221
- export interface PaidMediaInfo {
1222
- star_count: number;
1223
- paid_media: PaidMedia[];
1224
- }
1225
- export interface PaidMediaPhoto {
1226
- type: "photo";
1227
- photo: PhotoSize[];
1228
- }
1229
- export interface PaidMediaPreview {
1230
- type: "preview";
1231
- width?: number;
1232
- height?: number;
1233
- duration?: number;
1234
- }
1235
- export interface PaidMediaPurchased {
1236
- from: User;
1237
- paid_media_payload: string;
1238
- }
1239
- export interface PaidMediaVideo {
1240
- type: "video";
1241
- video: Video;
1242
- }
1243
- export interface PassportData {
1244
- data: EncryptedPassportElement[];
1245
- credentials: EncryptedCredentials;
1246
- }
1247
- export type PassportElementError = PassportElementErrorDataField | PassportElementErrorFrontSide | PassportElementErrorReverseSide | PassportElementErrorSelfie | PassportElementErrorFile | PassportElementErrorFiles | PassportElementErrorTranslationFile | PassportElementErrorTranslationFiles | PassportElementErrorUnspecified;
1248
- export interface PassportElementErrorDataField {
1249
- source: "data";
1250
- type: "personal_details" | "passport" | "driver_license" | "identity_card" | "internal_passport" | "address";
1251
- field_name: string;
1252
- data_hash: string;
1253
- message: string;
1254
- }
1255
- export interface PassportElementErrorFile {
1256
- source: "file";
1257
- type: "utility_bill" | "bank_statement" | "rental_agreement" | "passport_registration" | "temporary_registration";
1258
- file_hash: string;
1259
- message: string;
1260
- }
1261
- export interface PassportElementErrorFiles {
1262
- source: "files";
1263
- type: "utility_bill" | "bank_statement" | "rental_agreement" | "passport_registration" | "temporary_registration";
1264
- file_hashes: string[];
1265
- message: string;
1266
- }
1267
- export interface PassportElementErrorFrontSide {
1268
- source: "front_side";
1269
- type: "passport" | "driver_license" | "identity_card" | "internal_passport";
1270
- file_hash: string;
1271
- message: string;
1272
- }
1273
- export interface PassportElementErrorReverseSide {
1274
- source: "reverse_side";
1275
- type: "driver_license" | "identity_card";
1276
- file_hash: string;
1277
- message: string;
1278
- }
1279
- export interface PassportElementErrorSelfie {
1280
- source: "selfie";
1281
- type: "passport" | "driver_license" | "identity_card" | "internal_passport";
1282
- file_hash: string;
1283
- message: string;
1284
- }
1285
- export interface PassportElementErrorTranslationFile {
1286
- source: "translation_file";
1287
- type: "passport" | "driver_license" | "identity_card" | "internal_passport" | "utility_bill" | "bank_statement" | "rental_agreement" | "passport_registration" | "temporary_registration";
1288
- file_hash: string;
1289
- message: string;
1290
- }
1291
- export interface PassportElementErrorTranslationFiles {
1292
- source: "translation_files";
1293
- type: "passport" | "driver_license" | "identity_card" | "internal_passport" | "utility_bill" | "bank_statement" | "rental_agreement" | "passport_registration" | "temporary_registration";
1294
- file_hashes: string[];
1295
- message: string;
1296
- }
1297
- export interface PassportElementErrorUnspecified {
1298
- source: "unspecified";
1299
- type: string;
1300
- element_hash: string;
1301
- message: string;
1302
- }
1303
- export interface PassportFile {
1304
- file_id: string;
1305
- file_unique_id: string;
1306
- file_size: number;
1307
- file_date: number;
1308
- }
1309
- export interface PhotoSize {
1310
- file_id: string;
1311
- file_unique_id: string;
1312
- width: number;
1313
- height: number;
1314
- file_size?: number;
1315
- }
1316
- export interface Poll {
1317
- id: string;
1318
- question: string;
1319
- options: PollOption[];
1320
- total_voter_count: number;
1321
- is_closed: boolean;
1322
- is_anonymous: boolean;
1323
- type: "regular" | "quiz";
1324
- allows_multiple_answers: boolean;
1325
- question_entities?: MessageEntity[];
1326
- correct_option_id?: number;
1327
- explanation?: string;
1328
- explanation_entities?: MessageEntity[];
1329
- open_period?: number;
1330
- close_date?: number;
1331
- }
1332
- export interface PollAnswer {
1333
- poll_id: string;
1334
- option_ids: number[];
1335
- voter_chat?: Chat;
1336
- user?: User;
1337
- }
1338
- export interface PollOption {
1339
- text: string;
1340
- voter_count: number;
1341
- text_entities?: MessageEntity[];
1342
- }
1343
- export interface PreCheckoutQuery {
1344
- id: string;
1345
- from: User;
1346
- currency: string;
1347
- total_amount: number;
1348
- invoice_payload: string;
1349
- shipping_option_id?: string;
1350
- order_info?: OrderInfo;
1351
- }
1352
- export interface PreparedInlineMessage {
1353
- id: string;
1354
- expiration_date: number;
1355
- }
1356
- export interface ProximityAlertTriggered {
1357
- traveler: User;
1358
- watcher: User;
1359
- distance: number;
1360
- }
1361
- export interface ReactionCount {
1362
- type: ReactionType;
1363
- total_count: number;
1364
- }
1365
- export type ReactionType = ReactionTypeEmoji | ReactionTypeCustomEmoji | ReactionTypePaid;
1366
- export interface ReactionTypeCustomEmoji {
1367
- type: "custom_emoji";
1368
- custom_emoji_id: string;
1369
- }
1370
- export interface ReactionTypeEmoji {
1371
- type: "emoji";
1372
- emoji: "👍" | "👎" | "❤" | "🔥" | "🥰" | "👏" | "😁" | "🤔" | "🤯" | "😱" | "🤬" | "😢" | "🎉" | "🤩" | "🤮" | "💩" | "🙏" | "👌" | "🕊" | "🤡" | "🥱" | "🥴" | "😍" | "🐳" | "❤‍🔥" | "🌚" | "🌭" | "💯" | "🤣" | "⚡" | "🍌" | "🏆" | "💔" | "🤨" | "😐" | "🍓" | "🍾" | "💋" | "🖕" | "😈" | "😴" | "😭" | "🤓" | "👻" | "👨‍💻" | "👀" | "🎃" | "🙈" | "😇" | "😨" | "🤝" | "✍" | "🤗" | "🫡" | "🎅" | "🎄" | "☃" | "💅" | "🤪" | "🗿" | "🆒" | "💘" | "🙉" | "🦄" | "😘" | "💊" | "🙊" | "😎" | "👾" | "🤷‍♂" | "🤷" | "🤷‍♀" | "😡";
1373
- }
1374
- export interface ReactionTypePaid {
1375
- type: "paid";
1376
- }
1377
- export interface RefundedPayment {
1378
- currency: "XTR";
1379
- total_amount: number;
1380
- invoice_payload: string;
1381
- telegram_payment_charge_id: string;
1382
- provider_payment_charge_id?: string;
1383
- }
1384
- export interface ReplyKeyboardMarkup {
1385
- keyboard: KeyboardButton[][];
1386
- is_persistent?: boolean;
1387
- resize_keyboard?: boolean;
1388
- one_time_keyboard?: boolean;
1389
- input_field_placeholder?: string;
1390
- selective?: boolean;
1391
- }
1392
- export interface ReplyKeyboardRemove {
1393
- remove_keyboard: boolean;
1394
- selective?: boolean;
1395
- }
1396
- export interface ReplyParameters {
1397
- message_id: number;
1398
- chat_id?: number | string;
1399
- allow_sending_without_reply?: boolean;
1400
- quote?: string;
1401
- quote_parse_mode?: "HTML" | "MarkdownV2";
1402
- quote_entities?: MessageEntity[];
1403
- quote_position?: number;
1404
- }
1405
- export interface ResponseParameters {
1406
- migrate_to_chat_id?: number;
1407
- retry_after?: number;
1408
- }
1409
- export type RevenueWithdrawalState = RevenueWithdrawalStatePending | RevenueWithdrawalStateSucceeded | RevenueWithdrawalStateFailed;
1410
- export interface RevenueWithdrawalStateFailed {
1411
- type: "failed";
1412
- }
1413
- export interface RevenueWithdrawalStatePending {
1414
- type: "pending";
1415
- }
1416
- export interface RevenueWithdrawalStateSucceeded {
1417
- type: "succeeded";
1418
- date: number;
1419
- url: string;
1420
- }
1421
- export interface SentWebAppMessage {
1422
- inline_message_id?: string;
1423
- }
1424
- export interface SharedUser {
1425
- user_id: number;
1426
- first_name?: string;
1427
- last_name?: string;
1428
- username?: string;
1429
- photo?: PhotoSize[];
1430
- }
1431
- export interface ShippingAddress {
1432
- country_code: string;
1433
- state: string;
1434
- city: string;
1435
- street_line1: string;
1436
- street_line2: string;
1437
- post_code: string;
1438
- }
1439
- export interface ShippingOption {
1440
- id: string;
1441
- title: string;
1442
- prices: LabeledPrice[];
1443
- }
1444
- export interface ShippingQuery {
1445
- id: string;
1446
- from: User;
1447
- invoice_payload: string;
1448
- shipping_address: ShippingAddress;
1449
- }
1450
- export interface StarTransaction {
1451
- id: string;
1452
- amount: number;
1453
- date: number;
1454
- nanostar_amount?: number;
1455
- source?: TransactionPartner;
1456
- receiver?: TransactionPartner;
1457
- }
1458
- export interface StarTransactions {
1459
- transactions: StarTransaction[];
1460
- }
1461
- export interface Sticker {
1462
- file_id: string;
1463
- file_unique_id: string;
1464
- type: "regular" | "mask" | "custom_emoji";
1465
- width: number;
1466
- height: number;
1467
- is_animated: boolean;
1468
- is_video: boolean;
1469
- thumbnail?: PhotoSize;
1470
- emoji?: string;
1471
- set_name?: string;
1472
- premium_animation?: File;
1473
- mask_position?: MaskPosition;
1474
- custom_emoji_id?: string;
1475
- needs_repainting?: boolean;
1476
- file_size?: number;
1477
- }
1478
- export interface StickerSet {
1479
- name: string;
1480
- title: string;
1481
- sticker_type: "regular" | "mask" | "custom_emoji";
1482
- stickers: Sticker[];
1483
- thumbnail?: PhotoSize;
1484
- }
1485
- export interface Story {
1486
- chat: Chat;
1487
- id: number;
1488
- }
1489
- export interface SuccessfulPayment {
1490
- currency: string;
1491
- total_amount: number;
1492
- invoice_payload: string;
1493
- telegram_payment_charge_id: string;
1494
- provider_payment_charge_id: string;
1495
- subscription_expiration_date?: number;
1496
- is_recurring?: boolean;
1497
- is_first_recurring?: boolean;
1498
- shipping_option_id?: string;
1499
- order_info?: OrderInfo;
1500
- }
1501
- export interface SwitchInlineQueryChosenChat {
1502
- query?: string;
1503
- allow_user_chats?: boolean;
1504
- allow_bot_chats?: boolean;
1505
- allow_group_chats?: boolean;
1506
- allow_channel_chats?: boolean;
1507
- }
1508
- export interface TextQuote {
1509
- text: string;
1510
- position: number;
1511
- entities?: MessageEntity[];
1512
- is_manual?: boolean;
1513
- }
1514
- export type TransactionPartner = TransactionPartnerUser | TransactionPartnerAffiliateProgram | TransactionPartnerFragment | TransactionPartnerTelegramAds | TransactionPartnerTelegramApi | TransactionPartnerOther;
1515
- export interface TransactionPartnerAffiliateProgram {
1516
- type: "affiliate_program";
1517
- commission_per_mille: number;
1518
- sponsor_user?: User;
1519
- }
1520
- export interface TransactionPartnerFragment {
1521
- type: "fragment";
1522
- withdrawal_state?: RevenueWithdrawalState;
1523
- }
1524
- export interface TransactionPartnerOther {
1525
- type: "other";
1526
- }
1527
- export interface TransactionPartnerTelegramAds {
1528
- type: "telegram_ads";
1529
- }
1530
- export interface TransactionPartnerTelegramApi {
1531
- type: "telegram_api";
1532
- request_count: number;
1533
- }
1534
- export interface TransactionPartnerUser {
1535
- type: "user";
1536
- user: User;
1537
- affiliate?: AffiliateInfo;
1538
- invoice_payload?: string;
1539
- subscription_period?: number;
1540
- paid_media?: PaidMedia[];
1541
- paid_media_payload?: string;
1542
- gift?: Gift;
1543
- }
1544
- export interface Update {
1545
- update_id: number;
1546
- message?: Message;
1547
- edited_message?: Message;
1548
- channel_post?: Message;
1549
- edited_channel_post?: Message;
1550
- business_connection?: BusinessConnection;
1551
- business_message?: Message;
1552
- edited_business_message?: Message;
1553
- deleted_business_messages?: BusinessMessagesDeleted;
1554
- message_reaction?: MessageReactionUpdated;
1555
- message_reaction_count?: MessageReactionCountUpdated;
1556
- inline_query?: InlineQuery;
1557
- chosen_inline_result?: ChosenInlineResult;
1558
- callback_query?: CallbackQuery;
1559
- shipping_query?: ShippingQuery;
1560
- pre_checkout_query?: PreCheckoutQuery;
1561
- purchased_paid_media?: PaidMediaPurchased;
1562
- poll?: Poll;
1563
- poll_answer?: PollAnswer;
1564
- my_chat_member?: ChatMemberUpdated;
1565
- chat_member?: ChatMemberUpdated;
1566
- chat_join_request?: ChatJoinRequest;
1567
- chat_boost?: ChatBoostUpdated;
1568
- removed_chat_boost?: ChatBoostRemoved;
1569
- }
1570
- export interface User {
1571
- id: number;
1572
- is_bot: boolean;
1573
- first_name: string;
1574
- last_name?: string;
1575
- username?: string;
1576
- language_code?: string;
1577
- is_premium?: boolean;
1578
- added_to_attachment_menu?: boolean;
1579
- can_join_groups?: boolean;
1580
- can_read_all_group_messages?: boolean;
1581
- supports_inline_queries?: boolean;
1582
- can_connect_to_business?: boolean;
1583
- has_main_web_app?: boolean;
1584
- }
1585
- export interface UserChatBoosts {
1586
- boosts: ChatBoost[];
1587
- }
1588
- export interface UserProfilePhotos {
1589
- total_count: number;
1590
- photos: PhotoSize[][];
1591
- }
1592
- export interface UsersShared {
1593
- request_id: number;
1594
- users: SharedUser[];
1595
- }
1596
- export interface Venue {
1597
- location: Location;
1598
- title: string;
1599
- address: string;
1600
- foursquare_id?: string;
1601
- foursquare_type?: string;
1602
- google_place_id?: string;
1603
- google_place_type?: string;
1604
- }
1605
- export interface Video {
1606
- file_id: string;
1607
- file_unique_id: string;
1608
- width: number;
1609
- height: number;
1610
- duration: number;
1611
- thumbnail?: PhotoSize;
1612
- file_name?: string;
1613
- mime_type?: string;
1614
- file_size?: number;
1615
- }
1616
- export interface VideoChatEnded {
1617
- duration: number;
1618
- }
1619
- export interface VideoChatParticipantsInvited {
1620
- users: User[];
1621
- }
1622
- export interface VideoChatScheduled {
1623
- start_date: number;
1624
- }
1625
- export type VideoChatStarted = never;
1626
- export interface VideoNote {
1627
- file_id: string;
1628
- file_unique_id: string;
1629
- length: number;
1630
- duration: number;
1631
- thumbnail?: PhotoSize;
1632
- file_size?: number;
1633
- }
1634
- export interface Voice {
1635
- file_id: string;
1636
- file_unique_id: string;
1637
- duration: number;
1638
- mime_type?: string;
1639
- file_size?: number;
1640
- }
1641
- export interface WebAppData {
1642
- data: string;
1643
- button_text: string;
1644
- }
1645
- export interface WebAppInfo {
1646
- url: string;
1647
- }
1648
- export interface WebhookInfo {
1649
- url: string;
1650
- has_custom_certificate: boolean;
1651
- pending_update_count: number;
1652
- ip_address?: string;
1653
- last_error_date?: number;
1654
- last_error_message?: string;
1655
- last_synchronization_error_date?: number;
1656
- max_connections?: number;
1657
- allowed_updates?: string[];
1658
- }
1659
- export interface WriteAccessAllowed {
1660
- from_request?: boolean;
1661
- web_app_name?: string;
1662
- from_attachment_menu?: boolean;
1663
- }