@effect-ak/tg-bot-api 1.0.0 → 1.3.1
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 +43 -1
- package/package.json +18 -8
- package/readme.md +26 -36
package/dist/index.d.ts
CHANGED
|
@@ -681,6 +681,7 @@ interface ChatFullInfo {
|
|
|
681
681
|
linked_chat_id?: number;
|
|
682
682
|
location?: ChatLocation;
|
|
683
683
|
rating?: UserRating;
|
|
684
|
+
first_profile_audio?: Audio;
|
|
684
685
|
unique_gift_colors?: UniqueGiftColors;
|
|
685
686
|
paid_message_star_count?: number;
|
|
686
687
|
}
|
|
@@ -782,6 +783,12 @@ interface ChatMemberUpdated {
|
|
|
782
783
|
via_join_request?: boolean;
|
|
783
784
|
via_chat_folder_invite_link?: boolean;
|
|
784
785
|
}
|
|
786
|
+
interface ChatOwnerChanged {
|
|
787
|
+
new_owner: User;
|
|
788
|
+
}
|
|
789
|
+
interface ChatOwnerLeft {
|
|
790
|
+
new_owner?: User;
|
|
791
|
+
}
|
|
785
792
|
interface ChatPermissions {
|
|
786
793
|
can_send_messages?: boolean;
|
|
787
794
|
can_send_audios?: boolean;
|
|
@@ -1037,6 +1044,8 @@ interface InaccessibleMessage {
|
|
|
1037
1044
|
}
|
|
1038
1045
|
interface InlineKeyboardButton {
|
|
1039
1046
|
text: string;
|
|
1047
|
+
icon_custom_emoji_id?: string;
|
|
1048
|
+
style?: "danger" | "success" | "primary";
|
|
1040
1049
|
url?: string;
|
|
1041
1050
|
callback_data?: string;
|
|
1042
1051
|
web_app?: WebAppInfo;
|
|
@@ -1517,6 +1526,8 @@ interface Invoice {
|
|
|
1517
1526
|
}
|
|
1518
1527
|
interface KeyboardButton {
|
|
1519
1528
|
text: string;
|
|
1529
|
+
icon_custom_emoji_id?: string;
|
|
1530
|
+
style?: "danger" | "success" | "primary";
|
|
1520
1531
|
request_users?: KeyboardButtonRequestUsers;
|
|
1521
1532
|
request_chat?: KeyboardButtonRequestChat;
|
|
1522
1533
|
request_contact?: boolean;
|
|
@@ -1654,6 +1665,8 @@ interface Message {
|
|
|
1654
1665
|
location?: Location;
|
|
1655
1666
|
new_chat_members?: User[];
|
|
1656
1667
|
left_chat_member?: User;
|
|
1668
|
+
chat_owner_left?: ChatOwnerLeft;
|
|
1669
|
+
chat_owner_changed?: ChatOwnerChanged;
|
|
1657
1670
|
new_chat_title?: string;
|
|
1658
1671
|
new_chat_photo?: PhotoSize[];
|
|
1659
1672
|
delete_chat_photo?: boolean;
|
|
@@ -2221,6 +2234,7 @@ interface UniqueGift {
|
|
|
2221
2234
|
symbol: UniqueGiftSymbol;
|
|
2222
2235
|
backdrop: UniqueGiftBackdrop;
|
|
2223
2236
|
is_premium?: boolean;
|
|
2237
|
+
is_burned?: boolean;
|
|
2224
2238
|
is_from_blockchain?: boolean;
|
|
2225
2239
|
colors?: UniqueGiftColors;
|
|
2226
2240
|
publisher_chat?: Chat;
|
|
@@ -2257,6 +2271,7 @@ interface UniqueGiftModel {
|
|
|
2257
2271
|
name: string;
|
|
2258
2272
|
sticker: Sticker;
|
|
2259
2273
|
rarity_per_mille: number;
|
|
2274
|
+
rarity?: "uncommon" | "rare" | "epic" | "legendary";
|
|
2260
2275
|
}
|
|
2261
2276
|
interface UniqueGiftSymbol {
|
|
2262
2277
|
name: string;
|
|
@@ -2304,10 +2319,15 @@ interface User {
|
|
|
2304
2319
|
can_connect_to_business?: boolean;
|
|
2305
2320
|
has_main_web_app?: boolean;
|
|
2306
2321
|
has_topics_enabled?: boolean;
|
|
2322
|
+
allows_users_to_create_topics?: boolean;
|
|
2307
2323
|
}
|
|
2308
2324
|
interface UserChatBoosts {
|
|
2309
2325
|
boosts: ChatBoost[];
|
|
2310
2326
|
}
|
|
2327
|
+
interface UserProfileAudios {
|
|
2328
|
+
total_count: number;
|
|
2329
|
+
audios: Audio[];
|
|
2330
|
+
}
|
|
2311
2331
|
interface UserProfilePhotos {
|
|
2312
2332
|
total_count: number;
|
|
2313
2333
|
photos: PhotoSize[][];
|
|
@@ -2340,6 +2360,7 @@ interface Video {
|
|
|
2340
2360
|
thumbnail?: PhotoSize;
|
|
2341
2361
|
cover?: PhotoSize[];
|
|
2342
2362
|
start_timestamp?: number;
|
|
2363
|
+
qualities?: VideoQuality[];
|
|
2343
2364
|
file_name?: string;
|
|
2344
2365
|
mime_type?: string;
|
|
2345
2366
|
file_size?: number;
|
|
@@ -2362,6 +2383,14 @@ interface VideoNote {
|
|
|
2362
2383
|
thumbnail?: PhotoSize;
|
|
2363
2384
|
file_size?: number;
|
|
2364
2385
|
}
|
|
2386
|
+
interface VideoQuality {
|
|
2387
|
+
file_id: string;
|
|
2388
|
+
file_unique_id: string;
|
|
2389
|
+
width: number;
|
|
2390
|
+
height: number;
|
|
2391
|
+
codec: string;
|
|
2392
|
+
file_size?: number;
|
|
2393
|
+
}
|
|
2365
2394
|
interface Voice {
|
|
2366
2395
|
file_id: string;
|
|
2367
2396
|
file_unique_id: string;
|
|
@@ -2469,6 +2498,7 @@ interface Api {
|
|
|
2469
2498
|
get_updates(_: GetUpdatesInput): Update[];
|
|
2470
2499
|
get_user_chat_boosts(_: GetUserChatBoostsInput): UserChatBoosts;
|
|
2471
2500
|
get_user_gifts(_: GetUserGiftsInput): OwnedGifts;
|
|
2501
|
+
get_user_profile_audios(_: GetUserProfileAudiosInput): UserProfileAudios;
|
|
2472
2502
|
get_user_profile_photos(_: GetUserProfilePhotosInput): UserProfilePhotos;
|
|
2473
2503
|
get_webhook_info(_: GetWebhookInfoInput): WebhookInfo;
|
|
2474
2504
|
gift_premium_subscription(_: GiftPremiumSubscriptionInput): boolean;
|
|
@@ -2482,6 +2512,7 @@ interface Api {
|
|
|
2482
2512
|
refund_star_payment(_: RefundStarPaymentInput): boolean;
|
|
2483
2513
|
remove_business_account_profile_photo(_: RemoveBusinessAccountProfilePhotoInput): boolean;
|
|
2484
2514
|
remove_chat_verification(_: RemoveChatVerificationInput): boolean;
|
|
2515
|
+
remove_my_profile_photo(_: RemoveMyProfilePhotoInput): boolean;
|
|
2485
2516
|
remove_user_verification(_: RemoveUserVerificationInput): boolean;
|
|
2486
2517
|
reopen_forum_topic(_: ReopenForumTopicInput): boolean;
|
|
2487
2518
|
reopen_general_forum_topic(_: ReopenGeneralForumTopicInput): boolean;
|
|
@@ -2531,6 +2562,7 @@ interface Api {
|
|
|
2531
2562
|
set_my_default_administrator_rights(_: SetMyDefaultAdministratorRightsInput): boolean;
|
|
2532
2563
|
set_my_description(_: SetMyDescriptionInput): boolean;
|
|
2533
2564
|
set_my_name(_: SetMyNameInput): boolean;
|
|
2565
|
+
set_my_profile_photo(_: SetMyProfilePhotoInput): boolean;
|
|
2534
2566
|
set_my_short_description(_: SetMyShortDescriptionInput): boolean;
|
|
2535
2567
|
set_passport_data_errors(_: SetPassportDataErrorsInput): boolean;
|
|
2536
2568
|
set_sticker_emoji_list(_: SetStickerEmojiListInput): boolean;
|
|
@@ -2982,6 +3014,11 @@ interface GetUserGiftsInput {
|
|
|
2982
3014
|
offset?: string;
|
|
2983
3015
|
limit?: number;
|
|
2984
3016
|
}
|
|
3017
|
+
interface GetUserProfileAudiosInput {
|
|
3018
|
+
user_id: number;
|
|
3019
|
+
offset?: number;
|
|
3020
|
+
limit?: number;
|
|
3021
|
+
}
|
|
2985
3022
|
interface GetUserProfilePhotosInput {
|
|
2986
3023
|
user_id: number;
|
|
2987
3024
|
offset?: number;
|
|
@@ -3058,6 +3095,8 @@ interface RemoveBusinessAccountProfilePhotoInput {
|
|
|
3058
3095
|
interface RemoveChatVerificationInput {
|
|
3059
3096
|
chat_id: number | string;
|
|
3060
3097
|
}
|
|
3098
|
+
interface RemoveMyProfilePhotoInput {
|
|
3099
|
+
}
|
|
3061
3100
|
interface RemoveUserVerificationInput {
|
|
3062
3101
|
user_id: number;
|
|
3063
3102
|
}
|
|
@@ -3570,6 +3609,9 @@ interface SetMyNameInput {
|
|
|
3570
3609
|
name?: string;
|
|
3571
3610
|
language_code?: string;
|
|
3572
3611
|
}
|
|
3612
|
+
interface SetMyProfilePhotoInput {
|
|
3613
|
+
photo: InputProfilePhoto;
|
|
3614
|
+
}
|
|
3573
3615
|
interface SetMyShortDescriptionInput {
|
|
3574
3616
|
short_description?: string;
|
|
3575
3617
|
language_code?: string;
|
|
@@ -3688,4 +3730,4 @@ interface VerifyUserInput {
|
|
|
3688
3730
|
custom_description?: string;
|
|
3689
3731
|
}
|
|
3690
3732
|
|
|
3691
|
-
export type { Accelerometer, AccelerometerStartParams, AcceptedGiftTypes, AddStickerToSetInput, AffiliateInfo, AllowedUpdateName, Animation, AnswerCallbackQueryInput, AnswerInlineQueryInput, AnswerPreCheckoutQueryInput, AnswerShippingQueryInput, AnswerWebAppQueryInput, Api, ApproveChatJoinRequestInput, ApproveSuggestedPostInput, Audio, BackButton, BackgroundFill, BackgroundFillFreeformGradient, BackgroundFillGradient, BackgroundFillSolid, BackgroundType, BackgroundTypeChatTheme, BackgroundTypeFill, BackgroundTypePattern, BackgroundTypeWallpaper, BanChatMemberInput, BanChatSenderChatInput, BindOrUnbindEventHandler, BiometricAuthenticateParams, BiometricManager, BiometricRequestAccessParams, Birthdate, BotCommand, BotCommandScope, BotCommandScopeAllChatAdministrators, BotCommandScopeAllGroupChats, BotCommandScopeAllPrivateChats, BotCommandScopeChat, BotCommandScopeChatAdministrators, BotCommandScopeChatMember, BotCommandScopeDefault, BotDescription, BotName, BotShortDescription, BottomButton, BusinessBotRights, BusinessConnection, BusinessIntro, BusinessLocation, BusinessMessagesDeleted, BusinessOpeningHours, BusinessOpeningHoursInterval, CallbackGame, CallbackQuery, Chat, ChatAdministratorRights, ChatBackground, ChatBoost, ChatBoostAdded, ChatBoostRemoved, ChatBoostSource, ChatBoostSourceGiftCode, ChatBoostSourceGiveaway, ChatBoostSourcePremium, ChatBoostUpdated, ChatFullInfo, ChatInviteLink, ChatJoinRequest, ChatLocation, ChatMember, ChatMemberAdministrator, ChatMemberBanned, ChatMemberLeft, ChatMemberMember, ChatMemberOwner, ChatMemberRestricted, ChatMemberUpdated, ChatPermissions, ChatPhoto, ChatShared, Checklist, ChecklistTask, ChecklistTasksAdded, ChecklistTasksDone, ChosenInlineResult, CloseForumTopicInput, CloseGeneralForumTopicInput, CloseInput, CloudStorage, Contact, ContentSafeAreaInset, ConvertGiftToStarsInput, CopyMessageInput, CopyMessagesInput, CopyTextButton, CreateChatInviteLinkInput, CreateChatSubscriptionInviteLinkInput, CreateForumTopicInput, CreateInvoiceLinkInput, CreateNewStickerSetInput, DeclineChatJoinRequestInput, DeclineSuggestedPostInput, DeleteBusinessMessagesInput, DeleteChatPhotoInput, DeleteChatStickerSetInput, DeleteForumTopicInput, DeleteMessageInput, DeleteMessagesInput, DeleteMyCommandsInput, DeleteStickerFromSetInput, DeleteStickerSetInput, DeleteStoryInput, DeleteWebhookInput, DeviceOrientation, DeviceOrientationStartParams, DeviceStorage, Dice, DirectMessagePriceChanged, DirectMessagesTopic, Document, DownloadFileParams, EditChatInviteLinkInput, EditChatSubscriptionInviteLinkInput, EditForumTopicInput, EditGeneralForumTopicInput, EditMessageCaptionInput, EditMessageChecklistInput, EditMessageLiveLocationInput, EditMessageMediaInput, EditMessageReplyMarkupInput, EditMessageTextInput, EditStoryInput, EditUserStarSubscriptionInput, EmojiStatusParams, EncryptedCredentials, EncryptedPassportElement, EventHandlers, ExportChatInviteLinkInput, ExternalReplyInfo, File, ForceReply, ForumTopic, ForumTopicClosed, ForumTopicCreated, ForumTopicEdited, ForumTopicReopened, ForwardMessageInput, ForwardMessagesInput, Game, GameHighScore, GeneralForumTopicHidden, GeneralForumTopicUnhidden, GetAvailableGiftsInput, GetBusinessAccountGiftsInput, GetBusinessAccountStarBalanceInput, GetBusinessConnectionInput, GetChatAdministratorsInput, GetChatGiftsInput, GetChatInput, GetChatMemberCountInput, GetChatMemberInput, GetChatMenuButtonInput, GetCustomEmojiStickersInput, GetFileInput, GetForumTopicIconStickersInput, GetGameHighScoresInput, GetMeInput, GetMyCommandsInput, GetMyDefaultAdministratorRightsInput, GetMyDescriptionInput, GetMyNameInput, GetMyShortDescriptionInput, GetMyStarBalanceInput, GetStarTransactionsInput, GetStickerSetInput, GetUpdatesInput, GetUserChatBoostsInput, GetUserGiftsInput, GetUserProfilePhotosInput, GetWebhookInfoInput, Gift, GiftBackground, GiftInfo, GiftPremiumSubscriptionInput, Gifts, Giveaway, GiveawayCompleted, GiveawayCreated, GiveawayWinners, Gyroscope, GyroscopeStartParams, HapticFeedback, HideGeneralForumTopicInput, InaccessibleMessage, InlineKeyboardButton, InlineKeyboardMarkup, InlineQuery, InlineQueryResult, InlineQueryResultArticle, InlineQueryResultAudio, InlineQueryResultCachedAudio, InlineQueryResultCachedDocument, InlineQueryResultCachedGif, InlineQueryResultCachedMpeg4Gif, InlineQueryResultCachedPhoto, InlineQueryResultCachedSticker, InlineQueryResultCachedVideo, InlineQueryResultCachedVoice, InlineQueryResultContact, InlineQueryResultDocument, InlineQueryResultGame, InlineQueryResultGif, InlineQueryResultLocation, InlineQueryResultMpeg4Gif, InlineQueryResultPhoto, InlineQueryResultVenue, InlineQueryResultVideo, InlineQueryResultVoice, InlineQueryResultsButton, InputChecklist, InputChecklistTask, InputContactMessageContent, InputFile, InputInvoiceMessageContent, InputLocationMessageContent, InputMedia, InputMediaAnimation, InputMediaAudio, InputMediaDocument, InputMediaPhoto, InputMediaVideo, InputMessageContent, InputPaidMedia, InputPaidMediaPhoto, InputPaidMediaVideo, InputPollOption, InputProfilePhoto, InputProfilePhotoAnimated, InputProfilePhotoStatic, InputSticker, InputStoryContent, InputStoryContentPhoto, InputStoryContentVideo, InputTextMessageContent, InputVenueMessageContent, Invoice, KeyboardButton, KeyboardButtonPollType, KeyboardButtonRequestChat, KeyboardButtonRequestUsers, LabeledPrice, LeaveChatInput, LinkPreviewOptions, Location, LocationAddress, LocationData, LocationManager, LogOutInput, LoginUrl, MaskPosition, MaybeInaccessibleMessage, MenuButton, MenuButtonCommands, MenuButtonDefault, MenuButtonWebApp, Message, MessageAutoDeleteTimerChanged, MessageEntity, MessageId, MessageOrigin, MessageOriginChannel, MessageOriginChat, MessageOriginHiddenUser, MessageOriginUser, MessageReactionCountUpdated, MessageReactionUpdated, OrderInfo, OwnedGift, OwnedGiftRegular, OwnedGiftUnique, OwnedGifts, PaidMedia, PaidMediaInfo, PaidMediaPhoto, PaidMediaPreview, PaidMediaPurchased, PaidMediaVideo, PaidMessagePriceChanged, PassportData, PassportElementError, PassportElementErrorDataField, PassportElementErrorFile, PassportElementErrorFiles, PassportElementErrorFrontSide, PassportElementErrorReverseSide, PassportElementErrorSelfie, PassportElementErrorTranslationFile, PassportElementErrorTranslationFiles, PassportElementErrorUnspecified, PassportFile, PhotoSize, PinChatMessageInput, Poll, PollAnswer, PollOption, PopupButton, PopupParams, PostStoryInput, PreCheckoutQuery, PreparedInlineMessage, PromoteChatMemberInput, ProximityAlertTriggered, ReactionCount, ReactionType, ReactionTypeCustomEmoji, ReactionTypeEmoji, ReactionTypePaid, ReadBusinessMessageInput, RefundStarPaymentInput, RefundedPayment, RemoveBusinessAccountProfilePhotoInput, RemoveChatVerificationInput, RemoveUserVerificationInput, ReopenForumTopicInput, ReopenGeneralForumTopicInput, ReplaceStickerInSetInput, ReplyKeyboardMarkup, ReplyKeyboardRemove, ReplyParameters, RepostStoryInput, ResponseParameters, RestrictChatMemberInput, RevenueWithdrawalState, RevenueWithdrawalStateFailed, RevenueWithdrawalStatePending, RevenueWithdrawalStateSucceeded, RevokeChatInviteLinkInput, SafeAreaInset, SavePreparedInlineMessageInput, ScanQrPopupParams, SecureStorage, SendAnimationInput, SendAudioInput, SendChatActionInput, SendChecklistInput, SendContactInput, SendDiceInput, SendDocumentInput, SendGameInput, SendGiftInput, SendInvoiceInput, SendLocationInput, SendMediaGroupInput, SendMessageDraftInput, SendMessageInput, SendPaidMediaInput, SendPhotoInput, SendPollInput, SendStickerInput, SendVenueInput, SendVideoInput, SendVideoNoteInput, SendVoiceInput, SentWebAppMessage, SetBusinessAccountBioInput, SetBusinessAccountGiftSettingsInput, SetBusinessAccountNameInput, SetBusinessAccountProfilePhotoInput, SetBusinessAccountUsernameInput, SetChatAdministratorCustomTitleInput, SetChatDescriptionInput, SetChatMenuButtonInput, SetChatPermissionsInput, SetChatPhotoInput, SetChatStickerSetInput, SetChatTitleInput, SetCustomEmojiStickerSetThumbnailInput, SetGameScoreInput, SetMessageReactionInput, SetMyCommandsInput, SetMyDefaultAdministratorRightsInput, SetMyDescriptionInput, SetMyNameInput, SetMyShortDescriptionInput, SetPassportDataErrorsInput, SetStickerEmojiListInput, SetStickerKeywordsInput, SetStickerMaskPositionInput, SetStickerPositionInSetInput, SetStickerSetThumbnailInput, SetStickerSetTitleInput, SetUserEmojiStatusInput, SetWebhookInput, SettingsButton, SharedUser, ShippingAddress, ShippingOption, ShippingQuery, StarAmount, StarTransaction, StarTransactions, Sticker, StickerSet, StopMessageLiveLocationInput, StopPollInput, Story, StoryArea, StoryAreaPosition, StoryAreaType, StoryAreaTypeLink, StoryAreaTypeLocation, StoryAreaTypeSuggestedReaction, StoryAreaTypeUniqueGift, StoryAreaTypeWeather, StoryShareParams, StoryWidgetLink, SuccessfulPayment, SuggestedPostApprovalFailed, SuggestedPostApproved, SuggestedPostDeclined, SuggestedPostInfo, SuggestedPostPaid, SuggestedPostParameters, SuggestedPostPrice, SuggestedPostRefunded, SwitchInlineQueryChosenChat, TextQuote, ThemeParams, TransactionPartner, TransactionPartnerAffiliateProgram, TransactionPartnerChat, TransactionPartnerFragment, TransactionPartnerOther, TransactionPartnerTelegramAds, TransactionPartnerTelegramApi, TransactionPartnerUser, TransferBusinessAccountStarsInput, TransferGiftInput, UnbanChatMemberInput, UnbanChatSenderChatInput, UnhideGeneralForumTopicInput, UniqueGift, UniqueGiftBackdrop, UniqueGiftBackdropColors, UniqueGiftColors, UniqueGiftInfo, UniqueGiftModel, UniqueGiftSymbol, UnpinAllChatMessagesInput, UnpinAllForumTopicMessagesInput, UnpinAllGeneralForumTopicMessagesInput, UnpinChatMessageInput, Update, UpgradeGiftInput, UploadStickerFileInput, User, UserChatBoosts, UserProfilePhotos, UserRating, UsersShared, Venue, VerifyChatInput, VerifyUserInput, Video, VideoChatEnded, VideoChatParticipantsInvited, VideoChatScheduled, VideoChatStarted, VideoNote, Voice, WebApp, WebAppChat, WebAppData, WebAppInfo, WebAppInitData, WebAppUser, WebhookInfo, WriteAccessAllowed };
|
|
3733
|
+
export type { Accelerometer, AccelerometerStartParams, AcceptedGiftTypes, AddStickerToSetInput, AffiliateInfo, AllowedUpdateName, Animation, AnswerCallbackQueryInput, AnswerInlineQueryInput, AnswerPreCheckoutQueryInput, AnswerShippingQueryInput, AnswerWebAppQueryInput, Api, ApproveChatJoinRequestInput, ApproveSuggestedPostInput, Audio, BackButton, BackgroundFill, BackgroundFillFreeformGradient, BackgroundFillGradient, BackgroundFillSolid, BackgroundType, BackgroundTypeChatTheme, BackgroundTypeFill, BackgroundTypePattern, BackgroundTypeWallpaper, BanChatMemberInput, BanChatSenderChatInput, BindOrUnbindEventHandler, BiometricAuthenticateParams, BiometricManager, BiometricRequestAccessParams, Birthdate, BotCommand, BotCommandScope, BotCommandScopeAllChatAdministrators, BotCommandScopeAllGroupChats, BotCommandScopeAllPrivateChats, BotCommandScopeChat, BotCommandScopeChatAdministrators, BotCommandScopeChatMember, BotCommandScopeDefault, BotDescription, BotName, BotShortDescription, BottomButton, BusinessBotRights, BusinessConnection, BusinessIntro, BusinessLocation, BusinessMessagesDeleted, BusinessOpeningHours, BusinessOpeningHoursInterval, CallbackGame, CallbackQuery, Chat, ChatAdministratorRights, ChatBackground, ChatBoost, ChatBoostAdded, ChatBoostRemoved, ChatBoostSource, ChatBoostSourceGiftCode, ChatBoostSourceGiveaway, ChatBoostSourcePremium, ChatBoostUpdated, ChatFullInfo, ChatInviteLink, ChatJoinRequest, ChatLocation, ChatMember, ChatMemberAdministrator, ChatMemberBanned, ChatMemberLeft, ChatMemberMember, ChatMemberOwner, ChatMemberRestricted, ChatMemberUpdated, ChatOwnerChanged, ChatOwnerLeft, ChatPermissions, ChatPhoto, ChatShared, Checklist, ChecklistTask, ChecklistTasksAdded, ChecklistTasksDone, ChosenInlineResult, CloseForumTopicInput, CloseGeneralForumTopicInput, CloseInput, CloudStorage, Contact, ContentSafeAreaInset, ConvertGiftToStarsInput, CopyMessageInput, CopyMessagesInput, CopyTextButton, CreateChatInviteLinkInput, CreateChatSubscriptionInviteLinkInput, CreateForumTopicInput, CreateInvoiceLinkInput, CreateNewStickerSetInput, DeclineChatJoinRequestInput, DeclineSuggestedPostInput, DeleteBusinessMessagesInput, DeleteChatPhotoInput, DeleteChatStickerSetInput, DeleteForumTopicInput, DeleteMessageInput, DeleteMessagesInput, DeleteMyCommandsInput, DeleteStickerFromSetInput, DeleteStickerSetInput, DeleteStoryInput, DeleteWebhookInput, DeviceOrientation, DeviceOrientationStartParams, DeviceStorage, Dice, DirectMessagePriceChanged, DirectMessagesTopic, Document, DownloadFileParams, EditChatInviteLinkInput, EditChatSubscriptionInviteLinkInput, EditForumTopicInput, EditGeneralForumTopicInput, EditMessageCaptionInput, EditMessageChecklistInput, EditMessageLiveLocationInput, EditMessageMediaInput, EditMessageReplyMarkupInput, EditMessageTextInput, EditStoryInput, EditUserStarSubscriptionInput, EmojiStatusParams, EncryptedCredentials, EncryptedPassportElement, EventHandlers, ExportChatInviteLinkInput, ExternalReplyInfo, File, ForceReply, ForumTopic, ForumTopicClosed, ForumTopicCreated, ForumTopicEdited, ForumTopicReopened, ForwardMessageInput, ForwardMessagesInput, Game, GameHighScore, GeneralForumTopicHidden, GeneralForumTopicUnhidden, GetAvailableGiftsInput, GetBusinessAccountGiftsInput, GetBusinessAccountStarBalanceInput, GetBusinessConnectionInput, GetChatAdministratorsInput, GetChatGiftsInput, GetChatInput, GetChatMemberCountInput, GetChatMemberInput, GetChatMenuButtonInput, GetCustomEmojiStickersInput, GetFileInput, GetForumTopicIconStickersInput, GetGameHighScoresInput, GetMeInput, GetMyCommandsInput, GetMyDefaultAdministratorRightsInput, GetMyDescriptionInput, GetMyNameInput, GetMyShortDescriptionInput, GetMyStarBalanceInput, GetStarTransactionsInput, GetStickerSetInput, GetUpdatesInput, GetUserChatBoostsInput, GetUserGiftsInput, GetUserProfileAudiosInput, GetUserProfilePhotosInput, GetWebhookInfoInput, Gift, GiftBackground, GiftInfo, GiftPremiumSubscriptionInput, Gifts, Giveaway, GiveawayCompleted, GiveawayCreated, GiveawayWinners, Gyroscope, GyroscopeStartParams, HapticFeedback, HideGeneralForumTopicInput, InaccessibleMessage, InlineKeyboardButton, InlineKeyboardMarkup, InlineQuery, InlineQueryResult, InlineQueryResultArticle, InlineQueryResultAudio, InlineQueryResultCachedAudio, InlineQueryResultCachedDocument, InlineQueryResultCachedGif, InlineQueryResultCachedMpeg4Gif, InlineQueryResultCachedPhoto, InlineQueryResultCachedSticker, InlineQueryResultCachedVideo, InlineQueryResultCachedVoice, InlineQueryResultContact, InlineQueryResultDocument, InlineQueryResultGame, InlineQueryResultGif, InlineQueryResultLocation, InlineQueryResultMpeg4Gif, InlineQueryResultPhoto, InlineQueryResultVenue, InlineQueryResultVideo, InlineQueryResultVoice, InlineQueryResultsButton, InputChecklist, InputChecklistTask, InputContactMessageContent, InputFile, InputInvoiceMessageContent, InputLocationMessageContent, InputMedia, InputMediaAnimation, InputMediaAudio, InputMediaDocument, InputMediaPhoto, InputMediaVideo, InputMessageContent, InputPaidMedia, InputPaidMediaPhoto, InputPaidMediaVideo, InputPollOption, InputProfilePhoto, InputProfilePhotoAnimated, InputProfilePhotoStatic, InputSticker, InputStoryContent, InputStoryContentPhoto, InputStoryContentVideo, InputTextMessageContent, InputVenueMessageContent, Invoice, KeyboardButton, KeyboardButtonPollType, KeyboardButtonRequestChat, KeyboardButtonRequestUsers, LabeledPrice, LeaveChatInput, LinkPreviewOptions, Location, LocationAddress, LocationData, LocationManager, LogOutInput, LoginUrl, MaskPosition, MaybeInaccessibleMessage, MenuButton, MenuButtonCommands, MenuButtonDefault, MenuButtonWebApp, Message, MessageAutoDeleteTimerChanged, MessageEntity, MessageId, MessageOrigin, MessageOriginChannel, MessageOriginChat, MessageOriginHiddenUser, MessageOriginUser, MessageReactionCountUpdated, MessageReactionUpdated, OrderInfo, OwnedGift, OwnedGiftRegular, OwnedGiftUnique, OwnedGifts, PaidMedia, PaidMediaInfo, PaidMediaPhoto, PaidMediaPreview, PaidMediaPurchased, PaidMediaVideo, PaidMessagePriceChanged, PassportData, PassportElementError, PassportElementErrorDataField, PassportElementErrorFile, PassportElementErrorFiles, PassportElementErrorFrontSide, PassportElementErrorReverseSide, PassportElementErrorSelfie, PassportElementErrorTranslationFile, PassportElementErrorTranslationFiles, PassportElementErrorUnspecified, PassportFile, PhotoSize, PinChatMessageInput, Poll, PollAnswer, PollOption, PopupButton, PopupParams, PostStoryInput, PreCheckoutQuery, PreparedInlineMessage, PromoteChatMemberInput, ProximityAlertTriggered, ReactionCount, ReactionType, ReactionTypeCustomEmoji, ReactionTypeEmoji, ReactionTypePaid, ReadBusinessMessageInput, RefundStarPaymentInput, RefundedPayment, RemoveBusinessAccountProfilePhotoInput, RemoveChatVerificationInput, RemoveMyProfilePhotoInput, RemoveUserVerificationInput, ReopenForumTopicInput, ReopenGeneralForumTopicInput, ReplaceStickerInSetInput, ReplyKeyboardMarkup, ReplyKeyboardRemove, ReplyParameters, RepostStoryInput, ResponseParameters, RestrictChatMemberInput, RevenueWithdrawalState, RevenueWithdrawalStateFailed, RevenueWithdrawalStatePending, RevenueWithdrawalStateSucceeded, RevokeChatInviteLinkInput, SafeAreaInset, SavePreparedInlineMessageInput, ScanQrPopupParams, SecureStorage, SendAnimationInput, SendAudioInput, SendChatActionInput, SendChecklistInput, SendContactInput, SendDiceInput, SendDocumentInput, SendGameInput, SendGiftInput, SendInvoiceInput, SendLocationInput, SendMediaGroupInput, SendMessageDraftInput, SendMessageInput, SendPaidMediaInput, SendPhotoInput, SendPollInput, SendStickerInput, SendVenueInput, SendVideoInput, SendVideoNoteInput, SendVoiceInput, SentWebAppMessage, SetBusinessAccountBioInput, SetBusinessAccountGiftSettingsInput, SetBusinessAccountNameInput, SetBusinessAccountProfilePhotoInput, SetBusinessAccountUsernameInput, SetChatAdministratorCustomTitleInput, SetChatDescriptionInput, SetChatMenuButtonInput, SetChatPermissionsInput, SetChatPhotoInput, SetChatStickerSetInput, SetChatTitleInput, SetCustomEmojiStickerSetThumbnailInput, SetGameScoreInput, SetMessageReactionInput, SetMyCommandsInput, SetMyDefaultAdministratorRightsInput, SetMyDescriptionInput, SetMyNameInput, SetMyProfilePhotoInput, SetMyShortDescriptionInput, SetPassportDataErrorsInput, SetStickerEmojiListInput, SetStickerKeywordsInput, SetStickerMaskPositionInput, SetStickerPositionInSetInput, SetStickerSetThumbnailInput, SetStickerSetTitleInput, SetUserEmojiStatusInput, SetWebhookInput, SettingsButton, SharedUser, ShippingAddress, ShippingOption, ShippingQuery, StarAmount, StarTransaction, StarTransactions, Sticker, StickerSet, StopMessageLiveLocationInput, StopPollInput, Story, StoryArea, StoryAreaPosition, StoryAreaType, StoryAreaTypeLink, StoryAreaTypeLocation, StoryAreaTypeSuggestedReaction, StoryAreaTypeUniqueGift, StoryAreaTypeWeather, StoryShareParams, StoryWidgetLink, SuccessfulPayment, SuggestedPostApprovalFailed, SuggestedPostApproved, SuggestedPostDeclined, SuggestedPostInfo, SuggestedPostPaid, SuggestedPostParameters, SuggestedPostPrice, SuggestedPostRefunded, SwitchInlineQueryChosenChat, TextQuote, ThemeParams, TransactionPartner, TransactionPartnerAffiliateProgram, TransactionPartnerChat, TransactionPartnerFragment, TransactionPartnerOther, TransactionPartnerTelegramAds, TransactionPartnerTelegramApi, TransactionPartnerUser, TransferBusinessAccountStarsInput, TransferGiftInput, UnbanChatMemberInput, UnbanChatSenderChatInput, UnhideGeneralForumTopicInput, UniqueGift, UniqueGiftBackdrop, UniqueGiftBackdropColors, UniqueGiftColors, UniqueGiftInfo, UniqueGiftModel, UniqueGiftSymbol, UnpinAllChatMessagesInput, UnpinAllForumTopicMessagesInput, UnpinAllGeneralForumTopicMessagesInput, UnpinChatMessageInput, Update, UpgradeGiftInput, UploadStickerFileInput, User, UserChatBoosts, UserProfileAudios, UserProfilePhotos, UserRating, UsersShared, Venue, VerifyChatInput, VerifyUserInput, Video, VideoChatEnded, VideoChatParticipantsInvited, VideoChatScheduled, VideoChatStarted, VideoNote, VideoQuality, Voice, WebApp, WebAppChat, WebAppData, WebAppInfo, WebAppInitData, WebAppUser, WebhookInfo, WriteAccessAllowed };
|
package/package.json
CHANGED
|
@@ -1,26 +1,27 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@effect-ak/tg-bot-api",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.3.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "TypeScript types for Telegram Bot Api and Telegram Mini Apps",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"keywords": [
|
|
8
8
|
"telegram",
|
|
9
|
+
"telegram-bot",
|
|
10
|
+
"telegram-bot-api",
|
|
9
11
|
"mini-app",
|
|
10
|
-
"typescript"
|
|
12
|
+
"typescript",
|
|
13
|
+
"types"
|
|
11
14
|
],
|
|
12
15
|
"author": {
|
|
13
16
|
"name": "Aleksandr Kondaurov",
|
|
14
17
|
"email": "kondaurov.dev@gmail.com"
|
|
15
18
|
},
|
|
19
|
+
"homepage": "https://tg-bot-sdk.website",
|
|
16
20
|
"repository": {
|
|
17
21
|
"type": "git",
|
|
18
|
-
"url": "https://github.com/
|
|
22
|
+
"url": "https://github.com/kondaurovDev/tg-bot-sdk",
|
|
19
23
|
"directory": "packages/api"
|
|
20
24
|
},
|
|
21
|
-
"bugs": {
|
|
22
|
-
"url": "https://github.com/effect-ak/tg-bot-client/issues"
|
|
23
|
-
},
|
|
24
25
|
"publishConfig": {
|
|
25
26
|
"access": "public"
|
|
26
27
|
},
|
|
@@ -31,15 +32,24 @@
|
|
|
31
32
|
"types": "./dist/index.d.ts",
|
|
32
33
|
"import": "./dist/index.js",
|
|
33
34
|
"require": "./dist/index.cjs"
|
|
34
|
-
}
|
|
35
|
+
},
|
|
36
|
+
"./dist/*": "./dist/*"
|
|
35
37
|
},
|
|
36
38
|
"files": [
|
|
37
39
|
"dist/*.js",
|
|
38
40
|
"dist/*.cjs",
|
|
39
41
|
"dist/*.d.ts"
|
|
40
42
|
],
|
|
43
|
+
"devDependencies": {
|
|
44
|
+
"node-html-parser": "^7.0.1",
|
|
45
|
+
"ts-morph": "^27.0.2"
|
|
46
|
+
},
|
|
41
47
|
"scripts": {
|
|
42
48
|
"build": "tsup",
|
|
43
|
-
"typecheck": "tsc"
|
|
49
|
+
"typecheck": "tsc",
|
|
50
|
+
"gen": "pnpm run gen:bot:api && pnpm run gen:webapp:api",
|
|
51
|
+
"gen:bot:api": "MODULE_NAME=bot_api tsx ./codegen/main.ts",
|
|
52
|
+
"gen:webapp:api": "MODULE_NAME=webapp tsx ./codegen/main.ts",
|
|
53
|
+
"test": "vitest run"
|
|
44
54
|
}
|
|
45
55
|
}
|
package/readme.md
CHANGED
|
@@ -1,37 +1,27 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
[ page that describes `Telegram.WebApp`
|
|
20
|
-
|
|
21
|
-
```typescript
|
|
22
|
-
import type { WebApp } from "@effect-ak/tg-bot-client/webapp"
|
|
23
|
-
|
|
24
|
-
interface Telegram {
|
|
25
|
-
WebApp: TgWebApp
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
declare const Telegram: Telegram
|
|
29
|
-
|
|
30
|
-
const saveData = () => {
|
|
31
|
-
Telegram.WebApp.CloudStorage.setItem("key1", "some data", (error) => {
|
|
32
|
-
if (error == null) {
|
|
33
|
-
console.log("Saved!")
|
|
34
|
-
}
|
|
35
|
-
})
|
|
36
|
-
}
|
|
1
|
+
# @effect-ak/tg-bot-api
|
|
2
|
+
|
|
3
|
+
[](https://www.npmjs.com/package/@effect-ak/tg-bot-api)
|
|
4
|
+

|
|
5
|
+

|
|
6
|
+
|
|
7
|
+
Complete TypeScript types for Telegram Bot API and Mini Apps, auto-generated from official documentation.
|
|
8
|
+
|
|
9
|
+
## Installation
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
npm install @effect-ak/tg-bot-api
|
|
37
13
|
```
|
|
14
|
+
|
|
15
|
+
## Features
|
|
16
|
+
|
|
17
|
+
- **Always Up-to-Date** — generated from [official Telegram docs](https://core.telegram.org/bots/api) via code generator
|
|
18
|
+
- **WebApp Types** — types for `Telegram.WebApp` included
|
|
19
|
+
- **Smart Type Mapping** — `Integer` → `number`, `True` → `boolean`, enums → union literals, etc.
|
|
20
|
+
|
|
21
|
+
## Documentation
|
|
22
|
+
|
|
23
|
+
Full documentation, codegen internals, and API reference: **[tg-bot-sdk.website](https://tg-bot-sdk.website)**
|
|
24
|
+
|
|
25
|
+
## License
|
|
26
|
+
|
|
27
|
+
MIT
|