@grammyjs/types 3.2.1 → 3.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/inline.d.ts CHANGED
@@ -72,7 +72,7 @@ export interface InlineQueryResultPhoto {
72
72
  type: "photo";
73
73
  /** Unique identifier for this result, 1-64 bytes */
74
74
  id: string;
75
- /** A valid URL of the photo. Photo must be in jpeg format. Photo size must not exceed 5MB */
75
+ /** A valid URL of the photo. Photo must be in JPEG format. Photo size must not exceed 5MB */
76
76
  photo_url: string;
77
77
  /** URL of the thumbnail for the photo */
78
78
  thumbnail_url: string;
@@ -119,6 +119,8 @@ export interface InlineQueryResultGif {
119
119
  caption?: string;
120
120
  /** Mode for parsing entities in the caption. See formatting options for more details. */
121
121
  parse_mode?: ParseMode;
122
+ /** List of special entities that appear in the caption, which can be specified instead of parse_mode */
123
+ caption_entities?: MessageEntity[];
122
124
  /** Inline keyboard attached to the message */
123
125
  reply_markup?: InlineKeyboardMarkup;
124
126
  /** Content of the message to be sent instead of the GIF animation */
@@ -148,6 +150,8 @@ export interface InlineQueryResultMpeg4Gif {
148
150
  caption?: string;
149
151
  /** Mode for parsing entities in the caption. See formatting options for more details. */
150
152
  parse_mode?: ParseMode;
153
+ /** List of special entities that appear in the caption, which can be specified instead of parse_mode */
154
+ caption_entities?: MessageEntity[];
151
155
  /** Inline keyboard attached to the message */
152
156
  reply_markup?: InlineKeyboardMarkup;
153
157
  /** Content of the message to be sent instead of the video animation */
@@ -155,7 +159,7 @@ export interface InlineQueryResultMpeg4Gif {
155
159
  }
156
160
  /** Represents a link to a page containing an embedded video player or a video file. By default, this video file will be sent by the user with an optional caption. Alternatively, you can use input_message_content to send a message with the specified content instead of the video.
157
161
 
158
- If an InlineQueryResultVideo message contains an embedded video (e.g., YouTube), you must replace its content using input_message_content. */
162
+ > If an InlineQueryResultVideo message contains an embedded video (e.g., YouTube), you must replace its content using input_message_content. */
159
163
  export interface InlineQueryResultVideo {
160
164
  /** Type of the result, must be video */
161
165
  type: "video";
@@ -231,6 +235,8 @@ export interface InlineQueryResultVoice {
231
235
  caption?: string;
232
236
  /** Mode for parsing entities in the voice message caption. See formatting options for more details. */
233
237
  parse_mode?: ParseMode;
238
+ /** List of special entities that appear in the caption, which can be specified instead of parse_mode */
239
+ caption_entities?: MessageEntity[];
234
240
  /** Recording duration in seconds */
235
241
  voice_duration?: number;
236
242
  /** Inline keyboard attached to the message */
@@ -289,9 +295,9 @@ export interface InlineQueryResultLocation {
289
295
  horizontal_accuracy?: number;
290
296
  /** Period in seconds for which the location can be updated, should be between 60 and 86400. */
291
297
  live_period?: number;
292
- /** The direction in which user is moving, in degrees; 1-360. For active live locations only. */
298
+ /** For live locations, a direction in which the user is moving, in degrees. Must be between 1 and 360 if specified. */
293
299
  heading?: number;
294
- /** The maximum distance for proximity alerts about approaching another chat member, in meters. For sent live locations only. */
300
+ /** For live locations, a maximum distance for proximity alerts about approaching another chat member, in meters. Must be between 1 and 100000 if specified. */
295
301
  proximity_alert_radius?: number;
296
302
  /** Inline keyboard attached to the message */
297
303
  reply_markup?: InlineKeyboardMarkup;
@@ -416,6 +422,8 @@ export interface InlineQueryResultCachedGif {
416
422
  caption?: string;
417
423
  /** Mode for parsing entities in the caption. See formatting options for more details. */
418
424
  parse_mode?: ParseMode;
425
+ /** List of special entities that appear in the caption, which can be specified instead of parse_mode */
426
+ caption_entities?: MessageEntity[];
419
427
  /** Inline keyboard attached to the message */
420
428
  reply_markup?: InlineKeyboardMarkup;
421
429
  /** Content of the message to be sent instead of the GIF animation */
@@ -435,6 +443,8 @@ export interface InlineQueryResultCachedMpeg4Gif {
435
443
  caption?: string;
436
444
  /** Mode for parsing entities in the caption. See formatting options for more details. */
437
445
  parse_mode?: ParseMode;
446
+ /** List of special entities that appear in the caption, which can be specified instead of parse_mode */
447
+ caption_entities?: MessageEntity[];
438
448
  /** Inline keyboard attached to the message */
439
449
  reply_markup?: InlineKeyboardMarkup;
440
450
  /** Content of the message to be sent instead of the video animation */
@@ -442,8 +452,7 @@ export interface InlineQueryResultCachedMpeg4Gif {
442
452
  }
443
453
  /** Represents a link to a sticker stored on the Telegram servers. By default, this sticker will be sent by the user. Alternatively, you can use input_message_content to send a message with the specified content instead of the sticker.
444
454
 
445
- Note: This will only work in Telegram versions released after 9 April, 2016 for static stickers and after 06 July, 2019 for animated stickers. Older clients will ignore them.
446
- */
455
+ Note: This will only work in Telegram versions released after 9 April, 2016 for static stickers and after 06 July, 2019 for animated stickers. Older clients will ignore them. */
447
456
  export interface InlineQueryResultCachedSticker {
448
457
  /** Type of the result, must be sticker */
449
458
  type: "sticker";
@@ -520,6 +529,8 @@ export interface InlineQueryResultCachedVoice {
520
529
  caption?: string;
521
530
  /** Mode for parsing entities in the voice message caption. See formatting options for more details. */
522
531
  parse_mode?: ParseMode;
532
+ /** List of special entities that appear in the caption, which can be specified instead of parse_mode */
533
+ caption_entities?: MessageEntity[];
523
534
  /** Inline keyboard attached to the message */
524
535
  reply_markup?: InlineKeyboardMarkup;
525
536
  /** Content of the message to be sent instead of the voice message */
package/manage.d.ts CHANGED
@@ -208,7 +208,7 @@ export interface ChatInviteLink {
208
208
  export interface ChatAdministratorRights {
209
209
  /** True, if the user's presence in the chat is hidden */
210
210
  is_anonymous: boolean;
211
- /** True, if the administrator can access the chat event log, chat statistics, message statistics in channels, see channel members, see anonymous administrators in supergroups and ignore slow mode. Implied by any other administrator privilege */
211
+ /** True, if the administrator can access the chat event log, chat statistics, boost list in channels, message statistics in channels, see channel members, see anonymous administrators in supergroups and ignore slow mode. Implied by any other administrator privilege */
212
212
  can_manage_chat: boolean;
213
213
  /** True, if the administrator can delete messages of other users */
214
214
  can_delete_messages: boolean;
@@ -222,12 +222,18 @@ export interface ChatAdministratorRights {
222
222
  can_change_info: boolean;
223
223
  /** True, if the user is allowed to invite new users to the chat */
224
224
  can_invite_users: boolean;
225
- /** True, if the administrator can post in the channel; channels only */
225
+ /** True, if the administrator can post messages in the channel; channels only */
226
226
  can_post_messages?: boolean;
227
227
  /** True, if the administrator can edit messages of other users and can pin messages; channels only */
228
228
  can_edit_messages?: boolean;
229
229
  /** True, if the user is allowed to pin messages; groups and supergroups only */
230
230
  can_pin_messages?: boolean;
231
+ /** True, if the administrator can post stories in the channel; channels only */
232
+ can_post_stories?: boolean;
233
+ /** True, if the administrator can edit stories posted by other users; channels only */
234
+ can_edit_stories?: boolean;
235
+ /** True, if the administrator can delete stories posted by other users; channels only */
236
+ can_delete_stories?: boolean;
231
237
  /** True, if the user is allowed to create, rename, close, and reopen forum topics; supergroups only */
232
238
  can_manage_topics?: boolean;
233
239
  }
@@ -260,7 +266,7 @@ export interface ChatMemberAdministrator {
260
266
  can_be_edited: boolean;
261
267
  /** True, if the user's presence in the chat is hidden */
262
268
  is_anonymous: boolean;
263
- /** True, if the administrator can access the chat event log, chat statistics, message statistics in channels, see channel members, see anonymous administrators in supergroups and ignore slow mode. Implied by any other administrator privilege */
269
+ /** True, if the administrator can access the chat event log, chat statistics, boost list in channels, message statistics in channels, see channel members, see anonymous administrators in supergroups and ignore slow mode. Implied by any other administrator privilege */
264
270
  can_manage_chat: boolean;
265
271
  /** True, if the administrator can delete messages of other users */
266
272
  can_delete_messages: boolean;
@@ -274,12 +280,18 @@ export interface ChatMemberAdministrator {
274
280
  can_change_info: boolean;
275
281
  /** True, if the user is allowed to invite new users to the chat */
276
282
  can_invite_users: boolean;
277
- /** True, if the administrator can post in the channel; channels only */
283
+ /** True, if the administrator can post messages in the channel; channels only */
278
284
  can_post_messages?: boolean;
279
285
  /** True, if the administrator can edit messages of other users and can pin messages; channels only */
280
286
  can_edit_messages?: boolean;
281
287
  /** True, if the user is allowed to pin messages; groups and supergroups only */
282
288
  can_pin_messages?: boolean;
289
+ /** True, if the administrator can post stories in the channel; channels only */
290
+ can_post_stories?: boolean;
291
+ /** True, if the administrator can edit stories posted by other users; channels only */
292
+ can_edit_stories?: boolean;
293
+ /** True, if the administrator can delete stories posted by other users; channels only */
294
+ can_delete_stories?: boolean;
283
295
  /** True, if the user is allowed to create, rename, close, and reopen forum topics; supergroups only */
284
296
  can_manage_topics?: boolean;
285
297
  /** Custom title for this user */
package/message.d.ts CHANGED
@@ -180,7 +180,7 @@ export interface Message extends Message.MediaMessage {
180
180
  chat_shared?: ChatShared;
181
181
  /** The domain name of the website on which the user has logged in. More about Telegram Login » */
182
182
  connected_website?: string;
183
- /** Service message: the user allowed the bot added to the attachment menu to write messages */
183
+ /** Service message: the user allowed the bot to write messages after adding it to the attachment or side menu, launching a Web App from a link, or accepting an explicit request from a Web App sent by the method requestWriteAccess */
184
184
  write_access_allowed?: WriteAccessAllowed;
185
185
  /** Telegram Passport data */
186
186
  passport_data?: PassportData;
@@ -627,10 +627,14 @@ export interface ChatShared {
627
627
  /** Identifier of the shared chat. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a 64-bit integer or double-precision float type are safe for storing this identifier. The bot may not have access to the chat and could be unable to use this identifier, unless the chat is already known to the bot by some other means. */
628
628
  chat_id: number;
629
629
  }
630
- /** This object represents a service message about a user allowing a bot to write messages after adding the bot to the attachment menu or launching a Web App from a link. */
630
+ /** This object represents a service message about a user allowing a bot to write messages after adding it to the attachment menu, launching a Web App from a link, or accepting an explicit request from a Web App sent by the method requestWriteAccess. */
631
631
  export interface WriteAccessAllowed {
632
- /** Name of the Web App which was launched from a link */
632
+ /** True, if the access was granted after the user accepted an explicit request from a Web App sent by the method requestWriteAccess */
633
+ from_request?: boolean;
634
+ /** Name of the Web App, if the access was granted when the Web App was launched from a link */
633
635
  web_app_name?: string;
636
+ /** True, if the access was granted when the bot was added to the attachment or side menu */
637
+ from_attachment_menu?: boolean;
634
638
  }
635
639
  /** This object represents a service message about a video chat scheduled in the chat. */
636
640
  export interface VideoChatScheduled {
package/methods.d.ts CHANGED
@@ -624,14 +624,20 @@ export type ApiMethods<F> = {
624
624
  user_id: number;
625
625
  /** Pass True if the administrator's presence in the chat is hidden */
626
626
  is_anonymous?: boolean;
627
- /** Pass True if the administrator can access the chat event log, chat statistics, message statistics in channels, see channel members, see anonymous administrators in supergroups and ignore slow mode. Implied by any other administrator privilege */
627
+ /** Pass True if the administrator can access the chat event log, chat statistics, boost list in channels, message statistics in channels, see channel members, see anonymous administrators in supergroups and ignore slow mode. Implied by any other administrator privilege */
628
628
  can_manage_chat?: boolean;
629
- /** Pass True if the administrator can create channel posts, channels only */
629
+ /** Pass True if the administrator can post messages in the channel; channels only */
630
630
  can_post_messages?: boolean;
631
- /** Pass True if the administrator can edit messages of other users and can pin messages, channels only */
631
+ /** Pass True if the administrator can edit messages of other users and can pin messages; channels only */
632
632
  can_edit_messages?: boolean;
633
633
  /** Pass True if the administrator can delete messages of other users */
634
634
  can_delete_messages?: boolean;
635
+ /** Pass True if the administrator can post stories in the channel; channels only */
636
+ can_post_stories?: boolean;
637
+ /** Pass True if the administrator can edit stories posted by other users; channels only */
638
+ can_edit_stories?: boolean;
639
+ /** Pass True if the administrator can delete stories posted by other users; channels only */
640
+ can_delete_stories?: boolean;
635
641
  /** Pass True if the administrator can manage video chats */
636
642
  can_manage_video_chats?: boolean;
637
643
  /** Pass True if the administrator can restrict, ban or unban chat members */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@grammyjs/types",
3
- "version": "3.2.1",
3
+ "version": "3.3.0",
4
4
  "description": "Telegram Bot API type declarations for grammY",
5
5
  "main": "mod.js",
6
6
  "repository": {