telegram-bot-api-nodejs 1.0.9 → 1.0.11
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/index.d.ts +11 -0
- package/index.js +1 -0
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -84,6 +84,9 @@ interface PassportData {
|
|
|
84
84
|
data: EncryptedPassportElement[];
|
|
85
85
|
credentials: EncryptedCredentials;
|
|
86
86
|
}
|
|
87
|
+
/**
|
|
88
|
+
* @docs https://core.telegram.org/bots/api#update
|
|
89
|
+
*/
|
|
87
90
|
export interface Update {
|
|
88
91
|
update_id: number;
|
|
89
92
|
message?: Message;
|
|
@@ -114,6 +117,7 @@ export interface User {
|
|
|
114
117
|
last_name?: string;
|
|
115
118
|
username?: string;
|
|
116
119
|
language_code?: string;
|
|
120
|
+
is_premium?: boolean;
|
|
117
121
|
can_join_groups?: boolean;
|
|
118
122
|
supports_inline_queries?: boolean;
|
|
119
123
|
can_read_all_group_messages?: boolean;
|
|
@@ -126,6 +130,7 @@ export interface Chat {
|
|
|
126
130
|
first_name?: string;
|
|
127
131
|
last_name?: string;
|
|
128
132
|
photo?: ChatPhoto;
|
|
133
|
+
bio?: string;
|
|
129
134
|
description?: string;
|
|
130
135
|
invite_link?: string;
|
|
131
136
|
pinned_message?: Message;
|
|
@@ -133,6 +138,9 @@ export interface Chat {
|
|
|
133
138
|
can_set_sticker_set?: boolean;
|
|
134
139
|
sticker_set_name?: string;
|
|
135
140
|
}
|
|
141
|
+
/**
|
|
142
|
+
* @docs https://core.telegram.org/bots/api#message
|
|
143
|
+
*/
|
|
136
144
|
export interface Message {
|
|
137
145
|
message_id: number;
|
|
138
146
|
from?: User;
|
|
@@ -240,6 +248,7 @@ interface FileBase {
|
|
|
240
248
|
export interface PhotoSize extends FileBase {
|
|
241
249
|
width: number;
|
|
242
250
|
height: number;
|
|
251
|
+
file_unique_id: string;
|
|
243
252
|
}
|
|
244
253
|
export interface Audio extends FileBase {
|
|
245
254
|
duration: number;
|
|
@@ -588,12 +597,14 @@ export declare function parseChat(c: Chat): {
|
|
|
588
597
|
};
|
|
589
598
|
export declare function parsePhotoSizes(p: PhotoSize[]): {
|
|
590
599
|
file_id: string;
|
|
600
|
+
file_unique_id: string;
|
|
591
601
|
file_size: number;
|
|
592
602
|
width: number;
|
|
593
603
|
height: number;
|
|
594
604
|
}[] | undefined;
|
|
595
605
|
export declare function parsePhotoSize(p: PhotoSize): {
|
|
596
606
|
file_id: string;
|
|
607
|
+
file_unique_id: string;
|
|
597
608
|
file_size: number;
|
|
598
609
|
width: number;
|
|
599
610
|
height: number;
|
package/index.js
CHANGED
|
@@ -255,6 +255,7 @@ export function parsePhotoSizes(p) {
|
|
|
255
255
|
export function parsePhotoSize(p) {
|
|
256
256
|
return {
|
|
257
257
|
file_id: String(p.file_id),
|
|
258
|
+
file_unique_id: String(p.file_unique_id),
|
|
258
259
|
file_size: Number(p.file_size),
|
|
259
260
|
width: Number(p.width),
|
|
260
261
|
height: Number(p.height),
|