@mtkruto/node 0.1.105 → 0.1.107
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/esm/4_constants.d.ts +2 -2
- package/esm/4_constants.js +2 -2
- package/esm/client/3_types.d.ts +17 -12
- package/esm/client/4_client.d.ts +70 -15
- package/esm/client/4_client.js +73 -27
- package/esm/tl/2_types.d.ts +231 -55
- package/esm/tl/2_types.js +782 -150
- package/esm/tl/3_functions.d.ts +159 -53
- package/esm/tl/3_functions.js +488 -147
- package/esm/types/0_audio.d.ts +9 -9
- package/esm/types/0_bot_command.d.ts +2 -0
- package/esm/types/0_chat_action.d.ts +1 -0
- package/esm/types/0_chat_administrator_rights.d.ts +13 -13
- package/esm/types/0_chat_photo.d.ts +7 -6
- package/esm/types/0_chat_photo.js +1 -1
- package/esm/types/0_contact.d.ts +6 -6
- package/esm/types/0_dice.d.ts +3 -3
- package/esm/types/0_force_reply.d.ts +4 -4
- package/esm/types/0_input_contact_message_content.d.ts +5 -0
- package/esm/types/0_input_location_message_content.d.ts +7 -0
- package/esm/types/0_input_venue_message_content.d.ts +10 -1
- package/esm/types/0_keyboard_button_poll_type.d.ts +3 -3
- package/esm/types/0_location.d.ts +7 -7
- package/esm/types/0_login_url.d.ts +4 -5
- package/esm/types/0_mask_position.d.ts +0 -1
- package/esm/types/0_message_entity.d.ts +5 -5
- package/esm/types/0_parse_mode.d.ts +1 -0
- package/esm/types/0_poll_option.d.ts +2 -2
- package/esm/types/0_reply_keyboard_remove.d.ts +3 -3
- package/esm/types/0_thumbnail.d.ts +6 -6
- package/esm/types/0_venue.d.ts +6 -6
- package/esm/types/0_voice.d.ts +6 -6
- package/esm/types/0_web_app_info.d.ts +1 -2
- package/esm/types/1_animation.d.ts +9 -9
- package/esm/types/1_chat.d.ts +29 -34
- package/esm/types/1_document.d.ts +6 -7
- package/esm/types/1_keyboard_button.d.ts +1 -1
- package/esm/types/1_photo.d.ts +3 -3
- package/esm/types/1_sticker.d.ts +2 -2
- package/esm/types/1_user.d.ts +2 -1
- package/esm/types/1_video.d.ts +4 -4
- package/esm/types/1_video_note.d.ts +3 -3
- package/package.json +1 -1
- package/script/4_constants.d.ts +2 -2
- package/script/4_constants.js +2 -2
- package/script/client/3_types.d.ts +17 -12
- package/script/client/4_client.d.ts +70 -15
- package/script/client/4_client.js +85 -39
- package/script/tl/2_types.d.ts +231 -55
- package/script/tl/2_types.js +824 -179
- package/script/tl/3_functions.d.ts +159 -53
- package/script/tl/3_functions.js +510 -159
- package/script/types/0_audio.d.ts +9 -9
- package/script/types/0_bot_command.d.ts +2 -0
- package/script/types/0_chat_action.d.ts +1 -0
- package/script/types/0_chat_administrator_rights.d.ts +13 -13
- package/script/types/0_chat_photo.d.ts +7 -6
- package/script/types/0_chat_photo.js +1 -1
- package/script/types/0_contact.d.ts +6 -6
- package/script/types/0_dice.d.ts +3 -3
- package/script/types/0_force_reply.d.ts +4 -4
- package/script/types/0_input_contact_message_content.d.ts +5 -0
- package/script/types/0_input_location_message_content.d.ts +7 -0
- package/script/types/0_input_venue_message_content.d.ts +10 -1
- package/script/types/0_keyboard_button_poll_type.d.ts +3 -3
- package/script/types/0_location.d.ts +7 -7
- package/script/types/0_login_url.d.ts +4 -5
- package/script/types/0_mask_position.d.ts +0 -1
- package/script/types/0_message_entity.d.ts +5 -5
- package/script/types/0_parse_mode.d.ts +1 -0
- package/script/types/0_poll_option.d.ts +2 -2
- package/script/types/0_reply_keyboard_remove.d.ts +3 -3
- package/script/types/0_thumbnail.d.ts +6 -6
- package/script/types/0_venue.d.ts +6 -6
- package/script/types/0_voice.d.ts +6 -6
- package/script/types/0_web_app_info.d.ts +1 -2
- package/script/types/1_animation.d.ts +9 -9
- package/script/types/1_chat.d.ts +29 -34
- package/script/types/1_document.d.ts +6 -7
- package/script/types/1_keyboard_button.d.ts +1 -1
- package/script/types/1_photo.d.ts +3 -3
- package/script/types/1_sticker.d.ts +2 -2
- package/script/types/1_user.d.ts +2 -1
- package/script/types/1_video.d.ts +4 -4
- package/script/types/1_video_note.d.ts +3 -3
package/esm/types/0_audio.d.ts
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import { types } from "../2_tl.js";
|
|
2
2
|
import { Thumbnail } from "./0_thumbnail.js";
|
|
3
|
-
/**
|
|
3
|
+
/** An audio file. */
|
|
4
4
|
export interface Audio {
|
|
5
|
-
/**
|
|
5
|
+
/** A file identifier that can be used to download or reuse this file. */
|
|
6
6
|
fileId: string;
|
|
7
|
-
/**
|
|
7
|
+
/** A file identifier that can be used to identify this file. */
|
|
8
8
|
fileUniqueId: string;
|
|
9
|
-
/** Duration of the audio in seconds
|
|
9
|
+
/** Duration of the audio in seconds. */
|
|
10
10
|
duration: number;
|
|
11
|
-
/**
|
|
11
|
+
/** Authors of the audio. */
|
|
12
12
|
performer?: string;
|
|
13
|
-
/** Title of the audio
|
|
13
|
+
/** Title of the audio. */
|
|
14
14
|
title?: string;
|
|
15
|
-
/** MIME type of the file
|
|
15
|
+
/** MIME type of the file. */
|
|
16
16
|
mimeType: string;
|
|
17
|
-
/**
|
|
17
|
+
/** Size of the file in bytes. */
|
|
18
18
|
fileSize: number;
|
|
19
|
-
/**
|
|
19
|
+
/** Thumbnails of the album cover to which the music file belongs. */
|
|
20
20
|
thumbnails: Thumbnail[];
|
|
21
21
|
}
|
|
22
22
|
export declare function constructAudio(document: types.Document, audioAttribute: types.DocumentAttributeAudio | undefined, fileId: string, fileUniqueId: string): Audio;
|
|
@@ -1,29 +1,29 @@
|
|
|
1
1
|
import { types } from "../2_tl.js";
|
|
2
|
-
/**
|
|
2
|
+
/** The rights of a chat administrator. */
|
|
3
3
|
export interface ChatAdministratorRights {
|
|
4
|
-
/**
|
|
4
|
+
/** Whether the admininistrator's presence in the chat is hidden. */
|
|
5
5
|
isAnonymous: boolean;
|
|
6
|
-
/**
|
|
6
|
+
/** Whether the administrator can access the chat event log, chat statistics, message statistics in channels, see channel members, see anonymous administrators in supergroups and surpass slow mode. */
|
|
7
7
|
canManageChat: boolean;
|
|
8
|
-
/**
|
|
8
|
+
/** Whether the administrator can delete messages of other users. */
|
|
9
9
|
canDeleteMessages: boolean;
|
|
10
|
-
/**
|
|
10
|
+
/** Whether the administrator can manage video chats. */
|
|
11
11
|
canManageVideoChats: boolean;
|
|
12
|
-
/**
|
|
12
|
+
/** Whether the administrator can restrict, ban or unban chat members. */
|
|
13
13
|
canRestrictMembers: boolean;
|
|
14
|
-
/**
|
|
14
|
+
/** Whether the administrator can promote regular members to admininistrators. */
|
|
15
15
|
canPromoteMembers: boolean;
|
|
16
|
-
/**
|
|
16
|
+
/** Whether the administrator can change the name of the chat, its photo, description and some other settings. */
|
|
17
17
|
canChangeInfo: boolean;
|
|
18
|
-
/**
|
|
18
|
+
/** Whether the administrator can invite users to the chat. */
|
|
19
19
|
canInviteUsers: boolean;
|
|
20
|
-
/**
|
|
20
|
+
/** Whether the administrator can make posts in the channel. Only available for channels. */
|
|
21
21
|
canPostMessages?: boolean;
|
|
22
|
-
/**
|
|
22
|
+
/** Whether the administrator can pin posts and edit posts they didn't send. Only available for channels. */
|
|
23
23
|
canEditMessages?: boolean;
|
|
24
|
-
/**
|
|
24
|
+
/** Whether the administrator can pin messages. Only available for groups and supergroups. */
|
|
25
25
|
canPinMessages?: boolean;
|
|
26
|
-
/**
|
|
26
|
+
/** Whether the administrator can manage topics. Only available for supergroups. */
|
|
27
27
|
canManageTopics?: boolean;
|
|
28
28
|
}
|
|
29
29
|
export declare function constructChatAdministratorRights(rights_: types.ChatAdminRights): ChatAdministratorRights;
|
|
@@ -1,19 +1,20 @@
|
|
|
1
1
|
import { types } from "../2_tl.js";
|
|
2
2
|
export declare namespace ChatPhoto {
|
|
3
3
|
interface Base {
|
|
4
|
-
/**
|
|
4
|
+
/** A file identifier that can be used to download or reuse the small version of the chat photo (160x160). */
|
|
5
5
|
smallFileId: string;
|
|
6
|
-
/**
|
|
6
|
+
/** A file identifier that can be used to identify the small version of the chat photo (160x160). */
|
|
7
7
|
smallFileUniqueId: string;
|
|
8
|
-
/**
|
|
8
|
+
/** A file identifier that can be used to download or reuse the big version of the chat photo (640x640). */
|
|
9
9
|
bigFileId: string;
|
|
10
|
-
/**
|
|
10
|
+
/** A file identifier that can be used to identify the big version of the chat photo (640x640). */
|
|
11
11
|
bigFileUniqueId: string;
|
|
12
|
-
/**
|
|
12
|
+
/** Whether the chat photo is animated. */
|
|
13
13
|
hasVideo: boolean;
|
|
14
14
|
}
|
|
15
15
|
interface User extends Base {
|
|
16
|
-
|
|
16
|
+
/** Differentiates between user profile photos. */
|
|
17
|
+
personal: true;
|
|
17
18
|
}
|
|
18
19
|
type Chat = Base;
|
|
19
20
|
}
|
package/esm/types/0_contact.d.ts
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { types } from "../2_tl.js";
|
|
2
|
-
/**
|
|
2
|
+
/** A shared contact. */
|
|
3
3
|
export interface Contact {
|
|
4
|
-
/**
|
|
4
|
+
/** The contact's phone number. */
|
|
5
5
|
phoneNumber: string;
|
|
6
|
-
/**
|
|
6
|
+
/** The contact's first name. */
|
|
7
7
|
firstName: string;
|
|
8
|
-
/**
|
|
8
|
+
/** The contact's last name. */
|
|
9
9
|
lastName?: string;
|
|
10
|
-
/**
|
|
10
|
+
/** The contact's Telegram identifier. */
|
|
11
11
|
userId?: number;
|
|
12
|
-
/** Additional
|
|
12
|
+
/** Additional information in the vCard format. */
|
|
13
13
|
vcard?: string;
|
|
14
14
|
}
|
|
15
15
|
export declare function constructContact(contact: types.MessageMediaContact): Contact;
|
package/esm/types/0_dice.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { types } from "../2_tl.js";
|
|
2
|
-
/**
|
|
2
|
+
/** A rolled dice. */
|
|
3
3
|
export interface Dice {
|
|
4
|
-
/**
|
|
4
|
+
/** The emoji on which the dice is based on. */
|
|
5
5
|
emoji: string;
|
|
6
|
-
/**
|
|
6
|
+
/** The result of the roll, which is in the range of 1-6 for the emojis "🎲", "🎯" and "🎳", 1-5 for the emojis "🏀" and "⚽", and 1-64 for emoji "🎰". */
|
|
7
7
|
value: number;
|
|
8
8
|
}
|
|
9
9
|
export declare function constructDice(dice_: types.MessageMediaDice): Dice;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { types } from "../2_tl.js";
|
|
2
|
-
/**
|
|
2
|
+
/** Forces the user's client to select the message as the one that is to be replied. */
|
|
3
3
|
export interface ForceReply {
|
|
4
|
-
/**
|
|
4
|
+
/** Differentiate from other reply markup types. */
|
|
5
5
|
forceReply: true;
|
|
6
|
-
/**
|
|
6
|
+
/** A placeholder to be shown in the client's message box. */
|
|
7
7
|
inputFieldPlaceholder?: string;
|
|
8
|
-
/**
|
|
8
|
+
/** Whether to only affect specific users. If true, only users that were mentioned will be affected along with the author of the replied message if any. */
|
|
9
9
|
selective?: boolean;
|
|
10
10
|
}
|
|
11
11
|
export declare function constructForceReply(replyMarkup_: types.ReplyKeyboardForceReply): ForceReply;
|
|
@@ -1,6 +1,11 @@
|
|
|
1
|
+
/** A message content that shares a contact. */
|
|
1
2
|
export interface InputContactMessageContent {
|
|
3
|
+
/** The contact's phone number. */
|
|
2
4
|
phoneNumber: string;
|
|
5
|
+
/** The contact's first name. */
|
|
3
6
|
firstName: string;
|
|
7
|
+
/** The contact's last name. */
|
|
4
8
|
lastName?: string;
|
|
9
|
+
/** Additional information in the vCard format. */
|
|
5
10
|
vcard?: string;
|
|
6
11
|
}
|
|
@@ -1,8 +1,15 @@
|
|
|
1
|
+
/** A message content that shares a location. */
|
|
1
2
|
export interface InputLocationMessageContent {
|
|
3
|
+
/** The latitude of the location. */
|
|
2
4
|
latitude: number;
|
|
5
|
+
/** The longitude of the location. */
|
|
3
6
|
longitude: number;
|
|
7
|
+
/** The accuracy radius of the location in meters. Must be in the range of 0-1500. */
|
|
4
8
|
horizontalAccuracy?: number;
|
|
9
|
+
/** The duration in which the location can be updated in seconds. Must be in the range of 80-864,000. */
|
|
5
10
|
livePeriod?: number;
|
|
11
|
+
/** The direction which the user is moving towards. Must be in the range of 1-350. */
|
|
6
12
|
heading?: number;
|
|
13
|
+
/** The maximum distance for proximity alerts on approaching another chat member in meters. Must be in the range 1-100,000. */
|
|
7
14
|
proximityAlertRadius?: number;
|
|
8
15
|
}
|
|
@@ -1,10 +1,19 @@
|
|
|
1
|
+
/** A message content that shares a venue. */
|
|
1
2
|
export interface InputVenuMessageContent {
|
|
3
|
+
/** The latitude of the venue. */
|
|
2
4
|
latitude: number;
|
|
3
|
-
|
|
5
|
+
/** The longitude of the venue. */
|
|
6
|
+
longitude: number;
|
|
7
|
+
/** The name of the venue. */
|
|
4
8
|
title: string;
|
|
9
|
+
/** The address of the venue. */
|
|
5
10
|
address: string;
|
|
11
|
+
/** The Foursquare identifier of the venue. */
|
|
6
12
|
foursquareId?: string;
|
|
13
|
+
/** The Foursquare type of the venue. */
|
|
7
14
|
foursquareType?: string;
|
|
15
|
+
/** The Google Places identifier of the venue. */
|
|
8
16
|
googlePlaceId?: string;
|
|
17
|
+
/** The Google Places type of the venue. */
|
|
9
18
|
googlePlaceType?: string;
|
|
10
19
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/**
|
|
1
|
+
/** A keyboard button representing the type of the poll that is requested to be created. */
|
|
2
2
|
export interface KeyboardButtonPollType {
|
|
3
|
-
/** If
|
|
4
|
-
type?:
|
|
3
|
+
/** If a type is not specified, the user will be allowed to choose either type. */
|
|
4
|
+
type?: "regular" | "quiz";
|
|
5
5
|
}
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { types } from "../2_tl.js";
|
|
2
|
-
/**
|
|
2
|
+
/** A shared location. */
|
|
3
3
|
export interface Location {
|
|
4
|
-
/**
|
|
4
|
+
/** The latitude of the location. */
|
|
5
5
|
latitude: number;
|
|
6
|
-
/**
|
|
6
|
+
/** The longitude of the location. */
|
|
7
7
|
longitude: number;
|
|
8
|
-
/** The radius of
|
|
8
|
+
/** The accuracy radius of the location in meters. Must be in the range of 0-1500. */
|
|
9
9
|
horizontalAccuracy?: number;
|
|
10
|
-
/**
|
|
10
|
+
/** The duration in which the location can be updated in seconds. Must be in the range of 80-864,000. */
|
|
11
11
|
livePeriod?: number;
|
|
12
|
-
/** The direction
|
|
12
|
+
/** The direction which the user is moving towards. Must be in the range of 1-350. */
|
|
13
13
|
heading?: number;
|
|
14
|
-
/** The maximum distance for proximity alerts
|
|
14
|
+
/** The maximum distance for proximity alerts on approaching another chat member in meters. Must be in the range 1-100,000. */
|
|
15
15
|
proximityAlertRadius?: number;
|
|
16
16
|
}
|
|
17
17
|
export declare function constructLocation(geo_: types.MessageMediaGeo | types.MessageMediaGeoLive | types.GeoPoint): Location;
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
/** This object represents a parameter of the inline keyboard button used to automatically authorize a user. Serves as a great replacement for the [Telegram Login Widget](https://core.telegram.org/widgets/login) when the user is coming from Telegram. */
|
|
2
1
|
export interface LoginUrl {
|
|
3
|
-
/** An HTTPS URL to be opened with
|
|
2
|
+
/** An HTTPS URL to be opened with the authorization data appended to the query string when the button is pressed. If the user refuses to provide authorization data, the original URL without information about the user will be opened. */
|
|
4
3
|
url: string;
|
|
5
|
-
/**
|
|
4
|
+
/** A different text to use for the button when the message is forwarded. */
|
|
6
5
|
forwardText?: string;
|
|
7
|
-
/** Username of a bot, which will be used for user authorization. See [
|
|
6
|
+
/** Username of a bot, which will be used for user authorization. See [Learn more.](https://core.telegram.org/widgets/login#setting-up-a-bot) If not specified, the current bot's username will be assumed. The url's domain must be the same as the domain linked with the bot. [Learn more.](https://core.telegram.org/widgets/login#linking-your-domain-to-the-bot) */
|
|
8
7
|
botUsername?: string;
|
|
9
|
-
/**
|
|
8
|
+
/** Whether to ask the user to allow messages to be received from the specified bot. */
|
|
10
9
|
requestWriteAccess?: boolean;
|
|
11
10
|
}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { types } from "../2_tl.js";
|
|
2
|
-
/** This object describes the position on faces where a mask should be placed by default. */
|
|
3
2
|
export interface MaskPosition {
|
|
4
3
|
/** The part of the face relative to which the mask should be placed. One of "forehead", "eyes", "mouth", or "chin". */
|
|
5
4
|
point: "forehead" | "eyes" | "mouth" | "chin";
|
|
@@ -31,7 +31,7 @@ export declare namespace MessageEntity {
|
|
|
31
31
|
}
|
|
32
32
|
interface Pre extends Base {
|
|
33
33
|
type: "pre";
|
|
34
|
-
/**
|
|
34
|
+
/** The language identifier of the code. */
|
|
35
35
|
language: string;
|
|
36
36
|
}
|
|
37
37
|
interface Code extends Base {
|
|
@@ -39,12 +39,12 @@ export declare namespace MessageEntity {
|
|
|
39
39
|
}
|
|
40
40
|
interface TextLink extends Base {
|
|
41
41
|
type: "textLink";
|
|
42
|
-
/**
|
|
42
|
+
/** A URL that will be opened after the text is tapped. */
|
|
43
43
|
url: string;
|
|
44
44
|
}
|
|
45
45
|
interface TextMention extends Base {
|
|
46
46
|
type: "textMention";
|
|
47
|
-
/**
|
|
47
|
+
/** The identifier of the user to mention. */
|
|
48
48
|
userId: number;
|
|
49
49
|
}
|
|
50
50
|
interface Cashtag extends Base {
|
|
@@ -70,11 +70,11 @@ export declare namespace MessageEntity {
|
|
|
70
70
|
}
|
|
71
71
|
interface CustomEmoji extends Base {
|
|
72
72
|
type: "customEmoji";
|
|
73
|
-
/**
|
|
73
|
+
/** The identifier of the custom emoji. */
|
|
74
74
|
customEmojiId: string;
|
|
75
75
|
}
|
|
76
76
|
}
|
|
77
|
-
/**
|
|
77
|
+
/** A single entity of a message's text or caption. */
|
|
78
78
|
export type MessageEntity = MessageEntity.Mention | MessageEntity.Hashtag | MessageEntity.BotCommand | MessageEntity.URL | MessageEntity.EmailAddress | MessageEntity.Bold | MessageEntity.Italic | MessageEntity.Code | MessageEntity.Pre | MessageEntity.TextLink | MessageEntity.TextMention | MessageEntity.Cashtag | MessageEntity.PhoneNumber | MessageEntity.Underline | MessageEntity.Strikethrough | MessageEntity.Blockquote | MessageEntity.BankCard | MessageEntity.Spoiler | MessageEntity.CustomEmoji;
|
|
79
79
|
export declare function constructMessageEntity(obj: types.TypeMessageEntity): MessageEntity | null;
|
|
80
80
|
export declare function messageEntityToTlObject(entity: MessageEntity): types.MessageEntityMention | types.MessageEntityHashtag | types.MessageEntityBotCommand | types.MessageEntityURL | types.MessageEntityEmail | types.MessageEntityBold | types.MessageEntityItalic | types.MessageEntityCode | types.MessageEntityPre | types.MessageEntityTextURL | types.MessageEntityMentionName | types.MessageEntityPhone | types.MessageEntityCashtag | types.MessageEntityUnderline | types.MessageEntityStrike | types.MessageEntityBlockquote | types.MessageEntityBankCard | types.MessageEntitySpoiler | types.MessageEntityCustomEmoji;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { types } from "../2_tl.js";
|
|
2
2
|
export interface PollOption {
|
|
3
|
-
/**
|
|
3
|
+
/** The option's text (1-100 characters). */
|
|
4
4
|
text: string;
|
|
5
|
-
/** Number of users that voted
|
|
5
|
+
/** Number of users that voted this option. */
|
|
6
6
|
voterCount: number;
|
|
7
7
|
}
|
|
8
8
|
export declare function constructPollOption(option: types.PollAnswer, results: Array<types.TypePollAnswerVoters>): PollOption;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { types } from "../2_tl.js";
|
|
2
|
-
/**
|
|
2
|
+
/** Makes the user's client hide the current custom keyboard. */
|
|
3
3
|
export interface ReplyKeyboardRemove {
|
|
4
|
-
/**
|
|
4
|
+
/** Differentiate from other reply markup types. */
|
|
5
5
|
removeKeyboard: true;
|
|
6
|
-
/**
|
|
6
|
+
/** Whether to only affect specific users. If true, only users that were mentioned will be affected along with the author of the replied message if any. */
|
|
7
7
|
selective?: boolean;
|
|
8
8
|
}
|
|
9
9
|
export declare function constructReplyKeyboardRemove(replyMarkup_: types.ReplyKeyboardHide): ReplyKeyboardRemove;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { types } from "../2_tl.js";
|
|
2
|
-
/**
|
|
2
|
+
/** A file or sticker thumbnail. */
|
|
3
3
|
export interface Thumbnail {
|
|
4
|
-
/**
|
|
4
|
+
/** A file identifier that can be used to download or reuse the thumbnail. */
|
|
5
5
|
fileId: string;
|
|
6
|
-
/**
|
|
6
|
+
/** A file identifier that can be used to identify the thumbnail. */
|
|
7
7
|
fileUniqueId: string;
|
|
8
|
-
/**
|
|
8
|
+
/** The width of the thumbnail. */
|
|
9
9
|
width: number;
|
|
10
|
-
/**
|
|
10
|
+
/** The height of the thumbnail. */
|
|
11
11
|
height: number;
|
|
12
|
-
/**
|
|
12
|
+
/** Size of the file in bytes. */
|
|
13
13
|
fileSize: number;
|
|
14
14
|
}
|
|
15
15
|
export declare function constructThumbnail(size: types.PhotoSize, file: types.Document | types.Photo): Thumbnail;
|
package/esm/types/0_venue.d.ts
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { types } from "../2_tl.js";
|
|
2
2
|
import { Location } from "./0_location.js";
|
|
3
|
-
/**
|
|
3
|
+
/** A shared venue. */
|
|
4
4
|
export interface Venue {
|
|
5
|
-
/**
|
|
5
|
+
/** The location of the venue. Cannot be a live location. */
|
|
6
6
|
location: Location;
|
|
7
|
-
/**
|
|
7
|
+
/** The name of the venue. */
|
|
8
8
|
title: string;
|
|
9
|
-
/**
|
|
9
|
+
/** The address of the venue. */
|
|
10
10
|
address: string;
|
|
11
|
-
/** Foursquare identifier of the venue */
|
|
11
|
+
/** The Foursquare identifier of the venue. */
|
|
12
12
|
foursquareId?: string;
|
|
13
|
-
/** Foursquare type of the venue.
|
|
13
|
+
/** The Foursquare type of the venue. */
|
|
14
14
|
foursquareType?: string;
|
|
15
15
|
}
|
|
16
16
|
export declare function constructVenue(media_: types.MessageMediaVenue): Venue;
|
package/esm/types/0_voice.d.ts
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { types } from "../2_tl.js";
|
|
2
|
-
/**
|
|
2
|
+
/** A voice note. */
|
|
3
3
|
export interface Voice {
|
|
4
|
-
/**
|
|
4
|
+
/** A file identifier that can be used to download or reuse this file. */
|
|
5
5
|
fileId: string;
|
|
6
|
-
/**
|
|
6
|
+
/** A file identifier that can be used to identify this file. */
|
|
7
7
|
fileUniqueId: string;
|
|
8
|
-
/** Duration of the audio in seconds
|
|
8
|
+
/** Duration of the audio in seconds. */
|
|
9
9
|
duration: number;
|
|
10
|
-
/** MIME type of the file
|
|
10
|
+
/** MIME type of the file. */
|
|
11
11
|
mimeType: string;
|
|
12
|
-
/**
|
|
12
|
+
/** Size of the file in bytes. */
|
|
13
13
|
fileSize: number;
|
|
14
14
|
}
|
|
15
15
|
export declare function constructVoice(document: types.Document, audioAttributes: types.DocumentAttributeAudio, fileId: string, fileUniqueId: string): Voice;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
/** Describes a Web App */
|
|
2
1
|
export interface WebAppInfo {
|
|
3
|
-
/** An HTTPS URL of
|
|
2
|
+
/** An HTTPS URL of the Web App to be opened with additional data. */
|
|
4
3
|
url: string;
|
|
5
4
|
}
|
|
6
5
|
export declare function constructWebAppInfo(url: string): WebAppInfo;
|
|
@@ -2,23 +2,23 @@ import { types } from "../2_tl.js";
|
|
|
2
2
|
import { Thumbnail } from "./0_thumbnail.js";
|
|
3
3
|
/** This object represents an animation file (GIF or H.264/MPEG-4 AVC video without sound). */
|
|
4
4
|
export interface Animation {
|
|
5
|
-
/**
|
|
5
|
+
/** A file identifier that can be used to download or reuse this file. */
|
|
6
6
|
fileId: string;
|
|
7
|
-
/**
|
|
7
|
+
/** A file identifier that can be used to identify this file. */
|
|
8
8
|
fileUniqueId: string;
|
|
9
|
-
/**
|
|
9
|
+
/** The width of the animation. */
|
|
10
10
|
width: number;
|
|
11
|
-
/**
|
|
11
|
+
/** The height of the animation. */
|
|
12
12
|
height: number;
|
|
13
|
-
/** Duration of the
|
|
13
|
+
/** Duration of the animation in seconds. */
|
|
14
14
|
duration: number;
|
|
15
|
-
/**
|
|
15
|
+
/** Thumbnails of the animation. */
|
|
16
16
|
thumbnails: Thumbnail[];
|
|
17
|
-
/**
|
|
17
|
+
/** The original file name. */
|
|
18
18
|
fileName?: string;
|
|
19
|
-
/** MIME type of the file
|
|
19
|
+
/** MIME type of the file. */
|
|
20
20
|
mimeType: string;
|
|
21
|
-
/**
|
|
21
|
+
/** Size of the file in bytes. */
|
|
22
22
|
fileSize: number;
|
|
23
23
|
}
|
|
24
24
|
export declare function constructAnimation(document: types.Document, videoAttribute: types.DocumentAttributeVideo | undefined, fileAttribute: types.DocumentAttributeFilename | undefined, fileId: string, fileUniqueId: string): Animation;
|
package/esm/types/1_chat.d.ts
CHANGED
|
@@ -5,82 +5,77 @@ import { RestrictionReason } from "./0_restriction_reason.js";
|
|
|
5
5
|
export type ChatType = "private" | "group" | "supergroup" | "channel";
|
|
6
6
|
export declare namespace Chat {
|
|
7
7
|
interface Base {
|
|
8
|
-
/**
|
|
8
|
+
/** The type of the chat. */
|
|
9
9
|
type: ChatType;
|
|
10
|
-
/**
|
|
10
|
+
/** The identifier of the chat. */
|
|
11
11
|
id: number;
|
|
12
|
+
/** A color that can be displayed instead of the chat's photo. */
|
|
12
13
|
color: Color;
|
|
13
|
-
/**
|
|
14
|
+
/** The chat's photo. */
|
|
14
15
|
photo?: ChatPhoto;
|
|
15
16
|
}
|
|
16
17
|
interface Private extends Base {
|
|
17
18
|
type: "private";
|
|
18
|
-
/**
|
|
19
|
+
/** Whether this is a bot's chat. */
|
|
19
20
|
isBot?: boolean;
|
|
20
|
-
/**
|
|
21
|
+
/** The first name of the user. */
|
|
21
22
|
firstName: string;
|
|
22
|
-
/**
|
|
23
|
+
/** The last name of the user. */
|
|
23
24
|
lastName?: string;
|
|
24
|
-
/**
|
|
25
|
+
/** The user's main username. */
|
|
25
26
|
username?: string;
|
|
26
|
-
/**
|
|
27
|
+
/** The user's other usernames. */
|
|
27
28
|
also?: string[];
|
|
28
|
-
/**
|
|
29
|
+
/** The user's profile photo. */
|
|
29
30
|
photo?: ChatPhoto.User;
|
|
30
|
-
/**
|
|
31
|
+
/** Whether the user has been identified as scam. */
|
|
31
32
|
isScam: boolean;
|
|
32
|
-
/**
|
|
33
|
+
/** Whether the user has been identified as an impersonator. */
|
|
33
34
|
isFake: boolean;
|
|
34
|
-
/**
|
|
35
|
+
/** Whether the user is official support. */
|
|
35
36
|
isSupport: boolean;
|
|
36
|
-
/**
|
|
37
|
+
/** Whether the user has been verified. */
|
|
37
38
|
isVerified: boolean;
|
|
38
|
-
/**
|
|
39
|
+
/** Whether the user has been restricted. */
|
|
39
40
|
isRestricted?: boolean;
|
|
40
|
-
/**
|
|
41
|
+
/** The reason why the user has been restricted. */
|
|
41
42
|
restrictionReason?: RestrictionReason[];
|
|
42
43
|
}
|
|
43
44
|
interface Group extends Base {
|
|
44
45
|
type: "group";
|
|
45
|
-
/**
|
|
46
|
+
/** The title of the chat. */
|
|
46
47
|
title: string;
|
|
47
|
-
/**
|
|
48
|
+
/** The chat's photo. */
|
|
48
49
|
photo?: ChatPhoto.Chat;
|
|
49
|
-
/**
|
|
50
|
+
/** Whether the current user is the owner of the chat. */
|
|
50
51
|
isCreator: boolean;
|
|
51
52
|
}
|
|
52
53
|
interface ChannelBase extends Base {
|
|
53
|
-
/**
|
|
54
|
+
/** The title of the chat or channel. */
|
|
54
55
|
title: string;
|
|
55
|
-
/**
|
|
56
|
+
/** The main username of the chat or channel. */
|
|
56
57
|
username?: string;
|
|
57
|
-
/**
|
|
58
|
+
/** The other usernames of the chat or channel. */
|
|
58
59
|
also?: string[];
|
|
59
|
-
/**
|
|
60
|
+
/** The chat or channel's photo. */
|
|
60
61
|
photo?: ChatPhoto.Chat;
|
|
61
|
-
/**
|
|
62
|
+
/** Whether the chat or channel has been identified as scam. */
|
|
62
63
|
isScam: boolean;
|
|
63
|
-
/**
|
|
64
|
+
/** Whether the chat or channel has been identified as an impersonator. */
|
|
64
65
|
isFake: boolean;
|
|
65
|
-
/**
|
|
66
|
+
/** Whether the chat or channel has been verified. */
|
|
66
67
|
isVerified: boolean;
|
|
67
|
-
/**
|
|
68
|
+
/** Whether the chat or channel has been restricted. */
|
|
68
69
|
isRestricted: boolean;
|
|
69
|
-
/**
|
|
70
|
+
/** The reason why the chat or channel has been restricted. */
|
|
70
71
|
restrictionReason?: RestrictionReason[];
|
|
71
72
|
}
|
|
72
73
|
interface Channel extends ChannelBase {
|
|
73
74
|
type: "channel";
|
|
74
|
-
/** Title, for supergroups, channels and group chats */
|
|
75
|
-
title: string;
|
|
76
|
-
/** Username, for private chats, supergroups and channels if available */
|
|
77
|
-
username?: string;
|
|
78
|
-
/** Additional usernames */
|
|
79
|
-
also?: string[];
|
|
80
75
|
}
|
|
81
76
|
interface Supergroup extends ChannelBase {
|
|
82
77
|
type: "supergroup";
|
|
83
|
-
/**
|
|
78
|
+
/** Whether the chat is a forum. */
|
|
84
79
|
isForum: boolean;
|
|
85
80
|
}
|
|
86
81
|
}
|