nyx-bot-client 0.0.2
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/.env.sample +4 -0
- package/.vscode/extensions.json +11 -0
- package/.vscode/settings.json +17 -0
- package/.zed/settings.json +20 -0
- package/@types/AcceptedGiftTypes.ts +26 -0
- package/@types/AffiliateInfo.ts +35 -0
- package/@types/Animation.ts +56 -0
- package/@types/Audio.ts +56 -0
- package/@types/BackgroundFill.ts +18 -0
- package/@types/BackgroundFillFreeformGradient.ts +16 -0
- package/@types/BackgroundFillGradient.ts +26 -0
- package/@types/BackgroundFillSolid.ts +16 -0
- package/@types/BackgroundType.ts +21 -0
- package/@types/BackgroundTypeChatTheme.ts +16 -0
- package/@types/BackgroundTypeFill.ts +23 -0
- package/@types/BackgroundTypePattern.ts +40 -0
- package/@types/BackgroundTypeWallpaper.ts +33 -0
- package/@types/Birthdate.ts +21 -0
- package/@types/BotCommand.ts +16 -0
- package/@types/BotCommandScope.ts +30 -0
- package/@types/BotCommandScopeAllChatAdministrators.ts +11 -0
- package/@types/BotCommandScopeAllGroupChats.ts +11 -0
- package/@types/BotCommandScopeAllPrivateChats.ts +11 -0
- package/@types/BotCommandScopeChat.ts +16 -0
- package/@types/BotCommandScopeChatAdministrators.ts +16 -0
- package/@types/BotCommandScopeChatMember.ts +21 -0
- package/@types/BotCommandScopeDefault.ts +12 -0
- package/@types/BotDescription.ts +11 -0
- package/@types/BotName.ts +11 -0
- package/@types/BotShortDescription.ts +11 -0
- package/@types/BusinessBotRights.ts +65 -0
- package/@types/BusinessConnection.ts +41 -0
- package/@types/BusinessIntro.ts +23 -0
- package/@types/BusinessLocation.ts +18 -0
- package/@types/BusinessMessagesDeleted.ts +24 -0
- package/@types/BusinessOpeningHours.ts +18 -0
- package/@types/BusinessOpeningHoursInterval.ts +18 -0
- package/@types/CallbackGame.ts +6 -0
- package/@types/CallbackQuery.ts +49 -0
- package/@types/Chat.ts +43 -0
- package/@types/ChatAdministratorRights.ts +84 -0
- package/@types/ChatBackground.ts +13 -0
- package/@types/ChatBoost.ts +29 -0
- package/@types/ChatBoostAdded.ts +11 -0
- package/@types/ChatBoostRemoved.ts +28 -0
- package/@types/ChatBoostSource.ts +18 -0
- package/@types/ChatBoostSourceGiftCode.ts +19 -0
- package/@types/ChatBoostSourceGiveaway.ts +35 -0
- package/@types/ChatBoostSourcePremium.ts +19 -0
- package/@types/ChatBoostUpdated.ts +18 -0
- package/@types/ChatFullInfo.ts +260 -0
- package/@types/ChatInviteLink.ts +66 -0
- package/@types/ChatJoinRequest.ts +42 -0
- package/@types/ChatLocation.ts +16 -0
- package/@types/ChatMember.ts +28 -0
- package/@types/ChatMemberAdministrator.ts +107 -0
- package/@types/ChatMemberBanned.ts +23 -0
- package/@types/ChatMemberLeft.ts +18 -0
- package/@types/ChatMemberMember.ts +23 -0
- package/@types/ChatMemberOwner.ts +28 -0
- package/@types/ChatMemberRestricted.ts +99 -0
- package/@types/ChatMemberUpdated.ts +49 -0
- package/@types/ChatPermissions.ts +78 -0
- package/@types/ChatPhoto.ts +30 -0
- package/@types/ChatShared.ts +36 -0
- package/@types/Checklist.ts +33 -0
- package/@types/ChecklistTask.ts +33 -0
- package/@types/ChecklistTasksAdded.ts +19 -0
- package/@types/ChecklistTasksDone.ts +24 -0
- package/@types/ChosenInlineResult.ts +34 -0
- package/@types/Contact.ts +33 -0
- package/@types/CopyTextButton.ts +11 -0
- package/@types/Dice.ts +17 -0
- package/@types/DirectMessagePriceChanged.ts +17 -0
- package/@types/Document.ts +41 -0
- package/@types/EncryptedCredentials.ts +23 -0
- package/@types/EncryptedPassportElement.ts +357 -0
- package/@types/ExternalReplyInfo.ts +159 -0
- package/@types/File.ts +33 -0
- package/@types/ForceReply.ts +26 -0
- package/@types/ForumTopic.ts +26 -0
- package/@types/ForumTopicClosed.ts +6 -0
- package/@types/ForumTopicCreated.ts +21 -0
- package/@types/ForumTopicEdited.ts +17 -0
- package/@types/ForumTopicReopened.ts +6 -0
- package/@types/Game.ts +41 -0
- package/@types/GameHighScore.ts +23 -0
- package/@types/GeneralForumTopicHidden.ts +7 -0
- package/@types/GeneralForumTopicUnhidden.ts +7 -0
- package/@types/Gift.ts +38 -0
- package/@types/GiftInfo.ts +52 -0
- package/@types/Gifts.ts +13 -0
- package/@types/Giveaway.ts +55 -0
- package/@types/GiveawayCompleted.ts +29 -0
- package/@types/GiveawayCreated.ts +11 -0
- package/@types/GiveawayWinners.ts +68 -0
- package/@types/InaccessibleMessage.ts +23 -0
- package/@types/InlineKeyboardButton.ts +88 -0
- package/@types/InlineKeyboardMarkup.ts +13 -0
- package/@types/InlineQuery.ts +41 -0
- package/@types/InlineQueryResult.ts +70 -0
- package/@types/InlineQueryResultArticle.ts +58 -0
- package/@types/InlineQueryResultAudio.ts +69 -0
- package/@types/InlineQueryResultCachedAudio.ts +55 -0
- package/@types/InlineQueryResultCachedDocument.ts +65 -0
- package/@types/InlineQueryResultCachedGif.ts +65 -0
- package/@types/InlineQueryResultCachedMpeg4Gif.ts +65 -0
- package/@types/InlineQueryResultCachedPhoto.ts +70 -0
- package/@types/InlineQueryResultCachedSticker.ts +34 -0
- package/@types/InlineQueryResultCachedVideo.ts +70 -0
- package/@types/InlineQueryResultCachedVoice.ts +60 -0
- package/@types/InlineQueryResultContact.ts +64 -0
- package/@types/InlineQueryResultDocument.ts +85 -0
- package/@types/InlineQueryResultGame.ts +29 -0
- package/@types/InlineQueryResultGif.ts +91 -0
- package/@types/InlineQueryResultLocation.ts +82 -0
- package/@types/InlineQueryResultMpeg4Gif.ts +91 -0
- package/@types/InlineQueryResultPhoto.ts +84 -0
- package/@types/InlineQueryResultVenue.ts +80 -0
- package/@types/InlineQueryResultVideo.ts +98 -0
- package/@types/InlineQueryResultVoice.ts +65 -0
- package/@types/InlineQueryResultsButton.ts +34 -0
- package/@types/InputChecklist.ts +39 -0
- package/@types/InputChecklistTask.ts +30 -0
- package/@types/InputContactMessageContent.ts +27 -0
- package/@types/InputFile.ts +10 -0
- package/@types/InputInvoiceMessageContent.ts +120 -0
- package/@types/InputLocationMessageContent.ts +39 -0
- package/@types/InputMedia.ts +24 -0
- package/@types/InputMediaAnimation.ts +68 -0
- package/@types/InputMediaAudio.ts +58 -0
- package/@types/InputMediaDocument.ts +49 -0
- package/@types/InputMediaPhoto.ts +45 -0
- package/@types/InputMediaVideo.ts +85 -0
- package/@types/InputMessageContent.ts +25 -0
- package/@types/InputPaidMedia.ts +11 -0
- package/@types/InputPaidMediaPhoto.ts +21 -0
- package/@types/InputPaidMediaVideo.ts +64 -0
- package/@types/InputPollOption.ts +25 -0
- package/@types/InputProfilePhoto.ts +10 -0
- package/@types/InputProfilePhotoAnimated.ts +23 -0
- package/@types/InputProfilePhotoStatic.ts +18 -0
- package/@types/InputSticker.ts +38 -0
- package/@types/InputStoryContent.ts +11 -0
- package/@types/InputStoryContentPhoto.ts +29 -0
- package/@types/InputStoryContentVideo.ts +49 -0
- package/@types/InputTextMessageContent.ts +28 -0
- package/@types/InputVenueMessageContent.ts +47 -0
- package/@types/Invoice.ts +35 -0
- package/@types/KeyboardButton.ts +61 -0
- package/@types/KeyboardButtonPollType.ts +13 -0
- package/@types/KeyboardButtonRequestChat.ts +68 -0
- package/@types/KeyboardButtonRequestUsers.ts +45 -0
- package/@types/LabeledPrice.ts +18 -0
- package/@types/LinkPreviewOptions.ts +32 -0
- package/@types/Location.ts +38 -0
- package/@types/LocationAddress.ts +26 -0
- package/@types/LoginUrl.ts +37 -0
- package/@types/MaskPosition.ts +28 -0
- package/@types/MaybeInaccessibleMessage.ts +8 -0
- package/@types/MenuButton.ts +20 -0
- package/@types/MenuButtonCommands.ts +11 -0
- package/@types/MenuButtonDefault.ts +11 -0
- package/@types/MenuButtonWebApp.ts +26 -0
- package/@types/Message.ts +608 -0
- package/@types/MessageAutoDeleteTimerChanged.ts +11 -0
- package/@types/MessageEntity.ts +109 -0
- package/@types/MessageId.ts +11 -0
- package/@types/MessageOrigin.ts +21 -0
- package/@types/MessageOriginChannel.ts +33 -0
- package/@types/MessageOriginChat.ts +28 -0
- package/@types/MessageOriginHiddenUser.ts +21 -0
- package/@types/MessageOriginUser.ts +23 -0
- package/@types/MessageReactionCountUpdated.ts +28 -0
- package/@types/MessageReactionUpdated.ts +43 -0
- package/@types/OrderInfo.ts +28 -0
- package/@types/OwnedGift.ts +11 -0
- package/@types/OwnedGiftRegular.ts +77 -0
- package/@types/OwnedGiftUnique.ts +57 -0
- package/@types/OwnedGifts.ts +23 -0
- package/@types/PaidMedia.ts +13 -0
- package/@types/PaidMediaInfo.ts +18 -0
- package/@types/PaidMediaPhoto.ts +18 -0
- package/@types/PaidMediaPreview.ts +26 -0
- package/@types/PaidMediaPurchased.ts +18 -0
- package/@types/PaidMediaVideo.ts +18 -0
- package/@types/PaidMessagePriceChanged.ts +16 -0
- package/@types/PassportData.ts +18 -0
- package/@types/PassportElementError.ts +37 -0
- package/@types/PassportElementErrorDataField.ts +39 -0
- package/@types/PassportElementErrorFile.ts +33 -0
- package/@types/PassportElementErrorFiles.ts +33 -0
- package/@types/PassportElementErrorFrontSide.ts +28 -0
- package/@types/PassportElementErrorReverseSide.ts +27 -0
- package/@types/PassportElementErrorSelfie.ts +28 -0
- package/@types/PassportElementErrorTranslationFile.ts +38 -0
- package/@types/PassportElementErrorTranslationFiles.ts +38 -0
- package/@types/PassportElementErrorUnspecified.ts +49 -0
- package/@types/PassportFile.ts +28 -0
- package/@types/PhotoSize.ts +32 -0
- package/@types/Poll.ts +81 -0
- package/@types/PollAnswer.ts +28 -0
- package/@types/PollOption.ts +24 -0
- package/@types/PreCheckoutQuery.ts +45 -0
- package/@types/ProximityAlertTriggered.ts +24 -0
- package/@types/ReactionCount.ts +18 -0
- package/@types/ReactionType.ts +18 -0
- package/@types/ReactionTypeCustomEmoji.ts +16 -0
- package/@types/ReactionTypeEmoji.ts +92 -0
- package/@types/ReactionTypePaid.ts +11 -0
- package/@types/RefundedPayment.ts +35 -0
- package/@types/ReplyKeyboardMarkup.ts +49 -0
- package/@types/ReplyKeyboardRemove.ts +25 -0
- package/@types/ReplyParameters.ts +48 -0
- package/@types/ResponseParameters.ts +19 -0
- package/@types/RevenueWithdrawalState.ts +13 -0
- package/@types/RevenueWithdrawalStateFailed.ts +11 -0
- package/@types/RevenueWithdrawalStatePending.ts +10 -0
- package/@types/RevenueWithdrawalStateSucceeded.ts +21 -0
- package/@types/SentWebAppMessage.ts +12 -0
- package/@types/SharedUser.ts +36 -0
- package/@types/ShippingAddress.ts +36 -0
- package/@types/ShippingOption.ts +23 -0
- package/@types/ShippingQuery.ts +28 -0
- package/@types/StarAmount.ts +17 -0
- package/@types/StarTransaction.ts +42 -0
- package/@types/StarTransactions.ts +13 -0
- package/@types/Sticker.ts +86 -0
- package/@types/StickerSet.ts +33 -0
- package/@types/Story.ts +18 -0
- package/@types/StoryArea.ts +18 -0
- package/@types/StoryAreaPosition.ts +36 -0
- package/@types/StoryAreaType.ts +24 -0
- package/@types/StoryAreaTypeLink.ts +16 -0
- package/@types/StoryAreaTypeLocation.ts +28 -0
- package/@types/StoryAreaTypeSuggestedReaction.ts +29 -0
- package/@types/StoryAreaTypeUniqueGift.ts +16 -0
- package/@types/StoryAreaTypeWeather.ts +26 -0
- package/@types/SuccessfulPayment.ts +60 -0
- package/@types/SwitchInlineQueryChosenChat.ts +33 -0
- package/@types/TextQuote.ts +30 -0
- package/@types/TransactionPartner.ts +31 -0
- package/@types/TransactionPartnerAffiliateProgram.ts +24 -0
- package/@types/TransactionPartnerChat.ts +21 -0
- package/@types/TransactionPartnerFragment.ts +18 -0
- package/@types/TransactionPartnerOther.ts +11 -0
- package/@types/TransactionPartnerTelegramAds.ts +11 -0
- package/@types/TransactionPartnerTelegramApi.ts +16 -0
- package/@types/TransactionPartnerUser.ts +70 -0
- package/@types/UniqueGift.ts +38 -0
- package/@types/UniqueGiftBackdrop.ts +23 -0
- package/@types/UniqueGiftBackdropColors.ts +26 -0
- package/@types/UniqueGiftInfo.ts +42 -0
- package/@types/UniqueGiftModel.ts +23 -0
- package/@types/UniqueGiftSymbol.ts +23 -0
- package/@types/Update.ts +177 -0
- package/@types/User.ts +74 -0
- package/@types/UserProfilePhotos.ts +18 -0
- package/@types/UsersShared.ts +19 -0
- package/@types/Venue.ts +48 -0
- package/@types/Video.ts +66 -0
- package/@types/VideoChatEnded.ts +11 -0
- package/@types/VideoChatParticipantsInvited.ts +13 -0
- package/@types/VideoChatScheduled.ts +11 -0
- package/@types/VideoChatStarted.ts +6 -0
- package/@types/VideoNote.ts +39 -0
- package/@types/Voice.ts +34 -0
- package/@types/WebAppData.ts +17 -0
- package/@types/WebAppInfo.ts +11 -0
- package/@types/WebhookInfo.ts +54 -0
- package/@types/WriteAccessAllowed.ts +23 -0
- package/@types/index.ts +395 -0
- package/@types/utils.ts +17 -0
- package/biome.json +58 -0
- package/bun.lock +105 -0
- package/cron/actions-server.ts +87 -0
- package/index.ts +9 -0
- package/nyx-client.ts +133 -0
- package/package.json +22 -0
- package/tsconfig.json +28 -0
- package/types.d.ts +35 -0
- package/utils/actions.ts +30 -0
- package/utils/api.ts +27 -0
- package/utils/enum.ts +5 -0
- package/utils/helpers.ts +71 -0
- package/utils/methods.ts +1943 -0
- package/utils/objects.ts +37 -0
- package/utils/table.ts +72 -0
|
@@ -0,0 +1,357 @@
|
|
|
1
|
+
/**
|
|
2
|
+
*
|
|
3
|
+
*/
|
|
4
|
+
type PassportFile = {
|
|
5
|
+
/**
|
|
6
|
+
*
|
|
7
|
+
*/
|
|
8
|
+
file_id: string;
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
*
|
|
12
|
+
*/
|
|
13
|
+
file_size: number;
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
*
|
|
17
|
+
*/
|
|
18
|
+
file_date: number;
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
*
|
|
23
|
+
*/
|
|
24
|
+
type BaseEncryptedPassportElement = {
|
|
25
|
+
/**
|
|
26
|
+
*
|
|
27
|
+
*/
|
|
28
|
+
type:
|
|
29
|
+
| "personal_details"
|
|
30
|
+
| "passport"
|
|
31
|
+
| "driver_license"
|
|
32
|
+
| "identity_card"
|
|
33
|
+
| "internal_passport"
|
|
34
|
+
| "address"
|
|
35
|
+
| "utility_bill"
|
|
36
|
+
| "bank_statement"
|
|
37
|
+
| "rental_agreement"
|
|
38
|
+
| "passport_registration"
|
|
39
|
+
| "temporary_registration"
|
|
40
|
+
| "phone_number"
|
|
41
|
+
| "email";
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
*
|
|
45
|
+
*/
|
|
46
|
+
hash: string;
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
*
|
|
51
|
+
*/
|
|
52
|
+
type PersonalDetailsElement = {
|
|
53
|
+
/**
|
|
54
|
+
*
|
|
55
|
+
*/
|
|
56
|
+
type: "personal_details";
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
*
|
|
60
|
+
*/
|
|
61
|
+
data?: string;
|
|
62
|
+
} & BaseEncryptedPassportElement;
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
*
|
|
66
|
+
*/
|
|
67
|
+
type PassportElement = {
|
|
68
|
+
/**
|
|
69
|
+
*
|
|
70
|
+
*/
|
|
71
|
+
type: "passport";
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
*
|
|
75
|
+
*/
|
|
76
|
+
data?: string;
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
*
|
|
80
|
+
*/
|
|
81
|
+
front_side?: PassportFile;
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
*
|
|
85
|
+
*/
|
|
86
|
+
selfie?: PassportFile;
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
*
|
|
90
|
+
*/
|
|
91
|
+
translation?: PassportFile[];
|
|
92
|
+
} & BaseEncryptedPassportElement;
|
|
93
|
+
|
|
94
|
+
/**
|
|
95
|
+
*
|
|
96
|
+
*/
|
|
97
|
+
type DriverLicenseElement = {
|
|
98
|
+
/**
|
|
99
|
+
*
|
|
100
|
+
*/
|
|
101
|
+
type: "driver_license";
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
*
|
|
105
|
+
*/
|
|
106
|
+
data?: string;
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
*
|
|
110
|
+
*/
|
|
111
|
+
front_side?: PassportFile;
|
|
112
|
+
|
|
113
|
+
/**
|
|
114
|
+
*
|
|
115
|
+
*/
|
|
116
|
+
reverse_side?: PassportFile;
|
|
117
|
+
|
|
118
|
+
/**
|
|
119
|
+
*
|
|
120
|
+
*/
|
|
121
|
+
selfie?: PassportFile;
|
|
122
|
+
|
|
123
|
+
/**
|
|
124
|
+
*
|
|
125
|
+
*/
|
|
126
|
+
translation?: PassportFile[];
|
|
127
|
+
} & BaseEncryptedPassportElement;
|
|
128
|
+
|
|
129
|
+
/**
|
|
130
|
+
*
|
|
131
|
+
*/
|
|
132
|
+
type IdentityCardElement = {
|
|
133
|
+
/**
|
|
134
|
+
*
|
|
135
|
+
*/
|
|
136
|
+
type: "identity_card";
|
|
137
|
+
|
|
138
|
+
/**
|
|
139
|
+
*
|
|
140
|
+
*/
|
|
141
|
+
data?: string;
|
|
142
|
+
|
|
143
|
+
/**
|
|
144
|
+
*
|
|
145
|
+
*/
|
|
146
|
+
front_side?: PassportFile;
|
|
147
|
+
|
|
148
|
+
/**
|
|
149
|
+
*
|
|
150
|
+
*/
|
|
151
|
+
reverse_side?: PassportFile;
|
|
152
|
+
|
|
153
|
+
/**
|
|
154
|
+
*
|
|
155
|
+
*/
|
|
156
|
+
selfie?: PassportFile;
|
|
157
|
+
|
|
158
|
+
/**
|
|
159
|
+
*
|
|
160
|
+
*/
|
|
161
|
+
translation?: PassportFile[];
|
|
162
|
+
} & BaseEncryptedPassportElement;
|
|
163
|
+
|
|
164
|
+
/**
|
|
165
|
+
*
|
|
166
|
+
*/
|
|
167
|
+
type InternalPassportElement = {
|
|
168
|
+
/**
|
|
169
|
+
*
|
|
170
|
+
*/
|
|
171
|
+
type: "internal_passport";
|
|
172
|
+
|
|
173
|
+
/**
|
|
174
|
+
*
|
|
175
|
+
*/
|
|
176
|
+
data?: string;
|
|
177
|
+
|
|
178
|
+
/**
|
|
179
|
+
*
|
|
180
|
+
*/
|
|
181
|
+
front_side?: PassportFile;
|
|
182
|
+
|
|
183
|
+
/**
|
|
184
|
+
*
|
|
185
|
+
*/
|
|
186
|
+
selfie?: PassportFile;
|
|
187
|
+
|
|
188
|
+
/**
|
|
189
|
+
*
|
|
190
|
+
*/
|
|
191
|
+
translation?: PassportFile[];
|
|
192
|
+
} & BaseEncryptedPassportElement;
|
|
193
|
+
|
|
194
|
+
/**
|
|
195
|
+
*
|
|
196
|
+
*/
|
|
197
|
+
type AddressElement = {
|
|
198
|
+
/**
|
|
199
|
+
*
|
|
200
|
+
*/
|
|
201
|
+
type: "address";
|
|
202
|
+
|
|
203
|
+
/**
|
|
204
|
+
*
|
|
205
|
+
*/
|
|
206
|
+
data?: string;
|
|
207
|
+
} & BaseEncryptedPassportElement;
|
|
208
|
+
|
|
209
|
+
/**
|
|
210
|
+
*
|
|
211
|
+
*/
|
|
212
|
+
type UtilityBillElement = {
|
|
213
|
+
/**
|
|
214
|
+
*
|
|
215
|
+
*/
|
|
216
|
+
type: "utility_bill";
|
|
217
|
+
|
|
218
|
+
/**
|
|
219
|
+
*
|
|
220
|
+
*/
|
|
221
|
+
files?: PassportFile[];
|
|
222
|
+
|
|
223
|
+
/**
|
|
224
|
+
*
|
|
225
|
+
*/
|
|
226
|
+
translation?: PassportFile[];
|
|
227
|
+
} & BaseEncryptedPassportElement;
|
|
228
|
+
|
|
229
|
+
/**
|
|
230
|
+
*
|
|
231
|
+
*/
|
|
232
|
+
type BankStatementElement = {
|
|
233
|
+
/**
|
|
234
|
+
*
|
|
235
|
+
*/
|
|
236
|
+
type: "bank_statement";
|
|
237
|
+
|
|
238
|
+
/**
|
|
239
|
+
*
|
|
240
|
+
*/
|
|
241
|
+
files?: PassportFile[];
|
|
242
|
+
|
|
243
|
+
/**
|
|
244
|
+
*
|
|
245
|
+
*/
|
|
246
|
+
translation?: PassportFile[];
|
|
247
|
+
} & BaseEncryptedPassportElement;
|
|
248
|
+
|
|
249
|
+
/**
|
|
250
|
+
*
|
|
251
|
+
*/
|
|
252
|
+
type RentalAgreementElement = {
|
|
253
|
+
/**
|
|
254
|
+
*
|
|
255
|
+
*/
|
|
256
|
+
type: "rental_agreement";
|
|
257
|
+
|
|
258
|
+
/**
|
|
259
|
+
*
|
|
260
|
+
*/
|
|
261
|
+
files?: PassportFile[];
|
|
262
|
+
|
|
263
|
+
/**
|
|
264
|
+
*
|
|
265
|
+
*/
|
|
266
|
+
translation?: PassportFile[];
|
|
267
|
+
} & BaseEncryptedPassportElement;
|
|
268
|
+
|
|
269
|
+
/**
|
|
270
|
+
*
|
|
271
|
+
*/
|
|
272
|
+
type PassportRegistrationElement = {
|
|
273
|
+
/**
|
|
274
|
+
*
|
|
275
|
+
*/
|
|
276
|
+
type: "passport_registration";
|
|
277
|
+
|
|
278
|
+
/**
|
|
279
|
+
*
|
|
280
|
+
*/
|
|
281
|
+
files?: PassportFile[];
|
|
282
|
+
|
|
283
|
+
/**
|
|
284
|
+
*
|
|
285
|
+
*/
|
|
286
|
+
translation?: PassportFile[];
|
|
287
|
+
} & BaseEncryptedPassportElement;
|
|
288
|
+
|
|
289
|
+
/**
|
|
290
|
+
*
|
|
291
|
+
*/
|
|
292
|
+
type TemporaryRegistrationElement = {
|
|
293
|
+
/**
|
|
294
|
+
*
|
|
295
|
+
*/
|
|
296
|
+
type: "temporary_registration";
|
|
297
|
+
|
|
298
|
+
/**
|
|
299
|
+
*
|
|
300
|
+
*/
|
|
301
|
+
files?: PassportFile[];
|
|
302
|
+
|
|
303
|
+
/**
|
|
304
|
+
*
|
|
305
|
+
*/
|
|
306
|
+
translation?: PassportFile[];
|
|
307
|
+
} & BaseEncryptedPassportElement;
|
|
308
|
+
|
|
309
|
+
/**
|
|
310
|
+
*
|
|
311
|
+
*/
|
|
312
|
+
type PhoneNumberElement = {
|
|
313
|
+
/**
|
|
314
|
+
*
|
|
315
|
+
*/
|
|
316
|
+
type: "phone_number";
|
|
317
|
+
|
|
318
|
+
/**
|
|
319
|
+
*
|
|
320
|
+
*/
|
|
321
|
+
phone_number?: string;
|
|
322
|
+
} & BaseEncryptedPassportElement;
|
|
323
|
+
|
|
324
|
+
/**
|
|
325
|
+
*
|
|
326
|
+
*/
|
|
327
|
+
type EmailElement = {
|
|
328
|
+
/**
|
|
329
|
+
*
|
|
330
|
+
*/
|
|
331
|
+
type: "email";
|
|
332
|
+
|
|
333
|
+
/**
|
|
334
|
+
*
|
|
335
|
+
*/
|
|
336
|
+
email?: string;
|
|
337
|
+
} & BaseEncryptedPassportElement;
|
|
338
|
+
|
|
339
|
+
/**
|
|
340
|
+
* ## EncryptedPassportElement
|
|
341
|
+
* Describes documents or other Telegram Passport elements shared with the bot by the user.
|
|
342
|
+
* @see https://core.telegram.org/bots/api#encryptedpassportelement
|
|
343
|
+
*/
|
|
344
|
+
export type EncryptedPassportElement =
|
|
345
|
+
| PersonalDetailsElement
|
|
346
|
+
| PassportElement
|
|
347
|
+
| DriverLicenseElement
|
|
348
|
+
| IdentityCardElement
|
|
349
|
+
| InternalPassportElement
|
|
350
|
+
| AddressElement
|
|
351
|
+
| UtilityBillElement
|
|
352
|
+
| BankStatementElement
|
|
353
|
+
| RentalAgreementElement
|
|
354
|
+
| PassportRegistrationElement
|
|
355
|
+
| TemporaryRegistrationElement
|
|
356
|
+
| PhoneNumberElement
|
|
357
|
+
| EmailElement;
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
import type {
|
|
2
|
+
Animation,
|
|
3
|
+
Audio,
|
|
4
|
+
Chat,
|
|
5
|
+
Checklist,
|
|
6
|
+
Contact,
|
|
7
|
+
Dice,
|
|
8
|
+
Document,
|
|
9
|
+
Game,
|
|
10
|
+
Giveaway,
|
|
11
|
+
GiveawayWinners,
|
|
12
|
+
Invoice,
|
|
13
|
+
LinkPreviewOptions,
|
|
14
|
+
Location,
|
|
15
|
+
MessageOrigin,
|
|
16
|
+
PaidMediaInfo,
|
|
17
|
+
PhotoSize,
|
|
18
|
+
Poll,
|
|
19
|
+
Sticker,
|
|
20
|
+
Story,
|
|
21
|
+
Venue,
|
|
22
|
+
Video,
|
|
23
|
+
VideoNote,
|
|
24
|
+
Voice,
|
|
25
|
+
} from "./";
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* ## ExternalReplyInfo
|
|
29
|
+
* This object contains information about a message that is being replied to, which may come from another chat or forum
|
|
30
|
+
* topic.
|
|
31
|
+
* @see https://core.telegram.org/bots/api#externalreplyinfo
|
|
32
|
+
*/
|
|
33
|
+
export type ExternalReplyInfo = {
|
|
34
|
+
/**
|
|
35
|
+
* Origin of the message replied to by the given message
|
|
36
|
+
*/
|
|
37
|
+
origin: MessageOrigin;
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Optional. Chat the original message belongs to. Available only if the chat is a supergroup or a channel.
|
|
41
|
+
*/
|
|
42
|
+
chat?: Chat;
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* Optional. Unique message identifier inside the original chat. Available only if the original chat is a supergroup
|
|
46
|
+
* or a channel.
|
|
47
|
+
*/
|
|
48
|
+
message_id?: number;
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* Optional. Options used for link preview generation for the original message, if it is a text message
|
|
52
|
+
*/
|
|
53
|
+
link_preview_options?: LinkPreviewOptions;
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* Optional. Message is an animation, information about the animation
|
|
57
|
+
*/
|
|
58
|
+
animation?: Animation;
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* Optional. Message is an audio file, information about the file
|
|
62
|
+
*/
|
|
63
|
+
audio?: Audio;
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* Optional. Message is a general file, information about the file
|
|
67
|
+
*/
|
|
68
|
+
document?: Document;
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* Optional. Message contains paid media; information about the paid media
|
|
72
|
+
*/
|
|
73
|
+
paid_media?: PaidMediaInfo;
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* Optional. Message is a photo, available sizes of the photo
|
|
77
|
+
*/
|
|
78
|
+
photo?: PhotoSize[];
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* Optional. Message is a sticker, information about the sticker
|
|
82
|
+
*/
|
|
83
|
+
sticker?: Sticker;
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* Optional. Message is a forwarded story
|
|
87
|
+
*/
|
|
88
|
+
story?: Story;
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* Optional. Message is a video, information about the video
|
|
92
|
+
*/
|
|
93
|
+
video?: Video;
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* Optional. Message is a video note, information about the video message
|
|
97
|
+
*/
|
|
98
|
+
video_note?: VideoNote;
|
|
99
|
+
|
|
100
|
+
/**
|
|
101
|
+
* Optional. Message is a voice message, information about the file
|
|
102
|
+
*/
|
|
103
|
+
voice?: Voice;
|
|
104
|
+
|
|
105
|
+
/**
|
|
106
|
+
* Optional. True, if the message media is covered by a spoiler animation
|
|
107
|
+
*/
|
|
108
|
+
has_media_spoiler?: boolean;
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
* Optional. Message is a checklist
|
|
112
|
+
*/
|
|
113
|
+
checklist?: Checklist;
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* Optional. Message is a shared contact, information about the contact
|
|
117
|
+
*/
|
|
118
|
+
contact?: Contact;
|
|
119
|
+
|
|
120
|
+
/**
|
|
121
|
+
* Optional. Message is a dice with random value
|
|
122
|
+
*/
|
|
123
|
+
dice?: Dice;
|
|
124
|
+
|
|
125
|
+
/**
|
|
126
|
+
* Optional. Message is a game, information about the game. [More about games](https://core.telegram.org/bots/api#games)
|
|
127
|
+
*/
|
|
128
|
+
game?: Game;
|
|
129
|
+
|
|
130
|
+
/**
|
|
131
|
+
* Optional. Message is a scheduled giveaway, information about the giveaway
|
|
132
|
+
*/
|
|
133
|
+
giveaway?: Giveaway;
|
|
134
|
+
|
|
135
|
+
/**
|
|
136
|
+
* Optional. A giveaway with public winners was completed
|
|
137
|
+
*/
|
|
138
|
+
giveaway_winners?: GiveawayWinners;
|
|
139
|
+
|
|
140
|
+
/**
|
|
141
|
+
* Optional. Message is an invoice for a payment, information about the invoice. [More about payments](https://core.telegram.org/bots/api#payments)
|
|
142
|
+
*/
|
|
143
|
+
invoice?: Invoice;
|
|
144
|
+
|
|
145
|
+
/**
|
|
146
|
+
* Optional. Message is a shared location, information about the location
|
|
147
|
+
*/
|
|
148
|
+
location?: Location;
|
|
149
|
+
|
|
150
|
+
/**
|
|
151
|
+
* Optional. Message is a native poll, information about the poll
|
|
152
|
+
*/
|
|
153
|
+
poll?: Poll;
|
|
154
|
+
|
|
155
|
+
/**
|
|
156
|
+
* Optional. Message is a venue, information about the venue
|
|
157
|
+
*/
|
|
158
|
+
venue?: Venue;
|
|
159
|
+
};
|
package/@types/File.ts
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ## File
|
|
3
|
+
* This object represents a file ready to be downloaded. The file can be downloaded via the link
|
|
4
|
+
* `https://api.telegram.org/file/bot<token>/<file_path>`.
|
|
5
|
+
* It is guaranteed that the link will be valid for at least 1 hour. When the link expires, a new one can be requested
|
|
6
|
+
* by calling getFile.
|
|
7
|
+
* > The maximum file size to download is 20 MB
|
|
8
|
+
* @see https://core.telegram.org/bots/api#file
|
|
9
|
+
*/
|
|
10
|
+
export type File = {
|
|
11
|
+
/**
|
|
12
|
+
* Identifier for this file, which can be used to download or reuse the file
|
|
13
|
+
*/
|
|
14
|
+
file_id: string;
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used
|
|
18
|
+
* to download or reuse the file.
|
|
19
|
+
*/
|
|
20
|
+
file_unique_id: string;
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Optional. File size in bytes. It can be bigger than 2^31 and some programming languages may have difficulty/silent
|
|
24
|
+
* defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision
|
|
25
|
+
* float type are safe for storing this value.
|
|
26
|
+
*/
|
|
27
|
+
file_size?: number;
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Optional. File path. Use https://api.telegram.org/file/bot<token>/<file_path> to get the file.
|
|
31
|
+
*/
|
|
32
|
+
file_path?: string;
|
|
33
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ## ForceReply
|
|
3
|
+
* Upon receiving a message with this object, Telegram clients will display a reply interface to the user (act as if
|
|
4
|
+
* the user has selected the bot's message and tapped 'Reply'). This can be extremely useful if you want to create
|
|
5
|
+
* user-friendly step-by-step interfaces without having to sacrifice privacy mode. Not supported in channels and for
|
|
6
|
+
* messages sent on behalf of a Telegram Business account.
|
|
7
|
+
* @see https://core.telegram.org/bots/api#forcereply
|
|
8
|
+
*/
|
|
9
|
+
export type ForceReply = {
|
|
10
|
+
/**
|
|
11
|
+
* Shows reply interface to the user, as if they manually selected the bot's message and tapped 'Reply'
|
|
12
|
+
*/
|
|
13
|
+
force_reply: true;
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Optional. The placeholder to be shown in the input field when the reply is active; 1-64 characters
|
|
17
|
+
*/
|
|
18
|
+
input_field_placeholder?: string;
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Optional. Use this parameter if you want to force reply from specific users only. Targets: 1) users that are
|
|
22
|
+
* @mentioned in the text of the Message object; 2) if the bot's message is a reply to a message in the same chat and
|
|
23
|
+
* forum topic, sender of the original message.
|
|
24
|
+
*/
|
|
25
|
+
selective?: boolean;
|
|
26
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ## ForumTopic
|
|
3
|
+
* This object represents a forum topic.
|
|
4
|
+
* @see https://core.telegram.org/bots/api#forumtopic
|
|
5
|
+
*/
|
|
6
|
+
export type ForumTopic = {
|
|
7
|
+
/**
|
|
8
|
+
* Unique identifier of the forum topic
|
|
9
|
+
*/
|
|
10
|
+
message_thread_id: number;
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Name of the topic
|
|
14
|
+
*/
|
|
15
|
+
name: string;
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Color of the topic icon in RGB format
|
|
19
|
+
*/
|
|
20
|
+
icon_color: string;
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Optional. Unique identifier of the custom emoji shown as the topic icon
|
|
24
|
+
*/
|
|
25
|
+
icon_custom_emoji_id?: string;
|
|
26
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ## ForumTopicCreated
|
|
3
|
+
* This object represents a service message about a new forum topic created in the chat.
|
|
4
|
+
* @see https://core.telegram.org/bots/api#forumtopiccreated
|
|
5
|
+
*/
|
|
6
|
+
export type ForumTopicCreated = {
|
|
7
|
+
/**
|
|
8
|
+
* Name of the topic
|
|
9
|
+
*/
|
|
10
|
+
name: string;
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Color of the topic icon in RGB format
|
|
14
|
+
*/
|
|
15
|
+
icon_color: number;
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Optional. Unique identifier of the custom emoji shown as the topic icon
|
|
19
|
+
*/
|
|
20
|
+
icon_custom_emoji_id: string;
|
|
21
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ## ForumTopicEdited
|
|
3
|
+
* This object represents a service message about an edited forum topic.
|
|
4
|
+
* @see https://core.telegram.org/bots/api#forumtopicedited
|
|
5
|
+
*/
|
|
6
|
+
export type ForumTopicEdited = {
|
|
7
|
+
/**
|
|
8
|
+
* Optional. New name of the topic, if it was edited
|
|
9
|
+
*/
|
|
10
|
+
name?: string;
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Optional. New identifier of the custom emoji shown as the topic icon, if it was edited; an empty string if the icon
|
|
14
|
+
* was removed
|
|
15
|
+
*/
|
|
16
|
+
icon_custom_emoji_id?: string;
|
|
17
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ## ForumTopicReopened
|
|
3
|
+
* This object represents a service message about a forum topic reopened in the chat. Currently holds no information.
|
|
4
|
+
* @see https://core.telegram.org/bots/api#forumtopicreopened
|
|
5
|
+
*/
|
|
6
|
+
export type ForumTopicReopened = Record<string, never>;
|
package/@types/Game.ts
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import type { MessageEntity, PhotoSize } from "./";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* ## Game
|
|
5
|
+
* This object represents a game. Use BotFather to create and edit games, their short names will act as unique
|
|
6
|
+
* identifiers.
|
|
7
|
+
* @see https://core.telegram.org/bots/api#game
|
|
8
|
+
*/
|
|
9
|
+
export type Game = {
|
|
10
|
+
/**
|
|
11
|
+
* Title of the game
|
|
12
|
+
*/
|
|
13
|
+
title: string;
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Description of the game
|
|
17
|
+
*/
|
|
18
|
+
description: string;
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Photo that will be displayed in the game message in chats.
|
|
22
|
+
*/
|
|
23
|
+
photo: PhotoSize[];
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Optional. Brief description of the game or high scores included in the game message. Can be automatically edited
|
|
27
|
+
* to include current high scores for the game when the bot calls setGameScore, or manually edited using
|
|
28
|
+
* editMessageText. 0-4096 characters.
|
|
29
|
+
*/
|
|
30
|
+
text?: string;
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Optional. Special entities that appear in text, such as usernames, URLs, bot commands, etc.
|
|
34
|
+
*/
|
|
35
|
+
text_entities?: MessageEntity[];
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* Optional. Animation that will be displayed in the game message in chats. Upload via BotFather
|
|
39
|
+
*/
|
|
40
|
+
animation?: Animation;
|
|
41
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { User } from "./";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* ## GameHighScore
|
|
5
|
+
* This object represents one row of the high scores table for a game.
|
|
6
|
+
* @see https://core.telegram.org/bots/api#gamehighscore
|
|
7
|
+
*/
|
|
8
|
+
export type GameHighScore = {
|
|
9
|
+
/**
|
|
10
|
+
* Position in high score table for the game
|
|
11
|
+
*/
|
|
12
|
+
position: number;
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* User
|
|
16
|
+
*/
|
|
17
|
+
user: User;
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Score
|
|
21
|
+
*/
|
|
22
|
+
score: number;
|
|
23
|
+
};
|