telegram-bot-api-nodejs 1.2.14 → 1.2.16

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 +20 -0
  2. package/index.js +2 -3
  3. package/package.json +3 -3
package/index.d.ts CHANGED
@@ -331,6 +331,7 @@ export interface Message {
331
331
  caption_entities?: MessageEntity[];
332
332
  audio?: Audio;
333
333
  document?: Document;
334
+ paid_media?: PaidMediaInfo;
334
335
  animation?: Animation;
335
336
  game?: Game;
336
337
  photo?: PhotoSize[];
@@ -548,6 +549,25 @@ export interface Voice extends FileBase {
548
549
  duration: number;
549
550
  mime_type?: string;
550
551
  }
552
+ export interface PaidMediaInfo {
553
+ star_count: number;
554
+ paid_media: PaidMedia[];
555
+ }
556
+ export type PaidMedia = PaidMediaPreview | PaidMediaPhoto | PaidMediaVideo;
557
+ export interface PaidMediaPreview {
558
+ type: "preview";
559
+ width: number;
560
+ height: number;
561
+ duration: number;
562
+ }
563
+ export interface PaidMediaPhoto {
564
+ type: "photo";
565
+ photo: PhotoSize;
566
+ }
567
+ export interface PaidMediaVideo {
568
+ type: "video";
569
+ video: Video;
570
+ }
551
571
  export interface InputMediaBase {
552
572
  media: string;
553
573
  caption?: string;
package/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { readFileSync } from "fs";
1
+ import { readFileSync } from "node:fs";
2
2
  /**
3
3
  * Methods
4
4
  */
@@ -697,8 +697,7 @@ export function removeTokenFromUrl(url) {
697
697
  return `bot${botId}:${"*".repeat(token.length)}`;
698
698
  });
699
699
  }
700
- export { currencies };
701
- var currencies;
700
+ export var currencies;
702
701
  (function (currencies_1) {
703
702
  const __dirname = import.meta.dirname;
704
703
  let currencies = null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "telegram-bot-api-nodejs",
3
- "version": "1.2.14",
3
+ "version": "1.2.16",
4
4
  "description": "Telegram Bot API client for nodejs",
5
5
  "type": "module",
6
6
  "main": "index.js",
@@ -25,9 +25,9 @@
25
25
  "author": "",
26
26
  "license": "ISC",
27
27
  "devDependencies": {
28
- "@types/node": "^25.2.2"
28
+ "@types/node": "^25.5.2"
29
29
  },
30
30
  "dependencies": {
31
- "@typescript/native-preview": "^7.0.0-dev.20260208.1"
31
+ "@typescript/native-preview": "^7.0.0-dev.20260407.1"
32
32
  }
33
33
  }