@telegram.ts/types 1.13.0 → 1.14.0

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@telegram.ts/types",
3
- "version": "1.13.0",
3
+ "version": "1.14.0",
4
4
  "description": "Comprehensive Type Declarations for Telegram Bot API with telegramsjs",
5
5
  "main": "./src/index.js",
6
6
  "types": "./src/index.d.ts",
@@ -614,6 +614,8 @@ export type ApiMethods = {
614
614
 
615
615
  /** Use this method to send paid media to channel chats. On success, the sent Message is returned. */
616
616
  sendPaidMedia(args: {
617
+ /** Unique identifier of the business connection on behalf of which the message will be sent */
618
+ business_connection_id?: string;
617
619
  /** Unique identifier for the target chat or username of the target channel (in the format @channelusername) */
618
620
  chat_id: number | string;
619
621
  /** The number of Telegram Stars that must be paid to buy access to the media */
@@ -1000,6 +1002,28 @@ export type ApiMethods = {
1000
1002
  creates_join_request?: boolean;
1001
1003
  }): ChatInviteLink;
1002
1004
 
1005
+ /** Use this method to create a subscription invite link for a channel chat. The bot must have the can_invite_users administrator rights. The link can be edited using the method editChatSubscriptionInviteLink or revoked using the method revokeChatInviteLink. Returns the new invite link as a ChatInviteLink object. */
1006
+ createChatSubscriptionInviteLink(args: {
1007
+ /** Unique identifier for the target channel chat or username of the target channel (in the format @channelusername) */
1008
+ chat_id: number | string;
1009
+ /** Invite link name; 0-32 characters */
1010
+ name?: string;
1011
+ /** The number of seconds the subscription will be active for before the next payment. Currently, it must always be 2592000 (30 days) */
1012
+ subscription_period: number;
1013
+ /** The amount of Telegram Stars a user must pay initially and after each subsequent subscription period to be a member of the chat; 1-2500 */
1014
+ subscription_price: number;
1015
+ }): ChatInviteLink;
1016
+
1017
+ /** Use this method to edit a subscription invite link created by the bot. The bot must have the can_invite_users administrator rights. Returns the edited invite link as a ChatInviteLink object. */
1018
+ editChatSubscriptionInviteLink(args: {
1019
+ /** Unique identifier for the target channel chat or username of the target channel (in the format @channelusername) */
1020
+ chat_id: number | string;
1021
+ /** The invite link to edit */
1022
+ invite_link: string;
1023
+ /** Invite link name; 0-32 characters */
1024
+ name?: string;
1025
+ }): ChatInviteLink;
1026
+
1003
1027
  /** Use this method to revoke an invite link created by the bot. If the primary link is revoked, a new link is automatically generated. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns the revoked invite link as ChatInviteLink object. */
1004
1028
  revokeChatInviteLink(args: {
1005
1029
  /** Unique identifier of the target chat or username of the target channel (in the format @channelusername) */
@@ -1,4 +1,5 @@
1
1
  import type { User } from "./manageTypes";
2
+ import type { PaidMedia } from "./messageTypes";
2
3
 
3
4
  /** This object represents a portion of the price for goods or services. */
4
5
  export interface LabeledPrice {
@@ -174,6 +175,8 @@ export interface TransactionPartnerUser {
174
175
  user: User;
175
176
  /** Bot-specified invoice payload */
176
177
  invoice_payload?: string;
178
+ /** Information about the paid media bought by the user */
179
+ paid_media?: PaidMedia[];
177
180
  }
178
181
 
179
182
  /** Describes a withdrawal transaction with Fragment. */
@@ -690,6 +690,8 @@ export interface ChatMemberMember {
690
690
  status: "member";
691
691
  /** Information about the user */
692
692
  user: User;
693
+ /** Date when the user's subscription will expire; Unix time */
694
+ until_date?: number;
693
695
  }
694
696
 
695
697
  /** Represents a chat member that is under certain restrictions in the chat. Supergroups only. */
@@ -1335,8 +1335,12 @@ export interface File {
1335
1335
 
1336
1336
  /** This object describes the type of a reaction. Currently, it can be one of
1337
1337
  - ReactionTypeEmoji
1338
- - ReactionTypeCustomEmoji */
1339
- export type ReactionType = ReactionTypeEmoji | ReactionTypeCustomEmoji;
1338
+ - ReactionTypeCustomEmoji
1339
+ - ReactionTypePaid */
1340
+ export type ReactionType =
1341
+ | ReactionTypeEmoji
1342
+ | ReactionTypeCustomEmoji
1343
+ | ReactionTypePaid;
1340
1344
 
1341
1345
  /** The reaction is based on an emoji. */
1342
1346
  export interface ReactionTypeEmoji {
@@ -1427,6 +1431,12 @@ export interface ReactionTypeCustomEmoji {
1427
1431
  custom_emoji: string;
1428
1432
  }
1429
1433
 
1434
+ /** The reaction is paid. */
1435
+ export interface ReactionTypePaid {
1436
+ /** Type of the reaction, always “paid” */
1437
+ type: "paid";
1438
+ }
1439
+
1430
1440
  /** Represents a reaction added to a message along with the number of times it was added. */
1431
1441
  export interface ReactionCount {
1432
1442
  /** Type of the reaction */