@effect-ak/tg-bot-client 0.5.3 → 0.5.4
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/dist/index.d.ts +319 -6
- package/package.json +9 -4
- package/readme.md +8 -9
package/dist/index.d.ts
CHANGED
|
@@ -47,6 +47,12 @@ declare class FetchUpdatesError extends FetchUpdatesError_base<{
|
|
|
47
47
|
}> {
|
|
48
48
|
}
|
|
49
49
|
|
|
50
|
+
interface AcceptedGiftTypes {
|
|
51
|
+
unlimited_gifts: boolean;
|
|
52
|
+
limited_gifts: boolean;
|
|
53
|
+
unique_gifts: boolean;
|
|
54
|
+
premium_subscription: boolean;
|
|
55
|
+
}
|
|
50
56
|
interface AffiliateInfo {
|
|
51
57
|
commission_per_mille: number;
|
|
52
58
|
amount: number;
|
|
@@ -160,13 +166,29 @@ interface BotName {
|
|
|
160
166
|
interface BotShortDescription {
|
|
161
167
|
short_description: string;
|
|
162
168
|
}
|
|
169
|
+
interface BusinessBotRights {
|
|
170
|
+
can_reply?: boolean;
|
|
171
|
+
can_read_messages?: boolean;
|
|
172
|
+
can_delete_outgoing_messages?: boolean;
|
|
173
|
+
can_delete_all_messages?: boolean;
|
|
174
|
+
can_edit_name?: boolean;
|
|
175
|
+
can_edit_bio?: boolean;
|
|
176
|
+
can_edit_profile_photo?: boolean;
|
|
177
|
+
can_edit_username?: boolean;
|
|
178
|
+
can_change_gift_settings?: boolean;
|
|
179
|
+
can_view_gifts_and_stars?: boolean;
|
|
180
|
+
can_convert_gifts_to_stars?: boolean;
|
|
181
|
+
can_transfer_and_upgrade_gifts?: boolean;
|
|
182
|
+
can_transfer_stars?: boolean;
|
|
183
|
+
can_manage_stories?: boolean;
|
|
184
|
+
}
|
|
163
185
|
interface BusinessConnection {
|
|
164
186
|
id: string;
|
|
165
187
|
user: User;
|
|
166
188
|
user_chat_id: number;
|
|
167
189
|
date: number;
|
|
168
|
-
can_reply: boolean;
|
|
169
190
|
is_enabled: boolean;
|
|
191
|
+
rights?: BusinessBotRights;
|
|
170
192
|
}
|
|
171
193
|
interface BusinessIntro {
|
|
172
194
|
title?: string;
|
|
@@ -269,6 +291,7 @@ interface ChatFullInfo {
|
|
|
269
291
|
type: "private" | "group" | "supergroup" | "channel";
|
|
270
292
|
accent_color_id: number;
|
|
271
293
|
max_reaction_count: number;
|
|
294
|
+
accepted_gift_types: AcceptedGiftTypes;
|
|
272
295
|
title?: string;
|
|
273
296
|
username?: string;
|
|
274
297
|
first_name?: string;
|
|
@@ -296,7 +319,6 @@ interface ChatFullInfo {
|
|
|
296
319
|
invite_link?: string;
|
|
297
320
|
pinned_message?: Message;
|
|
298
321
|
permissions?: ChatPermissions;
|
|
299
|
-
can_send_gift?: boolean;
|
|
300
322
|
can_send_paid_media?: boolean;
|
|
301
323
|
slow_mode_delay?: number;
|
|
302
324
|
unrestrict_boost_count?: number;
|
|
@@ -560,6 +582,16 @@ interface Gift {
|
|
|
560
582
|
total_count?: number;
|
|
561
583
|
remaining_count?: number;
|
|
562
584
|
}
|
|
585
|
+
interface GiftInfo {
|
|
586
|
+
gift: Gift;
|
|
587
|
+
owned_gift_id?: string;
|
|
588
|
+
convert_star_count?: number;
|
|
589
|
+
prepaid_upgrade_star_count?: number;
|
|
590
|
+
can_be_upgraded?: boolean;
|
|
591
|
+
text?: string;
|
|
592
|
+
entities?: MessageEntity[];
|
|
593
|
+
is_private?: boolean;
|
|
594
|
+
}
|
|
563
595
|
interface Gifts {
|
|
564
596
|
gifts: Gift[];
|
|
565
597
|
}
|
|
@@ -1016,13 +1048,35 @@ interface InputPollOption {
|
|
|
1016
1048
|
text_parse_mode?: "HTML" | "MarkdownV2";
|
|
1017
1049
|
text_entities?: MessageEntity[];
|
|
1018
1050
|
}
|
|
1051
|
+
type InputProfilePhoto = InputProfilePhotoStatic | InputProfilePhotoAnimated;
|
|
1052
|
+
interface InputProfilePhotoAnimated {
|
|
1053
|
+
type: "animated";
|
|
1054
|
+
animation: string;
|
|
1055
|
+
main_frame_timestamp?: number;
|
|
1056
|
+
}
|
|
1057
|
+
interface InputProfilePhotoStatic {
|
|
1058
|
+
type: "static";
|
|
1059
|
+
photo: string;
|
|
1060
|
+
}
|
|
1019
1061
|
interface InputSticker {
|
|
1020
|
-
sticker:
|
|
1062
|
+
sticker: string;
|
|
1021
1063
|
format: "static" | "animated" | "video";
|
|
1022
1064
|
emoji_list: string[];
|
|
1023
1065
|
mask_position?: MaskPosition;
|
|
1024
1066
|
keywords?: string[];
|
|
1025
1067
|
}
|
|
1068
|
+
type InputStoryContent = InputStoryContentPhoto | InputStoryContentVideo;
|
|
1069
|
+
interface InputStoryContentPhoto {
|
|
1070
|
+
type: "photo";
|
|
1071
|
+
photo: string;
|
|
1072
|
+
}
|
|
1073
|
+
interface InputStoryContentVideo {
|
|
1074
|
+
type: "video";
|
|
1075
|
+
video: string;
|
|
1076
|
+
duration?: number;
|
|
1077
|
+
cover_frame_timestamp?: number;
|
|
1078
|
+
is_animation?: boolean;
|
|
1079
|
+
}
|
|
1026
1080
|
interface InputTextMessageContent {
|
|
1027
1081
|
message_text: string;
|
|
1028
1082
|
parse_mode?: "HTML" | "MarkdownV2";
|
|
@@ -1099,6 +1153,12 @@ interface Location {
|
|
|
1099
1153
|
heading?: number;
|
|
1100
1154
|
proximity_alert_radius?: number;
|
|
1101
1155
|
}
|
|
1156
|
+
interface LocationAddress {
|
|
1157
|
+
country_code: string;
|
|
1158
|
+
state?: string;
|
|
1159
|
+
city?: string;
|
|
1160
|
+
street?: string;
|
|
1161
|
+
}
|
|
1102
1162
|
interface LoginUrl {
|
|
1103
1163
|
url: string;
|
|
1104
1164
|
forward_text?: string;
|
|
@@ -1147,6 +1207,7 @@ interface Message {
|
|
|
1147
1207
|
is_from_offline?: boolean;
|
|
1148
1208
|
media_group_id?: string;
|
|
1149
1209
|
author_signature?: string;
|
|
1210
|
+
paid_star_count?: number;
|
|
1150
1211
|
text?: string;
|
|
1151
1212
|
entities?: MessageEntity[];
|
|
1152
1213
|
link_preview_options?: LinkPreviewOptions;
|
|
@@ -1188,6 +1249,8 @@ interface Message {
|
|
|
1188
1249
|
refunded_payment?: RefundedPayment;
|
|
1189
1250
|
users_shared?: UsersShared;
|
|
1190
1251
|
chat_shared?: ChatShared;
|
|
1252
|
+
gift?: GiftInfo;
|
|
1253
|
+
unique_gift?: UniqueGiftInfo;
|
|
1191
1254
|
connected_website?: string;
|
|
1192
1255
|
write_access_allowed?: WriteAccessAllowed;
|
|
1193
1256
|
passport_data?: PassportData;
|
|
@@ -1204,6 +1267,7 @@ interface Message {
|
|
|
1204
1267
|
giveaway?: Giveaway;
|
|
1205
1268
|
giveaway_winners?: GiveawayWinners;
|
|
1206
1269
|
giveaway_completed?: GiveawayCompleted;
|
|
1270
|
+
paid_message_price_changed?: PaidMessagePriceChanged;
|
|
1207
1271
|
video_chat_scheduled?: VideoChatScheduled;
|
|
1208
1272
|
video_chat_started?: VideoChatStarted;
|
|
1209
1273
|
video_chat_ended?: VideoChatEnded;
|
|
@@ -1271,6 +1335,37 @@ interface OrderInfo {
|
|
|
1271
1335
|
email?: string;
|
|
1272
1336
|
shipping_address?: ShippingAddress;
|
|
1273
1337
|
}
|
|
1338
|
+
type OwnedGift = OwnedGiftRegular | OwnedGiftUnique;
|
|
1339
|
+
interface OwnedGiftRegular {
|
|
1340
|
+
type: "regular";
|
|
1341
|
+
gift: Gift;
|
|
1342
|
+
send_date: number;
|
|
1343
|
+
owned_gift_id?: string;
|
|
1344
|
+
sender_user?: User;
|
|
1345
|
+
text?: string;
|
|
1346
|
+
entities?: MessageEntity[];
|
|
1347
|
+
is_private?: boolean;
|
|
1348
|
+
is_saved?: boolean;
|
|
1349
|
+
can_be_upgraded?: boolean;
|
|
1350
|
+
was_refunded?: boolean;
|
|
1351
|
+
convert_star_count?: number;
|
|
1352
|
+
prepaid_upgrade_star_count?: number;
|
|
1353
|
+
}
|
|
1354
|
+
interface OwnedGifts {
|
|
1355
|
+
total_count: number;
|
|
1356
|
+
gifts: OwnedGift[];
|
|
1357
|
+
next_offset?: string;
|
|
1358
|
+
}
|
|
1359
|
+
interface OwnedGiftUnique {
|
|
1360
|
+
type: "unique";
|
|
1361
|
+
gift: UniqueGift;
|
|
1362
|
+
send_date: number;
|
|
1363
|
+
owned_gift_id?: string;
|
|
1364
|
+
sender_user?: User;
|
|
1365
|
+
is_saved?: boolean;
|
|
1366
|
+
can_be_transferred?: boolean;
|
|
1367
|
+
transfer_star_count?: number;
|
|
1368
|
+
}
|
|
1274
1369
|
type PaidMedia = PaidMediaPreview | PaidMediaPhoto | PaidMediaVideo;
|
|
1275
1370
|
interface PaidMediaInfo {
|
|
1276
1371
|
star_count: number;
|
|
@@ -1294,6 +1389,9 @@ interface PaidMediaVideo {
|
|
|
1294
1389
|
type: "video";
|
|
1295
1390
|
video: Video;
|
|
1296
1391
|
}
|
|
1392
|
+
interface PaidMessagePriceChanged {
|
|
1393
|
+
paid_message_star_count: number;
|
|
1394
|
+
}
|
|
1297
1395
|
interface PassportData {
|
|
1298
1396
|
data: EncryptedPassportElement[];
|
|
1299
1397
|
credentials: EncryptedCredentials;
|
|
@@ -1501,6 +1599,10 @@ interface ShippingQuery {
|
|
|
1501
1599
|
invoice_payload: string;
|
|
1502
1600
|
shipping_address: ShippingAddress;
|
|
1503
1601
|
}
|
|
1602
|
+
interface StarAmount {
|
|
1603
|
+
amount: number;
|
|
1604
|
+
nanostar_amount?: number;
|
|
1605
|
+
}
|
|
1504
1606
|
interface StarTransaction {
|
|
1505
1607
|
id: string;
|
|
1506
1608
|
amount: number;
|
|
@@ -1540,6 +1642,45 @@ interface Story {
|
|
|
1540
1642
|
chat: Chat;
|
|
1541
1643
|
id: number;
|
|
1542
1644
|
}
|
|
1645
|
+
interface StoryArea {
|
|
1646
|
+
position: StoryAreaPosition;
|
|
1647
|
+
type: StoryAreaType;
|
|
1648
|
+
}
|
|
1649
|
+
interface StoryAreaPosition {
|
|
1650
|
+
x_percentage: number;
|
|
1651
|
+
y_percentage: number;
|
|
1652
|
+
width_percentage: number;
|
|
1653
|
+
height_percentage: number;
|
|
1654
|
+
rotation_angle: number;
|
|
1655
|
+
corner_radius_percentage: number;
|
|
1656
|
+
}
|
|
1657
|
+
type StoryAreaType = StoryAreaTypeLocation | StoryAreaTypeSuggestedReaction | StoryAreaTypeLink | StoryAreaTypeWeather | StoryAreaTypeUniqueGift;
|
|
1658
|
+
interface StoryAreaTypeLink {
|
|
1659
|
+
type: "link";
|
|
1660
|
+
url: string;
|
|
1661
|
+
}
|
|
1662
|
+
interface StoryAreaTypeLocation {
|
|
1663
|
+
type: "location";
|
|
1664
|
+
latitude: number;
|
|
1665
|
+
longitude: number;
|
|
1666
|
+
address?: LocationAddress;
|
|
1667
|
+
}
|
|
1668
|
+
interface StoryAreaTypeSuggestedReaction {
|
|
1669
|
+
type: "suggested_reaction";
|
|
1670
|
+
reaction_type: ReactionType;
|
|
1671
|
+
is_dark?: boolean;
|
|
1672
|
+
is_flipped?: boolean;
|
|
1673
|
+
}
|
|
1674
|
+
interface StoryAreaTypeUniqueGift {
|
|
1675
|
+
type: "unique_gift";
|
|
1676
|
+
name: string;
|
|
1677
|
+
}
|
|
1678
|
+
interface StoryAreaTypeWeather {
|
|
1679
|
+
type: "weather";
|
|
1680
|
+
temperature: number;
|
|
1681
|
+
emoji: string;
|
|
1682
|
+
background_color: number;
|
|
1683
|
+
}
|
|
1543
1684
|
interface SuccessfulPayment {
|
|
1544
1685
|
currency: string;
|
|
1545
1686
|
total_amount: number;
|
|
@@ -1592,6 +1733,7 @@ interface TransactionPartnerTelegramApi {
|
|
|
1592
1733
|
}
|
|
1593
1734
|
interface TransactionPartnerUser {
|
|
1594
1735
|
type: "user";
|
|
1736
|
+
transaction_type: "invoice_payment" | "paid_media_payment" | "gift_purchase" | "premium_purchase" | "business_account_transfer";
|
|
1595
1737
|
user: User;
|
|
1596
1738
|
affiliate?: AffiliateInfo;
|
|
1597
1739
|
invoice_payload?: string;
|
|
@@ -1599,6 +1741,42 @@ interface TransactionPartnerUser {
|
|
|
1599
1741
|
paid_media?: PaidMedia[];
|
|
1600
1742
|
paid_media_payload?: string;
|
|
1601
1743
|
gift?: Gift;
|
|
1744
|
+
premium_subscription_duration?: number;
|
|
1745
|
+
}
|
|
1746
|
+
interface UniqueGift {
|
|
1747
|
+
base_name: string;
|
|
1748
|
+
name: string;
|
|
1749
|
+
number: number;
|
|
1750
|
+
model: UniqueGiftModel;
|
|
1751
|
+
symbol: UniqueGiftSymbol;
|
|
1752
|
+
backdrop: UniqueGiftBackdrop;
|
|
1753
|
+
}
|
|
1754
|
+
interface UniqueGiftBackdrop {
|
|
1755
|
+
name: string;
|
|
1756
|
+
colors: UniqueGiftBackdropColors;
|
|
1757
|
+
rarity_per_mille: number;
|
|
1758
|
+
}
|
|
1759
|
+
interface UniqueGiftBackdropColors {
|
|
1760
|
+
center_color: number;
|
|
1761
|
+
edge_color: number;
|
|
1762
|
+
symbol_color: number;
|
|
1763
|
+
text_color: number;
|
|
1764
|
+
}
|
|
1765
|
+
interface UniqueGiftInfo {
|
|
1766
|
+
gift: UniqueGift;
|
|
1767
|
+
origin: string;
|
|
1768
|
+
owned_gift_id?: string;
|
|
1769
|
+
transfer_star_count?: number;
|
|
1770
|
+
}
|
|
1771
|
+
interface UniqueGiftModel {
|
|
1772
|
+
name: string;
|
|
1773
|
+
sticker: Sticker;
|
|
1774
|
+
rarity_per_mille: number;
|
|
1775
|
+
}
|
|
1776
|
+
interface UniqueGiftSymbol {
|
|
1777
|
+
name: string;
|
|
1778
|
+
sticker: Sticker;
|
|
1779
|
+
rarity_per_mille: number;
|
|
1602
1780
|
}
|
|
1603
1781
|
interface Update {
|
|
1604
1782
|
update_id: number;
|
|
@@ -1736,6 +1914,7 @@ interface Api {
|
|
|
1736
1914
|
close(_: CloseInput): boolean;
|
|
1737
1915
|
close_forum_topic(_: CloseForumTopicInput): boolean;
|
|
1738
1916
|
close_general_forum_topic(_: CloseGeneralForumTopicInput): boolean;
|
|
1917
|
+
convert_gift_to_stars(_: ConvertGiftToStarsInput): boolean;
|
|
1739
1918
|
copy_message(_: CopyMessageInput): MessageId;
|
|
1740
1919
|
copy_messages(_: CopyMessagesInput): MessageId[];
|
|
1741
1920
|
create_chat_invite_link(_: CreateChatInviteLinkInput): ChatInviteLink;
|
|
@@ -1744,6 +1923,7 @@ interface Api {
|
|
|
1744
1923
|
create_invoice_link(_: CreateInvoiceLinkInput): string;
|
|
1745
1924
|
create_new_sticker_set(_: CreateNewStickerSetInput): boolean;
|
|
1746
1925
|
decline_chat_join_request(_: DeclineChatJoinRequestInput): boolean;
|
|
1926
|
+
delete_business_messages(_: DeleteBusinessMessagesInput): boolean;
|
|
1747
1927
|
delete_chat_photo(_: DeleteChatPhotoInput): boolean;
|
|
1748
1928
|
delete_chat_sticker_set(_: DeleteChatStickerSetInput): boolean;
|
|
1749
1929
|
delete_forum_topic(_: DeleteForumTopicInput): boolean;
|
|
@@ -1752,6 +1932,7 @@ interface Api {
|
|
|
1752
1932
|
delete_my_commands(_: DeleteMyCommandsInput): boolean;
|
|
1753
1933
|
delete_sticker_from_set(_: DeleteStickerFromSetInput): boolean;
|
|
1754
1934
|
delete_sticker_set(_: DeleteStickerSetInput): boolean;
|
|
1935
|
+
delete_story(_: DeleteStoryInput): boolean;
|
|
1755
1936
|
delete_webhook(_: DeleteWebhookInput): boolean;
|
|
1756
1937
|
edit_chat_invite_link(_: EditChatInviteLinkInput): ChatInviteLink;
|
|
1757
1938
|
edit_chat_subscription_invite_link(_: EditChatSubscriptionInviteLinkInput): ChatInviteLink;
|
|
@@ -1762,11 +1943,14 @@ interface Api {
|
|
|
1762
1943
|
edit_message_media(_: EditMessageMediaInput): Message | boolean;
|
|
1763
1944
|
edit_message_reply_markup(_: EditMessageReplyMarkupInput): Message | boolean;
|
|
1764
1945
|
edit_message_text(_: EditMessageTextInput): Message | boolean;
|
|
1946
|
+
edit_story(_: EditStoryInput): Story;
|
|
1765
1947
|
edit_user_star_subscription(_: EditUserStarSubscriptionInput): boolean;
|
|
1766
1948
|
export_chat_invite_link(_: ExportChatInviteLinkInput): string;
|
|
1767
1949
|
forward_message(_: ForwardMessageInput): Message;
|
|
1768
1950
|
forward_messages(_: ForwardMessagesInput): MessageId[];
|
|
1769
1951
|
get_available_gifts(_: GetAvailableGiftsInput): Gifts;
|
|
1952
|
+
get_business_account_gifts(_: GetBusinessAccountGiftsInput): OwnedGifts;
|
|
1953
|
+
get_business_account_star_balance(_: GetBusinessAccountStarBalanceInput): StarAmount;
|
|
1770
1954
|
get_business_connection(_: GetBusinessConnectionInput): BusinessConnection;
|
|
1771
1955
|
get_chat(_: GetChatInput): ChatFullInfo;
|
|
1772
1956
|
get_chat_administrators(_: GetChatAdministratorsInput): ChatMember[];
|
|
@@ -1789,12 +1973,16 @@ interface Api {
|
|
|
1789
1973
|
get_user_chat_boosts(_: GetUserChatBoostsInput): UserChatBoosts;
|
|
1790
1974
|
get_user_profile_photos(_: GetUserProfilePhotosInput): UserProfilePhotos;
|
|
1791
1975
|
get_webhook_info(_: GetWebhookInfoInput): WebhookInfo;
|
|
1976
|
+
gift_premium_subscription(_: GiftPremiumSubscriptionInput): boolean;
|
|
1792
1977
|
hide_general_forum_topic(_: HideGeneralForumTopicInput): boolean;
|
|
1793
1978
|
leave_chat(_: LeaveChatInput): boolean;
|
|
1794
1979
|
log_out(_: LogOutInput): boolean;
|
|
1795
1980
|
pin_chat_message(_: PinChatMessageInput): boolean;
|
|
1981
|
+
post_story(_: PostStoryInput): Story;
|
|
1796
1982
|
promote_chat_member(_: PromoteChatMemberInput): boolean;
|
|
1983
|
+
read_business_message(_: ReadBusinessMessageInput): boolean;
|
|
1797
1984
|
refund_star_payment(_: RefundStarPaymentInput): boolean;
|
|
1985
|
+
remove_business_account_profile_photo(_: RemoveBusinessAccountProfilePhotoInput): boolean;
|
|
1798
1986
|
remove_chat_verification(_: RemoveChatVerificationInput): boolean;
|
|
1799
1987
|
remove_user_verification(_: RemoveUserVerificationInput): boolean;
|
|
1800
1988
|
reopen_forum_topic(_: ReopenForumTopicInput): boolean;
|
|
@@ -1823,6 +2011,11 @@ interface Api {
|
|
|
1823
2011
|
send_video(_: SendVideoInput): Message;
|
|
1824
2012
|
send_video_note(_: SendVideoNoteInput): Message;
|
|
1825
2013
|
send_voice(_: SendVoiceInput): Message;
|
|
2014
|
+
set_business_account_bio(_: SetBusinessAccountBioInput): boolean;
|
|
2015
|
+
set_business_account_gift_settings(_: SetBusinessAccountGiftSettingsInput): boolean;
|
|
2016
|
+
set_business_account_name(_: SetBusinessAccountNameInput): boolean;
|
|
2017
|
+
set_business_account_profile_photo(_: SetBusinessAccountProfilePhotoInput): boolean;
|
|
2018
|
+
set_business_account_username(_: SetBusinessAccountUsernameInput): boolean;
|
|
1826
2019
|
set_chat_administrator_custom_title(_: SetChatAdministratorCustomTitleInput): boolean;
|
|
1827
2020
|
set_chat_description(_: SetChatDescriptionInput): boolean;
|
|
1828
2021
|
set_chat_menu_button(_: SetChatMenuButtonInput): boolean;
|
|
@@ -1849,6 +2042,8 @@ interface Api {
|
|
|
1849
2042
|
set_webhook(_: SetWebhookInput): boolean;
|
|
1850
2043
|
stop_message_live_location(_: StopMessageLiveLocationInput): Message | boolean;
|
|
1851
2044
|
stop_poll(_: StopPollInput): Poll;
|
|
2045
|
+
transfer_business_account_stars(_: TransferBusinessAccountStarsInput): boolean;
|
|
2046
|
+
transfer_gift(_: TransferGiftInput): boolean;
|
|
1852
2047
|
unban_chat_member(_: UnbanChatMemberInput): boolean;
|
|
1853
2048
|
unban_chat_sender_chat(_: UnbanChatSenderChatInput): boolean;
|
|
1854
2049
|
unhide_general_forum_topic(_: UnhideGeneralForumTopicInput): boolean;
|
|
@@ -1856,6 +2051,7 @@ interface Api {
|
|
|
1856
2051
|
unpin_all_forum_topic_messages(_: UnpinAllForumTopicMessagesInput): boolean;
|
|
1857
2052
|
unpin_all_general_forum_topic_messages(_: UnpinAllGeneralForumTopicMessagesInput): boolean;
|
|
1858
2053
|
unpin_chat_message(_: UnpinChatMessageInput): boolean;
|
|
2054
|
+
upgrade_gift(_: UpgradeGiftInput): boolean;
|
|
1859
2055
|
upload_sticker_file(_: UploadStickerFileInput): File$1;
|
|
1860
2056
|
verify_chat(_: VerifyChatInput): boolean;
|
|
1861
2057
|
verify_user(_: VerifyUserInput): boolean;
|
|
@@ -1918,6 +2114,10 @@ interface CloseForumTopicInput {
|
|
|
1918
2114
|
interface CloseGeneralForumTopicInput {
|
|
1919
2115
|
chat_id: number | string;
|
|
1920
2116
|
}
|
|
2117
|
+
interface ConvertGiftToStarsInput {
|
|
2118
|
+
business_connection_id: string;
|
|
2119
|
+
owned_gift_id: string;
|
|
2120
|
+
}
|
|
1921
2121
|
interface CopyMessageInput {
|
|
1922
2122
|
chat_id: number | string;
|
|
1923
2123
|
from_chat_id: number | string;
|
|
@@ -1998,6 +2198,10 @@ interface DeclineChatJoinRequestInput {
|
|
|
1998
2198
|
chat_id: number | string;
|
|
1999
2199
|
user_id: number;
|
|
2000
2200
|
}
|
|
2201
|
+
interface DeleteBusinessMessagesInput {
|
|
2202
|
+
business_connection_id: string;
|
|
2203
|
+
message_ids: number[];
|
|
2204
|
+
}
|
|
2001
2205
|
interface DeleteChatPhotoInput {
|
|
2002
2206
|
chat_id: number | string;
|
|
2003
2207
|
}
|
|
@@ -2026,6 +2230,10 @@ interface DeleteStickerFromSetInput {
|
|
|
2026
2230
|
interface DeleteStickerSetInput {
|
|
2027
2231
|
name: string;
|
|
2028
2232
|
}
|
|
2233
|
+
interface DeleteStoryInput {
|
|
2234
|
+
business_connection_id: string;
|
|
2235
|
+
story_id: number;
|
|
2236
|
+
}
|
|
2029
2237
|
interface DeleteWebhookInput {
|
|
2030
2238
|
drop_pending_updates?: boolean;
|
|
2031
2239
|
}
|
|
@@ -2102,6 +2310,15 @@ interface EditMessageTextInput {
|
|
|
2102
2310
|
link_preview_options?: LinkPreviewOptions;
|
|
2103
2311
|
reply_markup?: InlineKeyboardMarkup;
|
|
2104
2312
|
}
|
|
2313
|
+
interface EditStoryInput {
|
|
2314
|
+
business_connection_id: string;
|
|
2315
|
+
story_id: number;
|
|
2316
|
+
content: InputStoryContent;
|
|
2317
|
+
caption?: string;
|
|
2318
|
+
parse_mode?: "HTML" | "MarkdownV2";
|
|
2319
|
+
caption_entities?: MessageEntity[];
|
|
2320
|
+
areas?: StoryArea[];
|
|
2321
|
+
}
|
|
2105
2322
|
interface EditUserStarSubscriptionInput {
|
|
2106
2323
|
user_id: number;
|
|
2107
2324
|
telegram_payment_charge_id: string;
|
|
@@ -2129,6 +2346,20 @@ interface ForwardMessagesInput {
|
|
|
2129
2346
|
}
|
|
2130
2347
|
interface GetAvailableGiftsInput {
|
|
2131
2348
|
}
|
|
2349
|
+
interface GetBusinessAccountGiftsInput {
|
|
2350
|
+
business_connection_id: string;
|
|
2351
|
+
exclude_unsaved?: boolean;
|
|
2352
|
+
exclude_saved?: boolean;
|
|
2353
|
+
exclude_unlimited?: boolean;
|
|
2354
|
+
exclude_limited?: boolean;
|
|
2355
|
+
exclude_unique?: boolean;
|
|
2356
|
+
sort_by_price?: boolean;
|
|
2357
|
+
offset?: string;
|
|
2358
|
+
limit?: number;
|
|
2359
|
+
}
|
|
2360
|
+
interface GetBusinessAccountStarBalanceInput {
|
|
2361
|
+
business_connection_id: string;
|
|
2362
|
+
}
|
|
2132
2363
|
interface GetBusinessConnectionInput {
|
|
2133
2364
|
business_connection_id: string;
|
|
2134
2365
|
}
|
|
@@ -2204,6 +2435,14 @@ interface GetUserProfilePhotosInput {
|
|
|
2204
2435
|
}
|
|
2205
2436
|
interface GetWebhookInfoInput {
|
|
2206
2437
|
}
|
|
2438
|
+
interface GiftPremiumSubscriptionInput {
|
|
2439
|
+
user_id: number;
|
|
2440
|
+
month_count: number;
|
|
2441
|
+
star_count: number;
|
|
2442
|
+
text?: string;
|
|
2443
|
+
text_parse_mode?: "HTML" | "MarkdownV2";
|
|
2444
|
+
text_entities?: MessageEntity[];
|
|
2445
|
+
}
|
|
2207
2446
|
interface HideGeneralForumTopicInput {
|
|
2208
2447
|
chat_id: number | string;
|
|
2209
2448
|
}
|
|
@@ -2218,6 +2457,17 @@ interface PinChatMessageInput {
|
|
|
2218
2457
|
business_connection_id?: string;
|
|
2219
2458
|
disable_notification?: boolean;
|
|
2220
2459
|
}
|
|
2460
|
+
interface PostStoryInput {
|
|
2461
|
+
business_connection_id: string;
|
|
2462
|
+
content: InputStoryContent;
|
|
2463
|
+
active_period: number;
|
|
2464
|
+
caption?: string;
|
|
2465
|
+
parse_mode?: "HTML" | "MarkdownV2";
|
|
2466
|
+
caption_entities?: MessageEntity[];
|
|
2467
|
+
areas?: StoryArea[];
|
|
2468
|
+
post_to_chat_page?: boolean;
|
|
2469
|
+
protect_content?: boolean;
|
|
2470
|
+
}
|
|
2221
2471
|
interface PromoteChatMemberInput {
|
|
2222
2472
|
chat_id: number | string;
|
|
2223
2473
|
user_id: number;
|
|
@@ -2237,10 +2487,19 @@ interface PromoteChatMemberInput {
|
|
|
2237
2487
|
can_pin_messages?: boolean;
|
|
2238
2488
|
can_manage_topics?: boolean;
|
|
2239
2489
|
}
|
|
2490
|
+
interface ReadBusinessMessageInput {
|
|
2491
|
+
business_connection_id: string;
|
|
2492
|
+
chat_id: number;
|
|
2493
|
+
message_id: number;
|
|
2494
|
+
}
|
|
2240
2495
|
interface RefundStarPaymentInput {
|
|
2241
2496
|
user_id: number;
|
|
2242
2497
|
telegram_payment_charge_id: string;
|
|
2243
2498
|
}
|
|
2499
|
+
interface RemoveBusinessAccountProfilePhotoInput {
|
|
2500
|
+
business_connection_id: string;
|
|
2501
|
+
is_public?: boolean;
|
|
2502
|
+
}
|
|
2244
2503
|
interface RemoveChatVerificationInput {
|
|
2245
2504
|
chat_id: number | string;
|
|
2246
2505
|
}
|
|
@@ -2609,6 +2868,29 @@ interface SendVoiceInput {
|
|
|
2609
2868
|
reply_parameters?: ReplyParameters;
|
|
2610
2869
|
reply_markup?: InlineKeyboardMarkup | ReplyKeyboardMarkup | ReplyKeyboardRemove | ForceReply;
|
|
2611
2870
|
}
|
|
2871
|
+
interface SetBusinessAccountBioInput {
|
|
2872
|
+
business_connection_id: string;
|
|
2873
|
+
bio?: string;
|
|
2874
|
+
}
|
|
2875
|
+
interface SetBusinessAccountGiftSettingsInput {
|
|
2876
|
+
business_connection_id: string;
|
|
2877
|
+
show_gift_button: boolean;
|
|
2878
|
+
accepted_gift_types: AcceptedGiftTypes;
|
|
2879
|
+
}
|
|
2880
|
+
interface SetBusinessAccountNameInput {
|
|
2881
|
+
business_connection_id: string;
|
|
2882
|
+
first_name: string;
|
|
2883
|
+
last_name?: string;
|
|
2884
|
+
}
|
|
2885
|
+
interface SetBusinessAccountProfilePhotoInput {
|
|
2886
|
+
business_connection_id: string;
|
|
2887
|
+
photo: InputProfilePhoto;
|
|
2888
|
+
is_public?: boolean;
|
|
2889
|
+
}
|
|
2890
|
+
interface SetBusinessAccountUsernameInput {
|
|
2891
|
+
business_connection_id: string;
|
|
2892
|
+
username?: string;
|
|
2893
|
+
}
|
|
2612
2894
|
interface SetChatAdministratorCustomTitleInput {
|
|
2613
2895
|
chat_id: number | string;
|
|
2614
2896
|
user_id: number;
|
|
@@ -2736,6 +3018,16 @@ interface StopPollInput {
|
|
|
2736
3018
|
business_connection_id?: string;
|
|
2737
3019
|
reply_markup?: InlineKeyboardMarkup;
|
|
2738
3020
|
}
|
|
3021
|
+
interface TransferBusinessAccountStarsInput {
|
|
3022
|
+
business_connection_id: string;
|
|
3023
|
+
star_count: number;
|
|
3024
|
+
}
|
|
3025
|
+
interface TransferGiftInput {
|
|
3026
|
+
business_connection_id: string;
|
|
3027
|
+
owned_gift_id: string;
|
|
3028
|
+
new_owner_chat_id: number;
|
|
3029
|
+
star_count?: number;
|
|
3030
|
+
}
|
|
2739
3031
|
interface UnbanChatMemberInput {
|
|
2740
3032
|
chat_id: number | string;
|
|
2741
3033
|
user_id: number;
|
|
@@ -2763,6 +3055,12 @@ interface UnpinChatMessageInput {
|
|
|
2763
3055
|
business_connection_id?: string;
|
|
2764
3056
|
message_id?: number;
|
|
2765
3057
|
}
|
|
3058
|
+
interface UpgradeGiftInput {
|
|
3059
|
+
business_connection_id: string;
|
|
3060
|
+
owned_gift_id: string;
|
|
3061
|
+
keep_original_details?: boolean;
|
|
3062
|
+
star_count?: number;
|
|
3063
|
+
}
|
|
2766
3064
|
interface UploadStickerFileInput {
|
|
2767
3065
|
user_id: number;
|
|
2768
3066
|
sticker: InputFile;
|
|
@@ -2991,6 +3289,8 @@ interface TgWebApp {
|
|
|
2991
3289
|
DeviceOrientation: DeviceOrientation;
|
|
2992
3290
|
Gyroscope: Gyroscope;
|
|
2993
3291
|
LocationManager: LocationManager;
|
|
3292
|
+
DeviceStorage: DeviceStorage;
|
|
3293
|
+
SecureStorage: SecureStorage;
|
|
2994
3294
|
isVersionAtLeast: (version: string) => boolean;
|
|
2995
3295
|
setHeaderColor: (color: string) => void;
|
|
2996
3296
|
setBackgroundColor: (color: string) => void;
|
|
@@ -3044,8 +3344,8 @@ interface AccelerometerStartParams {
|
|
|
3044
3344
|
}
|
|
3045
3345
|
interface BackButton {
|
|
3046
3346
|
isVisible: boolean;
|
|
3047
|
-
onClick:
|
|
3048
|
-
offClick:
|
|
3347
|
+
onClick: EventHandlers["backButtonClicked"];
|
|
3348
|
+
offClick: EventHandlers["backButtonClicked"];
|
|
3049
3349
|
show: () => BackButton;
|
|
3050
3350
|
hide: () => BackButton;
|
|
3051
3351
|
}
|
|
@@ -3124,6 +3424,12 @@ interface DeviceOrientationStartParams {
|
|
|
3124
3424
|
refresh_rate?: number;
|
|
3125
3425
|
need_absolute?: boolean;
|
|
3126
3426
|
}
|
|
3427
|
+
interface DeviceStorage {
|
|
3428
|
+
setItem: (key: string, value: string, callback?: (error: unknown | null, isStored: boolean) => void) => DeviceStorage;
|
|
3429
|
+
getItem: (key: string, callback: (error: unknown | null, value: string | null) => void) => DeviceStorage;
|
|
3430
|
+
removeItem: (key: string, callback?: (error: unknown | null, isRemoved: boolean) => void) => DeviceStorage;
|
|
3431
|
+
clear: (callback?: (error: unknown | null, isCleared: boolean) => void) => DeviceStorage;
|
|
3432
|
+
}
|
|
3127
3433
|
interface DownloadFileParams {
|
|
3128
3434
|
url: string;
|
|
3129
3435
|
file_name: string;
|
|
@@ -3186,6 +3492,13 @@ interface SafeAreaInset {
|
|
|
3186
3492
|
interface ScanQrPopupParams {
|
|
3187
3493
|
text?: string;
|
|
3188
3494
|
}
|
|
3495
|
+
interface SecureStorage {
|
|
3496
|
+
setItem: (key: string, value: string, callback?: (error: unknown | null, isStored: boolean) => void) => SecureStorage;
|
|
3497
|
+
getItem: (key: string, callback: (error: unknown | null, value: string | null, canBeRestored: boolean) => void) => SecureStorage;
|
|
3498
|
+
restoreItem: (key: string, callback?: (error: unknown | null, value: string | null) => void) => SecureStorage;
|
|
3499
|
+
removeItem: (key: string, callback?: (error: unknown | null, isRemoved: boolean) => void) => SecureStorage;
|
|
3500
|
+
clear: (callback?: (error: unknown | null, isCleared: boolean) => void) => SecureStorage;
|
|
3501
|
+
}
|
|
3189
3502
|
interface SettingsButton {
|
|
3190
3503
|
isVisible: boolean;
|
|
3191
3504
|
onClick: (callback: () => void) => SettingsButton;
|
|
@@ -3264,4 +3577,4 @@ type MessageEffect = keyof typeof MESSAGE_EFFECTS;
|
|
|
3264
3577
|
declare const messageEffectIdCodes: MessageEffect[];
|
|
3265
3578
|
declare const isMessageEffect: (input: unknown) => input is MessageEffect;
|
|
3266
3579
|
|
|
3267
|
-
export { type Accelerometer, type AccelerometerStartParams, type AddStickerToSetInput, type AffiliateInfo, type Animation, type AnswerCallbackQueryInput, type AnswerInlineQueryInput, type AnswerPreCheckoutQueryInput, type AnswerShippingQueryInput, type AnswerWebAppQueryInput, type Api, type ApproveChatJoinRequestInput, type Audio, type AvailableUpdateTypes, type BackButton, type BackgroundFill, type BackgroundFillFreeformGradient, type BackgroundFillGradient, type BackgroundFillSolid, type BackgroundType, type BackgroundTypeChatTheme, type BackgroundTypeFill, type BackgroundTypePattern, type BackgroundTypeWallpaper, type BanChatMemberInput, type BanChatSenderChatInput, type BiometricAuthenticateParams, type BiometricManager, type BiometricRequestAccessParams, type Birthdate, type BotBatchMode, type BotCommand, type BotCommandScope, type BotCommandScopeAllChatAdministrators, type BotCommandScopeAllGroupChats, type BotCommandScopeAllPrivateChats, type BotCommandScopeChat, type BotCommandScopeChatAdministrators, type BotCommandScopeChatMember, type BotCommandScopeDefault, type BotDescription, type BotInstance, type BotMode, type BotName, BotResponse, BotRunService, type BotShortDescription, type BotSingleMode, BotUpdateHandlersTag, type BotUpdatesHandlers, type BottomButton, type BusinessConnection, type BusinessIntro, type BusinessLocation, type BusinessMessagesDeleted, type BusinessOpeningHours, type BusinessOpeningHoursInterval, type CallbackGame, type CallbackQuery, type Chat, type ChatAdministratorRights, type ChatBackground, type ChatBoost, type ChatBoostAdded, type ChatBoostRemoved, type ChatBoostSource, type ChatBoostSourceGiftCode, type ChatBoostSourceGiveaway, type ChatBoostSourcePremium, type ChatBoostUpdated, type ChatFullInfo, type ChatInviteLink, type ChatJoinRequest, type ChatLocation, type ChatMember, type ChatMemberAdministrator, type ChatMemberBanned, type ChatMemberLeft, type ChatMemberMember, type ChatMemberOwner, type ChatMemberRestricted, type ChatMemberUpdated, type ChatPermissions, type ChatPhoto, type ChatShared, type ChosenInlineResult, type CloseForumTopicInput, type CloseGeneralForumTopicInput, type CloseInput, type CloudStorage, type Contact, type ContentSafeAreaInset, type CopyMessageInput, type CopyMessagesInput, type CopyTextButton, type CreateChatInviteLinkInput, type CreateChatSubscriptionInviteLinkInput, type CreateForumTopicInput, type CreateInvoiceLinkInput, type CreateNewStickerSetInput, type DeclineChatJoinRequestInput, type DeleteChatPhotoInput, type DeleteChatStickerSetInput, type DeleteForumTopicInput, type DeleteMessageInput, type DeleteMessagesInput, type DeleteMyCommandsInput, type DeleteStickerFromSetInput, type DeleteStickerSetInput, type DeleteWebhookInput, type DeviceOrientation, type DeviceOrientationStartParams, type Dice, type Document, type DownloadFileParams, type EditChatInviteLinkInput, type EditChatSubscriptionInviteLinkInput, type EditForumTopicInput, type EditGeneralForumTopicInput, type EditMessageCaptionInput, type EditMessageLiveLocationInput, type EditMessageMediaInput, type EditMessageReplyMarkupInput, type EditMessageTextInput, type EditUserStarSubscriptionInput, type EmojiStatusParams, type EncryptedCredentials, type EncryptedPassportElement, type ExportChatInviteLinkInput, type ExternalReplyInfo, type File$1 as File, type ForceReply, type ForumTopic, type ForumTopicClosed, type ForumTopicCreated, type ForumTopicEdited, type ForumTopicReopened, type ForwardMessageInput, type ForwardMessagesInput, type Game, type GameHighScore, type GeneralForumTopicHidden, type GeneralForumTopicUnhidden, type GetAvailableGiftsInput, type GetBusinessConnectionInput, type GetChatAdministratorsInput, type GetChatInput, type GetChatMemberCountInput, type GetChatMemberInput, type GetChatMenuButtonInput, type GetCustomEmojiStickersInput, type GetFileInput, type GetForumTopicIconStickersInput, type GetGameHighScoresInput, type GetMeInput, type GetMyCommandsInput, type GetMyDefaultAdministratorRightsInput, type GetMyDescriptionInput, type GetMyNameInput, type GetMyShortDescriptionInput, type GetStarTransactionsInput, type GetStickerSetInput, type GetUpdatesInput, type GetUserChatBoostsInput, type GetUserProfilePhotosInput, type GetWebhookInfoInput, type Gift, type Gifts, type Giveaway, type GiveawayCompleted, type GiveawayCreated, type GiveawayWinners, type Gyroscope, type GyroscopeStartParams, type HandleBatchUpdateFunction, type HandleUpdateFunction, type HapticFeedback, type HideGeneralForumTopicInput, type InaccessibleMessage, type InlineKeyboardButton, type InlineKeyboardMarkup, type InlineQuery, type InlineQueryResult, type InlineQueryResultArticle, type InlineQueryResultAudio, type InlineQueryResultCachedAudio, type InlineQueryResultCachedDocument, type InlineQueryResultCachedGif, type InlineQueryResultCachedMpeg4Gif, type InlineQueryResultCachedPhoto, type InlineQueryResultCachedSticker, type InlineQueryResultCachedVideo, type InlineQueryResultCachedVoice, type InlineQueryResultContact, type InlineQueryResultDocument, type InlineQueryResultGame, type InlineQueryResultGif, type InlineQueryResultLocation, type InlineQueryResultMpeg4Gif, type InlineQueryResultPhoto, type InlineQueryResultVenue, type InlineQueryResultVideo, type InlineQueryResultVoice, type InlineQueryResultsButton, type InputContactMessageContent, type InputFile, type InputInvoiceMessageContent, type InputLocationMessageContent, type InputMedia, type InputMediaAnimation, type InputMediaAudio, type InputMediaDocument, type InputMediaPhoto, type InputMediaVideo, type InputMessageContent, type InputPaidMedia, type InputPaidMediaPhoto, type InputPaidMediaVideo, type InputPollOption, type InputSticker, type InputTextMessageContent, type InputVenueMessageContent, type Invoice, type KeyboardButton, type KeyboardButtonPollType, type KeyboardButtonRequestChat, type KeyboardButtonRequestUsers, type LabeledPrice, type LeaveChatInput, type LinkPreviewOptions, type Location, type LocationData, type LocationManager, type LogOutInput, type LoginUrl, MESSAGE_EFFECTS, type MaskPosition, type MaybeInaccessibleMessage, type MenuButton, type MenuButtonCommands, type MenuButtonDefault, type MenuButtonWebApp, type Message, type MessageAutoDeleteTimerChanged, type MessageEffect, type MessageEntity, type MessageId, type MessageOrigin, type MessageOriginChannel, type MessageOriginChat, type MessageOriginHiddenUser, type MessageOriginUser, type MessageReactionCountUpdated, type MessageReactionUpdated, type OrderInfo, type PaidMedia, type PaidMediaInfo, type PaidMediaPhoto, type PaidMediaPreview, type PaidMediaPurchased, type PaidMediaVideo, type PassportData, type PassportElementError, type PassportElementErrorDataField, type PassportElementErrorFile, type PassportElementErrorFiles, type PassportElementErrorFrontSide, type PassportElementErrorReverseSide, type PassportElementErrorSelfie, type PassportElementErrorTranslationFile, type PassportElementErrorTranslationFiles, type PassportElementErrorUnspecified, type PassportFile, type PhotoSize, type PinChatMessageInput, type Poll, type PollAnswer, type PollOption, type PopupButton, type PopupParams, type PreCheckoutQuery, type PreparedInlineMessage, type PromoteChatMemberInput, type ProximityAlertTriggered, type ReactionCount, type ReactionType, type ReactionTypeCustomEmoji, type ReactionTypeEmoji, type ReactionTypePaid, type RefundStarPaymentInput, type RefundedPayment, type RemoveChatVerificationInput, type RemoveUserVerificationInput, type ReopenForumTopicInput, type ReopenGeneralForumTopicInput, type ReplaceStickerInSetInput, type ReplyKeyboardMarkup, type ReplyKeyboardRemove, type ReplyParameters, type ResponseParameters, type RestrictChatMemberInput, type RevenueWithdrawalState, type RevenueWithdrawalStateFailed, type RevenueWithdrawalStatePending, type RevenueWithdrawalStateSucceeded, type RevokeChatInviteLinkInput, type SafeAreaInset, type SavePreparedInlineMessageInput, type ScanQrPopupParams, type SendAnimationInput, type SendAudioInput, type SendChatActionInput, type SendContactInput, type SendDiceInput, type SendDocumentInput, type SendGameInput, type SendGiftInput, type SendInvoiceInput, type SendLocationInput, type SendMediaGroupInput, type SendMessageInput, type SendPaidMediaInput, type SendPhotoInput, type SendPollInput, type SendStickerInput, type SendVenueInput, type SendVideoInput, type SendVideoNoteInput, type SendVoiceInput, type SentWebAppMessage, type SetChatAdministratorCustomTitleInput, type SetChatDescriptionInput, type SetChatMenuButtonInput, type SetChatPermissionsInput, type SetChatPhotoInput, type SetChatStickerSetInput, type SetChatTitleInput, type SetCustomEmojiStickerSetThumbnailInput, type SetGameScoreInput, type SetMessageReactionInput, type SetMyCommandsInput, type SetMyDefaultAdministratorRightsInput, type SetMyDescriptionInput, type SetMyNameInput, type SetMyShortDescriptionInput, type SetPassportDataErrorsInput, type SetStickerEmojiListInput, type SetStickerKeywordsInput, type SetStickerMaskPositionInput, type SetStickerPositionInSetInput, type SetStickerSetThumbnailInput, type SetStickerSetTitleInput, type SetUserEmojiStatusInput, type SetWebhookInput, type SettingsButton, type SharedUser, type ShippingAddress, type ShippingOption, type ShippingQuery, type StarTransaction, type StarTransactions, type Sticker, type StickerSet, type StopMessageLiveLocationInput, type StopPollInput, type Story, type StoryShareParams, type StoryWidgetLink, type SuccessfulPayment, type SwitchInlineQueryChosenChat, type TextQuote, type TgBotClient, type TgWebApp, type ThemeParams, type TransactionPartner, type TransactionPartnerAffiliateProgram, type TransactionPartnerChat, type TransactionPartnerFragment, type TransactionPartnerOther, type TransactionPartnerTelegramAds, type TransactionPartnerTelegramApi, type TransactionPartnerUser, type UnbanChatMemberInput, type UnbanChatSenderChatInput, type UnhideGeneralForumTopicInput, type UnpinAllChatMessagesInput, type UnpinAllForumTopicMessagesInput, type UnpinAllGeneralForumTopicMessagesInput, type UnpinChatMessageInput, type Update, type UploadStickerFileInput, type User, type UserChatBoosts, type UserProfilePhotos, type UsersShared, type Venue, type VerifyChatInput, type VerifyUserInput, type Video, type VideoChatEnded, type VideoChatParticipantsInvited, type VideoChatScheduled, type VideoChatStarted, type VideoNote, type Voice, type WebAppChat, type WebAppData, type WebAppInfo, type WebAppInitData, type WebAppUser, type WebhookInfo, type WriteAccessAllowed, defaultBaseUrl, defineBot, isMessageEffect, launchBot, makeTgBotClient, messageEffectIdCodes, runTgChatBot };
|
|
3580
|
+
export { type Accelerometer, type AccelerometerStartParams, type AcceptedGiftTypes, type AddStickerToSetInput, type AffiliateInfo, type Animation, type AnswerCallbackQueryInput, type AnswerInlineQueryInput, type AnswerPreCheckoutQueryInput, type AnswerShippingQueryInput, type AnswerWebAppQueryInput, type Api, type ApproveChatJoinRequestInput, type Audio, type AvailableUpdateTypes, type BackButton, type BackgroundFill, type BackgroundFillFreeformGradient, type BackgroundFillGradient, type BackgroundFillSolid, type BackgroundType, type BackgroundTypeChatTheme, type BackgroundTypeFill, type BackgroundTypePattern, type BackgroundTypeWallpaper, type BanChatMemberInput, type BanChatSenderChatInput, type BiometricAuthenticateParams, type BiometricManager, type BiometricRequestAccessParams, type Birthdate, type BotBatchMode, type BotCommand, type BotCommandScope, type BotCommandScopeAllChatAdministrators, type BotCommandScopeAllGroupChats, type BotCommandScopeAllPrivateChats, type BotCommandScopeChat, type BotCommandScopeChatAdministrators, type BotCommandScopeChatMember, type BotCommandScopeDefault, type BotDescription, type BotInstance, type BotMode, type BotName, BotResponse, BotRunService, type BotShortDescription, type BotSingleMode, BotUpdateHandlersTag, type BotUpdatesHandlers, type BottomButton, type BusinessBotRights, type BusinessConnection, type BusinessIntro, type BusinessLocation, type BusinessMessagesDeleted, type BusinessOpeningHours, type BusinessOpeningHoursInterval, type CallbackGame, type CallbackQuery, type Chat, type ChatAdministratorRights, type ChatBackground, type ChatBoost, type ChatBoostAdded, type ChatBoostRemoved, type ChatBoostSource, type ChatBoostSourceGiftCode, type ChatBoostSourceGiveaway, type ChatBoostSourcePremium, type ChatBoostUpdated, type ChatFullInfo, type ChatInviteLink, type ChatJoinRequest, type ChatLocation, type ChatMember, type ChatMemberAdministrator, type ChatMemberBanned, type ChatMemberLeft, type ChatMemberMember, type ChatMemberOwner, type ChatMemberRestricted, type ChatMemberUpdated, type ChatPermissions, type ChatPhoto, type ChatShared, type ChosenInlineResult, type CloseForumTopicInput, type CloseGeneralForumTopicInput, type CloseInput, type CloudStorage, type Contact, type ContentSafeAreaInset, type ConvertGiftToStarsInput, type CopyMessageInput, type CopyMessagesInput, type CopyTextButton, type CreateChatInviteLinkInput, type CreateChatSubscriptionInviteLinkInput, type CreateForumTopicInput, type CreateInvoiceLinkInput, type CreateNewStickerSetInput, type DeclineChatJoinRequestInput, type DeleteBusinessMessagesInput, type DeleteChatPhotoInput, type DeleteChatStickerSetInput, type DeleteForumTopicInput, type DeleteMessageInput, type DeleteMessagesInput, type DeleteMyCommandsInput, type DeleteStickerFromSetInput, type DeleteStickerSetInput, type DeleteStoryInput, type DeleteWebhookInput, type DeviceOrientation, type DeviceOrientationStartParams, type DeviceStorage, type Dice, type Document, type DownloadFileParams, type EditChatInviteLinkInput, type EditChatSubscriptionInviteLinkInput, type EditForumTopicInput, type EditGeneralForumTopicInput, type EditMessageCaptionInput, type EditMessageLiveLocationInput, type EditMessageMediaInput, type EditMessageReplyMarkupInput, type EditMessageTextInput, type EditStoryInput, type EditUserStarSubscriptionInput, type EmojiStatusParams, type EncryptedCredentials, type EncryptedPassportElement, type ExportChatInviteLinkInput, type ExternalReplyInfo, type File$1 as File, type ForceReply, type ForumTopic, type ForumTopicClosed, type ForumTopicCreated, type ForumTopicEdited, type ForumTopicReopened, type ForwardMessageInput, type ForwardMessagesInput, type Game, type GameHighScore, type GeneralForumTopicHidden, type GeneralForumTopicUnhidden, type GetAvailableGiftsInput, type GetBusinessAccountGiftsInput, type GetBusinessAccountStarBalanceInput, type GetBusinessConnectionInput, type GetChatAdministratorsInput, type GetChatInput, type GetChatMemberCountInput, type GetChatMemberInput, type GetChatMenuButtonInput, type GetCustomEmojiStickersInput, type GetFileInput, type GetForumTopicIconStickersInput, type GetGameHighScoresInput, type GetMeInput, type GetMyCommandsInput, type GetMyDefaultAdministratorRightsInput, type GetMyDescriptionInput, type GetMyNameInput, type GetMyShortDescriptionInput, type GetStarTransactionsInput, type GetStickerSetInput, type GetUpdatesInput, type GetUserChatBoostsInput, type GetUserProfilePhotosInput, type GetWebhookInfoInput, type Gift, type GiftInfo, type GiftPremiumSubscriptionInput, type Gifts, type Giveaway, type GiveawayCompleted, type GiveawayCreated, type GiveawayWinners, type Gyroscope, type GyroscopeStartParams, type HandleBatchUpdateFunction, type HandleUpdateFunction, type HapticFeedback, type HideGeneralForumTopicInput, type InaccessibleMessage, type InlineKeyboardButton, type InlineKeyboardMarkup, type InlineQuery, type InlineQueryResult, type InlineQueryResultArticle, type InlineQueryResultAudio, type InlineQueryResultCachedAudio, type InlineQueryResultCachedDocument, type InlineQueryResultCachedGif, type InlineQueryResultCachedMpeg4Gif, type InlineQueryResultCachedPhoto, type InlineQueryResultCachedSticker, type InlineQueryResultCachedVideo, type InlineQueryResultCachedVoice, type InlineQueryResultContact, type InlineQueryResultDocument, type InlineQueryResultGame, type InlineQueryResultGif, type InlineQueryResultLocation, type InlineQueryResultMpeg4Gif, type InlineQueryResultPhoto, type InlineQueryResultVenue, type InlineQueryResultVideo, type InlineQueryResultVoice, type InlineQueryResultsButton, type InputContactMessageContent, type InputFile, type InputInvoiceMessageContent, type InputLocationMessageContent, type InputMedia, type InputMediaAnimation, type InputMediaAudio, type InputMediaDocument, type InputMediaPhoto, type InputMediaVideo, type InputMessageContent, type InputPaidMedia, type InputPaidMediaPhoto, type InputPaidMediaVideo, type InputPollOption, type InputProfilePhoto, type InputProfilePhotoAnimated, type InputProfilePhotoStatic, type InputSticker, type InputStoryContent, type InputStoryContentPhoto, type InputStoryContentVideo, type InputTextMessageContent, type InputVenueMessageContent, type Invoice, type KeyboardButton, type KeyboardButtonPollType, type KeyboardButtonRequestChat, type KeyboardButtonRequestUsers, type LabeledPrice, type LeaveChatInput, type LinkPreviewOptions, type Location, type LocationAddress, type LocationData, type LocationManager, type LogOutInput, type LoginUrl, MESSAGE_EFFECTS, type MaskPosition, type MaybeInaccessibleMessage, type MenuButton, type MenuButtonCommands, type MenuButtonDefault, type MenuButtonWebApp, type Message, type MessageAutoDeleteTimerChanged, type MessageEffect, type MessageEntity, type MessageId, type MessageOrigin, type MessageOriginChannel, type MessageOriginChat, type MessageOriginHiddenUser, type MessageOriginUser, type MessageReactionCountUpdated, type MessageReactionUpdated, type OrderInfo, type OwnedGift, type OwnedGiftRegular, type OwnedGiftUnique, type OwnedGifts, type PaidMedia, type PaidMediaInfo, type PaidMediaPhoto, type PaidMediaPreview, type PaidMediaPurchased, type PaidMediaVideo, type PaidMessagePriceChanged, type PassportData, type PassportElementError, type PassportElementErrorDataField, type PassportElementErrorFile, type PassportElementErrorFiles, type PassportElementErrorFrontSide, type PassportElementErrorReverseSide, type PassportElementErrorSelfie, type PassportElementErrorTranslationFile, type PassportElementErrorTranslationFiles, type PassportElementErrorUnspecified, type PassportFile, type PhotoSize, type PinChatMessageInput, type Poll, type PollAnswer, type PollOption, type PopupButton, type PopupParams, type PostStoryInput, type PreCheckoutQuery, type PreparedInlineMessage, type PromoteChatMemberInput, type ProximityAlertTriggered, type ReactionCount, type ReactionType, type ReactionTypeCustomEmoji, type ReactionTypeEmoji, type ReactionTypePaid, type ReadBusinessMessageInput, type RefundStarPaymentInput, type RefundedPayment, type RemoveBusinessAccountProfilePhotoInput, type RemoveChatVerificationInput, type RemoveUserVerificationInput, type ReopenForumTopicInput, type ReopenGeneralForumTopicInput, type ReplaceStickerInSetInput, type ReplyKeyboardMarkup, type ReplyKeyboardRemove, type ReplyParameters, type ResponseParameters, type RestrictChatMemberInput, type RevenueWithdrawalState, type RevenueWithdrawalStateFailed, type RevenueWithdrawalStatePending, type RevenueWithdrawalStateSucceeded, type RevokeChatInviteLinkInput, type SafeAreaInset, type SavePreparedInlineMessageInput, type ScanQrPopupParams, type SecureStorage, type SendAnimationInput, type SendAudioInput, type SendChatActionInput, type SendContactInput, type SendDiceInput, type SendDocumentInput, type SendGameInput, type SendGiftInput, type SendInvoiceInput, type SendLocationInput, type SendMediaGroupInput, type SendMessageInput, type SendPaidMediaInput, type SendPhotoInput, type SendPollInput, type SendStickerInput, type SendVenueInput, type SendVideoInput, type SendVideoNoteInput, type SendVoiceInput, type SentWebAppMessage, type SetBusinessAccountBioInput, type SetBusinessAccountGiftSettingsInput, type SetBusinessAccountNameInput, type SetBusinessAccountProfilePhotoInput, type SetBusinessAccountUsernameInput, type SetChatAdministratorCustomTitleInput, type SetChatDescriptionInput, type SetChatMenuButtonInput, type SetChatPermissionsInput, type SetChatPhotoInput, type SetChatStickerSetInput, type SetChatTitleInput, type SetCustomEmojiStickerSetThumbnailInput, type SetGameScoreInput, type SetMessageReactionInput, type SetMyCommandsInput, type SetMyDefaultAdministratorRightsInput, type SetMyDescriptionInput, type SetMyNameInput, type SetMyShortDescriptionInput, type SetPassportDataErrorsInput, type SetStickerEmojiListInput, type SetStickerKeywordsInput, type SetStickerMaskPositionInput, type SetStickerPositionInSetInput, type SetStickerSetThumbnailInput, type SetStickerSetTitleInput, type SetUserEmojiStatusInput, type SetWebhookInput, type SettingsButton, type SharedUser, type ShippingAddress, type ShippingOption, type ShippingQuery, type StarAmount, type StarTransaction, type StarTransactions, type Sticker, type StickerSet, type StopMessageLiveLocationInput, type StopPollInput, type Story, type StoryArea, type StoryAreaPosition, type StoryAreaType, type StoryAreaTypeLink, type StoryAreaTypeLocation, type StoryAreaTypeSuggestedReaction, type StoryAreaTypeUniqueGift, type StoryAreaTypeWeather, type StoryShareParams, type StoryWidgetLink, type SuccessfulPayment, type SwitchInlineQueryChosenChat, type TextQuote, type TgBotClient, type TgWebApp, type ThemeParams, type TransactionPartner, type TransactionPartnerAffiliateProgram, type TransactionPartnerChat, type TransactionPartnerFragment, type TransactionPartnerOther, type TransactionPartnerTelegramAds, type TransactionPartnerTelegramApi, type TransactionPartnerUser, type TransferBusinessAccountStarsInput, type TransferGiftInput, type UnbanChatMemberInput, type UnbanChatSenderChatInput, type UnhideGeneralForumTopicInput, type UniqueGift, type UniqueGiftBackdrop, type UniqueGiftBackdropColors, type UniqueGiftInfo, type UniqueGiftModel, type UniqueGiftSymbol, type UnpinAllChatMessagesInput, type UnpinAllForumTopicMessagesInput, type UnpinAllGeneralForumTopicMessagesInput, type UnpinChatMessageInput, type Update, type UpgradeGiftInput, type UploadStickerFileInput, type User, type UserChatBoosts, type UserProfilePhotos, type UsersShared, type Venue, type VerifyChatInput, type VerifyUserInput, type Video, type VideoChatEnded, type VideoChatParticipantsInvited, type VideoChatScheduled, type VideoChatStarted, type VideoNote, type Voice, type WebAppChat, type WebAppData, type WebAppInfo, type WebAppInitData, type WebAppUser, type WebhookInfo, type WriteAccessAllowed, defaultBaseUrl, defineBot, isMessageEffect, launchBot, makeTgBotClient, messageEffectIdCodes, runTgChatBot };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@effect-ak/tg-bot-client",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.4",
|
|
4
4
|
"homepage": "https://effect-ak.github.io/telegram-bot-playground/",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Aleksandr Kondaurov",
|
|
@@ -9,19 +9,24 @@
|
|
|
9
9
|
"publishConfig": {
|
|
10
10
|
"access": "public"
|
|
11
11
|
},
|
|
12
|
-
"description": "Telegram
|
|
12
|
+
"description": "TypeScript types for Telegram Bot Api and Telegram.Webapp",
|
|
13
13
|
"files": [
|
|
14
14
|
"dist/index.js",
|
|
15
15
|
"dist/index.mjs",
|
|
16
16
|
"dist/index.d.ts"
|
|
17
17
|
],
|
|
18
18
|
"keywords": [
|
|
19
|
-
"telegram",
|
|
20
|
-
"telegram bot api"
|
|
19
|
+
"telegram typescript types",
|
|
20
|
+
"telegram bot api client",
|
|
21
|
+
"telegram webapp"
|
|
21
22
|
],
|
|
22
23
|
"repository": {
|
|
24
|
+
"type": "git",
|
|
23
25
|
"url": "https://github.com/effect-ak/tg-bot-client"
|
|
24
26
|
},
|
|
27
|
+
"bugs": {
|
|
28
|
+
"url": "https://github.com/effect-ak/tg-bot-client/issues"
|
|
29
|
+
},
|
|
25
30
|
"license": "MIT",
|
|
26
31
|
"types": "./dist/index.d.ts",
|
|
27
32
|
"main": "./dist/index.js",
|
package/readme.md
CHANGED
|
@@ -1,20 +1,19 @@
|
|
|
1
1
|
[](https://www.npmjs.com/package/@effect-ak/tg-bot-client)
|
|
2
|
+

|
|
3
|
+

|
|
2
4
|
[](https://effect-ak.github.io/telegram-bot-api/)
|
|
3
|
-

|
|
4
|
-

|
|
5
|
-
|
|
6
|
-
|
|
5
|
+

|
|
6
|
+

|
|
7
7
|
|
|
8
8
|
## Motivation
|
|
9
|
+
**Telegram** does not offer an official TypeScript **SDK** for their **API** but they provide documentation in HTML format.
|
|
9
10
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
This client facilitates interaction with the **Telegram Bot API**. It was created primarily because **Telegram** does not offer an official TypeScript **SDK** for their **API**.
|
|
11
|
+
This package aims to parse official documentation of [Bot Api](https://core.telegram.org/bots/api) and [Telegram.Webapp](https://core.telegram.org/bots/api) and generate **TypeScript types**!
|
|
13
12
|
|
|
14
13
|
## Highlights:
|
|
15
14
|
- **[Client](#client)**: Light TypeScript client
|
|
16
15
|
- **Complete and Up-to-Date Telegram Bot API**: The entire API is generated from [the official documentation](https://core.telegram.org/bots/api) using a [code generator](./codegen/main.ts), ensuring this client remains in sync and supports every method and type provided by the **Telegram Bot API**.
|
|
17
|
-
- **[Types for Webapps](#webapps-typings)** Types that describe `Telegram.WebApp
|
|
16
|
+
- **[Types for Webapps](#webapps-typings)** Types that describe `Telegram.WebApp`. Created by [code generator](./codegen/main.ts) as well.
|
|
18
17
|
- **[ChatBot runner](#chatbot-runner)**: Focus on the logic of your chat bot
|
|
19
18
|
- **Type Mapping**: Types from the documentation are converted to TypeScript types:
|
|
20
19
|
- `Integer` → `number`
|
|
@@ -205,7 +204,7 @@ graph TD
|
|
|
205
204
|
|
|
206
205
|
Telegram provides a big [html](https://core.telegram.org/bots/webapps) page that describes `Telegram.WebApp`
|
|
207
206
|
|
|
208
|
-
`@effect-ak/tg-bot-client`
|
|
207
|
+
`@effect-ak/tg-bot-client` leverages scrapper's functionality to generate TypeScript types.
|
|
209
208
|
|
|
210
209
|
```typescript
|
|
211
210
|
import { TgWebApp } from "@effect-ak/tg-bot-client";
|