telegram-bot-api-nodejs
Advanced tools
Comparing version 1.0.28 to 1.0.29
@@ -103,2 +103,6 @@ export type ChatType = "private" | "group" | "supergroup" | "channel"; | ||
edited_channel_post?: Message; | ||
business_connection?: BusinessConnection; | ||
business_message?: Message; | ||
edited_business_message?: Message; | ||
deleted_business_messages?: BusinessMessagesDeleted; | ||
message_reaction?: MessageReactionUpdated; | ||
@@ -133,4 +137,5 @@ message_reaction_count?: MessageReactionCountUpdated; | ||
can_join_groups?: boolean; | ||
can_read_all_group_messages?: boolean; | ||
supports_inline_queries?: boolean; | ||
can_read_all_group_messages?: boolean; | ||
can_connect_to_business?: boolean; | ||
} | ||
@@ -252,2 +257,15 @@ export interface Chat { | ||
} | ||
export interface BusinessConnection { | ||
id: string; | ||
user: User; | ||
user_chat_id: number; | ||
date: number; | ||
can_reply: boolean; | ||
is_enabled: boolean; | ||
} | ||
export interface BusinessMessagesDeleted { | ||
business_connection_id: string; | ||
chat: Chat; | ||
message_ids: number[]; | ||
} | ||
export interface MessageReactionUpdated { | ||
@@ -729,2 +747,5 @@ chat: Chat; | ||
export declare function deleteMyCommands(token: string, payload: DeleteMyCommandsOptions, signal: AbortSignal): Promise<Chat>; | ||
export declare function getBusinessConnection(token: string, payload: { | ||
business_connection_id: string; | ||
}, signal: AbortSignal): Promise<BusinessConnection>; | ||
/** | ||
@@ -731,0 +752,0 @@ * Parsers |
@@ -185,2 +185,10 @@ /** | ||
} | ||
export function getBusinessConnection(token, payload, signal) { | ||
return fetch(`https://api.telegram.org/bot${token}/getBusinessConnection`, { | ||
method: "POST", | ||
body: JSON.stringify(payload), | ||
headers, | ||
signal | ||
}).then((parseResponse)); | ||
} | ||
/** | ||
@@ -187,0 +195,0 @@ * Parsers |
{ | ||
"name": "telegram-bot-api-nodejs", | ||
"version": "1.0.28", | ||
"version": "1.0.29", | ||
"description": "Telegram Bot API client for nodejs", | ||
@@ -5,0 +5,0 @@ "type": "module", |
41487
1333
20