@mtkruto/node 0.1.157 → 0.1.161
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/1_composer.d.ts +2 -2
- package/esm/client/1_composer.js +4 -4
- package/esm/client/1_file_manager.js +53 -56
- package/esm/client/2_message_manager.js +8 -11
- package/esm/client/4_client.d.ts +2 -2
- package/esm/client/4_client.js +4 -4
- package/esm/tl/2_types.d.ts +596 -1
- package/esm/tl/2_types.js +1824 -319
- package/esm/tl/3_functions.d.ts +374 -2
- package/esm/tl/3_functions.js +943 -31
- package/esm/types/0__file_id.d.ts +79 -54
- package/esm/types/0__file_id.js +259 -277
- package/esm/types/0_chat_photo.js +15 -21
- package/esm/types/0_giveaway_parameters.d.ts +5 -0
- package/esm/types/0_login_url.d.ts +4 -0
- package/esm/types/0_message_reference.d.ts +2 -0
- package/esm/types/0_price_tag.d.ts +2 -0
- package/esm/types/0_thumbnail.js +16 -14
- package/esm/types/1_giveaway.d.ts +2 -0
- package/esm/types/1_inline_query_result_button.d.ts +3 -0
- package/esm/types/1_photo.js +20 -14
- package/esm/types/1_poll.d.ts +13 -0
- package/esm/types/1_reaction_count.d.ts +2 -0
- package/esm/types/1_reply_quote.d.ts +3 -0
- package/esm/types/1_user.d.ts +13 -13
- package/esm/types/2_chosen_inline_result.d.ts +5 -0
- package/esm/types/2_game.d.ts +6 -0
- package/esm/types/2_game.js +11 -7
- package/esm/types/2_inactive_chat.d.ts +3 -0
- package/esm/types/2_inline_query.d.ts +6 -0
- package/esm/types/2_message_interactions.d.ts +5 -0
- package/esm/types/2_message_reaction_count.d.ts +4 -0
- package/esm/types/2_message_reactions.d.ts +7 -0
- package/esm/types/2_story_content.js +4 -7
- package/esm/types/4_inline_query_result.js +5 -5
- package/esm/types/4_message.js +24 -19
- package/esm/types/5_callback_query.d.ts +7 -0
- package/esm/utilities/0_buffer.d.ts +1 -1
- package/esm/utilities/0_buffer.js +26 -24
- package/package.json +1 -1
- package/script/4_constants.d.ts +2 -2
- package/script/4_constants.js +2 -2
- package/script/client/1_composer.d.ts +2 -2
- package/script/client/1_composer.js +4 -4
- package/script/client/1_file_manager.js +52 -55
- package/script/client/2_message_manager.js +6 -9
- package/script/client/4_client.d.ts +2 -2
- package/script/client/4_client.js +4 -4
- package/script/tl/2_types.d.ts +596 -1
- package/script/tl/2_types.js +1904 -345
- package/script/tl/3_functions.d.ts +374 -2
- package/script/tl/3_functions.js +977 -41
- package/script/types/0__file_id.d.ts +79 -54
- package/script/types/0__file_id.js +263 -280
- package/script/types/0_chat_photo.js +14 -20
- package/script/types/0_giveaway_parameters.d.ts +5 -0
- package/script/types/0_login_url.d.ts +4 -0
- package/script/types/0_message_reference.d.ts +2 -0
- package/script/types/0_price_tag.d.ts +2 -0
- package/script/types/0_thumbnail.js +15 -13
- package/script/types/1_giveaway.d.ts +2 -0
- package/script/types/1_inline_query_result_button.d.ts +3 -0
- package/script/types/1_photo.js +19 -13
- package/script/types/1_poll.d.ts +13 -0
- package/script/types/1_reaction_count.d.ts +2 -0
- package/script/types/1_reply_quote.d.ts +3 -0
- package/script/types/1_user.d.ts +13 -13
- package/script/types/2_chosen_inline_result.d.ts +5 -0
- package/script/types/2_game.d.ts +6 -0
- package/script/types/2_game.js +10 -6
- package/script/types/2_inactive_chat.d.ts +3 -0
- package/script/types/2_inline_query.d.ts +6 -0
- package/script/types/2_message_interactions.d.ts +5 -0
- package/script/types/2_message_reaction_count.d.ts +4 -0
- package/script/types/2_message_reactions.d.ts +7 -0
- package/script/types/2_story_content.js +3 -6
- package/script/types/4_inline_query_result.js +4 -4
- package/script/types/4_message.js +23 -18
- package/script/types/5_callback_query.d.ts +7 -0
- package/script/utilities/0_buffer.d.ts +1 -1
- package/script/utilities/0_buffer.js +26 -24
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
export declare enum FileType {
|
|
2
2
|
Thumbnail = 0,
|
|
3
|
-
|
|
3
|
+
ProfilePhoto = 1,
|
|
4
4
|
Photo = 2,
|
|
5
|
-
|
|
5
|
+
VoiceNote = 3,
|
|
6
6
|
Video = 4,
|
|
7
7
|
Document = 5,
|
|
8
8
|
Encrypted = 6,
|
|
@@ -13,65 +13,90 @@ export declare enum FileType {
|
|
|
13
13
|
EncryptedThumbnail = 11,
|
|
14
14
|
Wallpaper = 12,
|
|
15
15
|
VideoNote = 13,
|
|
16
|
-
|
|
17
|
-
|
|
16
|
+
SecureDecrypted = 14,
|
|
17
|
+
SecureEncrypted = 15,
|
|
18
18
|
Background = 16,
|
|
19
|
-
DocumentAsFile = 17
|
|
19
|
+
DocumentAsFile = 17,
|
|
20
|
+
Ringtone = 18,
|
|
21
|
+
CallLog = 19,
|
|
22
|
+
PhotoStory = 20,
|
|
23
|
+
VideoStory = 21,
|
|
24
|
+
Size = 22,
|
|
25
|
+
None = 23
|
|
20
26
|
}
|
|
21
|
-
export declare enum
|
|
27
|
+
export declare enum PhotoSourceType {
|
|
22
28
|
Legacy = 0,
|
|
23
29
|
Thumbnail = 1,
|
|
24
30
|
ChatPhotoSmall = 2,
|
|
25
31
|
ChatPhotoBig = 3,
|
|
26
|
-
StickerSetThumbnail = 4
|
|
32
|
+
StickerSetThumbnail = 4,
|
|
33
|
+
FullLegacy = 5,
|
|
34
|
+
ChatPhotoSmallLegacy = 6,
|
|
35
|
+
ChatPhotoBigLegacy = 7,
|
|
36
|
+
StickerSetThumbnailLegacy = 8,
|
|
37
|
+
StickerSetThumbnailVersion = 9
|
|
27
38
|
}
|
|
28
|
-
|
|
39
|
+
type PhotoSource = {
|
|
40
|
+
type: PhotoSourceType.Legacy;
|
|
41
|
+
secret: bigint;
|
|
42
|
+
} | {
|
|
43
|
+
type: PhotoSourceType.Thumbnail;
|
|
44
|
+
fileType: FileType;
|
|
45
|
+
thumbnailType: number;
|
|
46
|
+
} | {
|
|
47
|
+
type: PhotoSourceType.ChatPhotoSmall;
|
|
48
|
+
chatId: bigint;
|
|
49
|
+
chatAccessHash: bigint;
|
|
50
|
+
} | {
|
|
51
|
+
type: PhotoSourceType.ChatPhotoBig;
|
|
52
|
+
chatId: bigint;
|
|
53
|
+
chatAccessHash: bigint;
|
|
54
|
+
} | {
|
|
55
|
+
type: PhotoSourceType.StickerSetThumbnail;
|
|
56
|
+
stickerSetId: bigint;
|
|
57
|
+
stickerSetAccessHash: bigint;
|
|
58
|
+
} | {
|
|
59
|
+
type: PhotoSourceType.FullLegacy;
|
|
60
|
+
volumeId: bigint;
|
|
61
|
+
localId: number;
|
|
62
|
+
secret: bigint;
|
|
63
|
+
} | {
|
|
64
|
+
type: PhotoSourceType.ChatPhotoSmallLegacy;
|
|
65
|
+
volumeId: bigint;
|
|
66
|
+
localId: number;
|
|
67
|
+
} | {
|
|
68
|
+
type: PhotoSourceType.ChatPhotoBigLegacy;
|
|
69
|
+
volumeId: bigint;
|
|
70
|
+
localId: number;
|
|
71
|
+
} | {
|
|
72
|
+
type: PhotoSourceType.StickerSetThumbnailLegacy;
|
|
73
|
+
volumeId: bigint;
|
|
74
|
+
localId: number;
|
|
75
|
+
} | {
|
|
76
|
+
type: PhotoSourceType.StickerSetThumbnailVersion;
|
|
77
|
+
version: number;
|
|
78
|
+
};
|
|
79
|
+
type FileLocation = {
|
|
80
|
+
type: "web";
|
|
81
|
+
url: string;
|
|
82
|
+
accessHash: bigint;
|
|
83
|
+
} | {
|
|
84
|
+
type: "photo";
|
|
85
|
+
id: bigint;
|
|
86
|
+
accessHash: bigint;
|
|
87
|
+
source: PhotoSource;
|
|
88
|
+
} | {
|
|
89
|
+
type: "common";
|
|
90
|
+
id: bigint;
|
|
91
|
+
accessHash: bigint;
|
|
92
|
+
};
|
|
93
|
+
export interface FileId {
|
|
94
|
+
type: FileType;
|
|
95
|
+
dcId: number;
|
|
29
96
|
fileReference?: Uint8Array;
|
|
30
|
-
|
|
31
|
-
mediaId?: bigint;
|
|
32
|
-
accessHash?: bigint;
|
|
33
|
-
volumeId?: bigint;
|
|
34
|
-
thumbnailSource?: ThumbnailSource;
|
|
35
|
-
thumbnailFileType?: FileType;
|
|
36
|
-
thumbnailSize?: string;
|
|
37
|
-
secret?: bigint;
|
|
38
|
-
localId?: number;
|
|
39
|
-
chatId?: number;
|
|
40
|
-
chatAccessHash?: bigint;
|
|
41
|
-
stickerSetId?: bigint;
|
|
42
|
-
stickerSetAccessHash?: bigint;
|
|
43
|
-
}
|
|
44
|
-
export declare class FileID {
|
|
45
|
-
readonly fileType: FileType;
|
|
46
|
-
readonly dcId: number;
|
|
47
|
-
readonly params: FileIDParams;
|
|
48
|
-
static MAJOR: number;
|
|
49
|
-
static MINOR: number;
|
|
50
|
-
readonly major: number;
|
|
51
|
-
readonly minor: number;
|
|
52
|
-
constructor(major: number | null | undefined, minor: number | null | undefined, fileType: FileType, dcId: number, params: FileIDParams);
|
|
53
|
-
static decode(fileId: string): FileID;
|
|
54
|
-
encode(major?: number, minor?: number): string;
|
|
55
|
-
}
|
|
56
|
-
export declare enum FileUniqueType {
|
|
57
|
-
Web = 0,
|
|
58
|
-
Photo = 1,
|
|
59
|
-
Document = 2,
|
|
60
|
-
Secure = 3,
|
|
61
|
-
Encrypted = 4,
|
|
62
|
-
Temp = 5
|
|
63
|
-
}
|
|
64
|
-
interface FileUniqueParams {
|
|
65
|
-
url?: string;
|
|
66
|
-
mediaId?: bigint;
|
|
67
|
-
volumeId?: bigint;
|
|
68
|
-
localId?: number;
|
|
69
|
-
}
|
|
70
|
-
export declare class FileUniqueID {
|
|
71
|
-
private readonly fileUniqueType;
|
|
72
|
-
private readonly params;
|
|
73
|
-
constructor(fileUniqueType: FileUniqueType, params: FileUniqueParams);
|
|
74
|
-
static decode(fileId: string): FileUniqueID;
|
|
75
|
-
encode(): string;
|
|
97
|
+
location: FileLocation;
|
|
76
98
|
}
|
|
99
|
+
export declare function deserializeFileId(fileId: string): FileId;
|
|
100
|
+
export declare function serializeFileId(fileId: FileId): string;
|
|
101
|
+
export declare function toUniqueFileId(fileId: FileId): string;
|
|
77
102
|
export {};
|