telegram-bot-api-nodejs 1.0.12 → 1.0.13

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 +5 -8
  2. package/index.js +3 -0
  3. package/package.json +1 -1
package/index.d.ts CHANGED
@@ -441,6 +441,8 @@ export interface Sticker {
441
441
  file_id: string;
442
442
  width: number;
443
443
  height: number;
444
+ thumbnail?: PhotoSize;
445
+ /** @deprecated */
444
446
  thumb?: PhotoSize;
445
447
  emoji?: string;
446
448
  set_name?: string;
@@ -524,7 +526,9 @@ export interface Animation extends FileBase {
524
526
  width: number;
525
527
  height: number;
526
528
  duration: number;
529
+ /** @deprecated */
527
530
  thumb?: PhotoSize;
531
+ thumbnail?: PhotoSize;
528
532
  file_name?: string;
529
533
  mime_type?: string;
530
534
  }
@@ -609,14 +613,7 @@ export declare function parseVideoNote(v: VideoNote): VideoNote;
609
613
  export declare function parseEntities(v: MessageEntity[]): MessageEntity[];
610
614
  export declare function parseAudio(v: Audio): Audio;
611
615
  export declare function parseDocument(v: Document): Document;
612
- export declare function parseAnimation(v: Animation): {
613
- file_id: string;
614
- width: number;
615
- height: number;
616
- duration: number;
617
- file_name: string;
618
- mime_type: string;
619
- };
616
+ export declare function parseAnimation(v: Animation): Animation;
620
617
  export declare function parseContact(v: Contact): {
621
618
  phone_number: string;
622
619
  first_name: string;
package/index.js CHANGED
@@ -268,6 +268,7 @@ export function parseSticker(v) {
268
268
  width: Number(v.width),
269
269
  height: Number(v.height),
270
270
  thumb: v.thumb ? parsePhotoSize(v.thumb) : void 0,
271
+ thumbnail: v.thumbnail ? parsePhotoSize(v.thumbnail) : void 0,
271
272
  emoji: String(v.emoji),
272
273
  };
273
274
  }
@@ -339,6 +340,8 @@ export function parseAnimation(v) {
339
340
  duration: Number(v.duration),
340
341
  file_name: String(v.file_name),
341
342
  mime_type: String(v.mime_type || ""),
343
+ thumb: v.thumb ? parsePhotoSize(v.thumb) : void 0,
344
+ thumbnail: v.thumbnail ? parsePhotoSize(v.thumbnail) : void 0,
342
345
  };
343
346
  }
344
347
  export function parseContact(v) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "telegram-bot-api-nodejs",
3
- "version": "1.0.12",
3
+ "version": "1.0.13",
4
4
  "description": "Telegram Bot API client for nodejs",
5
5
  "type": "module",
6
6
  "main": "index.js",