telegram-bot-api-nodejs 1.0.10 → 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.
Files changed (3) hide show
  1. package/index.d.ts +10 -0
  2. package/index.js +1 -0
  3. 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;
@@ -127,6 +130,7 @@ export interface Chat {
127
130
  first_name?: string;
128
131
  last_name?: string;
129
132
  photo?: ChatPhoto;
133
+ bio?: string;
130
134
  description?: string;
131
135
  invite_link?: string;
132
136
  pinned_message?: Message;
@@ -134,6 +138,9 @@ export interface Chat {
134
138
  can_set_sticker_set?: boolean;
135
139
  sticker_set_name?: string;
136
140
  }
141
+ /**
142
+ * @docs https://core.telegram.org/bots/api#message
143
+ */
137
144
  export interface Message {
138
145
  message_id: number;
139
146
  from?: User;
@@ -241,6 +248,7 @@ interface FileBase {
241
248
  export interface PhotoSize extends FileBase {
242
249
  width: number;
243
250
  height: number;
251
+ file_unique_id: string;
244
252
  }
245
253
  export interface Audio extends FileBase {
246
254
  duration: number;
@@ -589,12 +597,14 @@ export declare function parseChat(c: Chat): {
589
597
  };
590
598
  export declare function parsePhotoSizes(p: PhotoSize[]): {
591
599
  file_id: string;
600
+ file_unique_id: string;
592
601
  file_size: number;
593
602
  width: number;
594
603
  height: number;
595
604
  }[] | undefined;
596
605
  export declare function parsePhotoSize(p: PhotoSize): {
597
606
  file_id: string;
607
+ file_unique_id: string;
598
608
  file_size: number;
599
609
  width: number;
600
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),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "telegram-bot-api-nodejs",
3
- "version": "1.0.10",
3
+ "version": "1.0.11",
4
4
  "description": "Telegram Bot API client for nodejs",
5
5
  "type": "module",
6
6
  "main": "index.js",