nyx-bot-client 1.0.0 → 1.0.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/@types/InlineQueryResultsButton.ts +1 -1
- package/@types/KeyboardButton.ts +9 -1
- package/@types/KeyboardButtonRequestManagedBot.ts +22 -0
- package/@types/ManagedBotCreated.ts +13 -0
- package/@types/ManagedBotUpdated.ts +18 -0
- package/@types/Message.ts +26 -0
- package/@types/Poll.ts +18 -3
- package/@types/PollAnswer.ts +5 -0
- package/@types/PollOption.ts +23 -2
- package/@types/PollOptionAdded.ts +29 -0
- package/@types/PollOptionDeleted.ts +29 -0
- package/@types/PreparedKeyboardButton.ts +11 -0
- package/@types/ReplyParameters.ts +5 -0
- package/@types/Update.ts +7 -1
- package/@types/User.ts +5 -0
- package/@types/index.ts +6 -0
- package/biome.json +1 -1
- package/bun.lock +21 -21
- package/package.json +7 -7
- package/utils/methods.ts +28 -0
package/@types/KeyboardButton.ts
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import type { AtMostOne } from "../utils";
|
|
2
1
|
import type {
|
|
3
2
|
KeyboardButtonPollType,
|
|
4
3
|
KeyboardButtonRequestChat,
|
|
4
|
+
KeyboardButtonRequestManagedBot,
|
|
5
5
|
KeyboardButtonRequestUsers,
|
|
6
6
|
WebAppInfo,
|
|
7
7
|
} from "./";
|
|
8
|
+
import type { AtMostOne } from "./utils";
|
|
8
9
|
|
|
9
10
|
/**
|
|
10
11
|
* ## KeyboardButton
|
|
@@ -48,6 +49,13 @@ export type KeyboardButton =
|
|
|
48
49
|
*/
|
|
49
50
|
request_chat?: KeyboardButtonRequestChat;
|
|
50
51
|
|
|
52
|
+
/**
|
|
53
|
+
* Optional. If specified, pressing the button will ask the user to create and share a bot that will be managed
|
|
54
|
+
* by the current bot. Available for bots that enabled management of other bots in the @BotFather Mini App.
|
|
55
|
+
* Available in private chats only.
|
|
56
|
+
*/
|
|
57
|
+
request_managed_bot?: KeyboardButtonRequestManagedBot;
|
|
58
|
+
|
|
51
59
|
/**
|
|
52
60
|
* Optional. If True, the user's phone number will be sent as a contact when the button is pressed. Available in
|
|
53
61
|
* private chats only.
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ## KeyboardButtonRequestManagedBot
|
|
3
|
+
* This object defines the parameters for the creation of a managed bot. Information about the created bot will be
|
|
4
|
+
* shared with the bot using the update managed_bot and a Message with the field managed_bot_created.
|
|
5
|
+
* @see https://core.telegram.org/bots/api#keyboardbuttonrequestmanagedbot
|
|
6
|
+
*/
|
|
7
|
+
export type KeyboardButtonRequestManagedBot = {
|
|
8
|
+
/**
|
|
9
|
+
* Signed 32-bit identifier of the request. Must be unique within the message
|
|
10
|
+
*/
|
|
11
|
+
request_id: number;
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Optional. Suggested name for the bot
|
|
15
|
+
*/
|
|
16
|
+
suggested_name?: string;
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Optional. Suggested username for the bot
|
|
20
|
+
*/
|
|
21
|
+
suggested_username?: string;
|
|
22
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { User } from "./";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* ## ManagedBotCreated
|
|
5
|
+
* This object contains information about the bot that was created to be managed by the current bot.
|
|
6
|
+
* @see https://core.telegram.org/bots/api#managedbotcreated
|
|
7
|
+
*/
|
|
8
|
+
export type ManagedBotCreated = {
|
|
9
|
+
/**
|
|
10
|
+
* Information about the bot. The bot's token can be fetched using the method getManagedBotToken.
|
|
11
|
+
*/
|
|
12
|
+
bot: User;
|
|
13
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { User } from "./";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* ## ManagedBotUpdated
|
|
5
|
+
* This object contains information about the creation or token update of a bot that is managed by the current bot.
|
|
6
|
+
* @see https://core.telegram.org/bots/api#managedbotupdated
|
|
7
|
+
*/
|
|
8
|
+
export type ManagedBotUpdated = {
|
|
9
|
+
/**
|
|
10
|
+
* User that created the bot
|
|
11
|
+
*/
|
|
12
|
+
user: User;
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Information about the bot. Token of the bot can be fetched using the method getManagedBotToken.
|
|
16
|
+
*/
|
|
17
|
+
bot: User;
|
|
18
|
+
};
|
package/@types/Message.ts
CHANGED
|
@@ -32,6 +32,7 @@ import type {
|
|
|
32
32
|
Invoice,
|
|
33
33
|
LinkPreviewOptions,
|
|
34
34
|
Location,
|
|
35
|
+
ManagedBotCreated,
|
|
35
36
|
MaybeInaccessibleMessage,
|
|
36
37
|
MessageAutoDeleteTimerChanged,
|
|
37
38
|
MessageEntity,
|
|
@@ -41,6 +42,8 @@ import type {
|
|
|
41
42
|
PassportData,
|
|
42
43
|
PhotoSize,
|
|
43
44
|
Poll,
|
|
45
|
+
PollOptionAdded,
|
|
46
|
+
PollOptionDeleted,
|
|
44
47
|
ProximityAlertTriggered,
|
|
45
48
|
RefundedPayment,
|
|
46
49
|
Sticker,
|
|
@@ -178,6 +181,11 @@ export type Message = {
|
|
|
178
181
|
*/
|
|
179
182
|
reply_to_checklist_task_id?: number;
|
|
180
183
|
|
|
184
|
+
/**
|
|
185
|
+
* Optional. Persistent identifier of the specific poll option that is being replied to
|
|
186
|
+
*/
|
|
187
|
+
reply_to_poll_option_id?: string;
|
|
188
|
+
|
|
181
189
|
/**
|
|
182
190
|
* Optional. Bot through which the message was sent
|
|
183
191
|
*/
|
|
@@ -577,11 +585,26 @@ export type Message = {
|
|
|
577
585
|
*/
|
|
578
586
|
giveaway_completed?: GiveawayCompleted;
|
|
579
587
|
|
|
588
|
+
/**
|
|
589
|
+
* Optional. Service message: user created a bot that will be managed by the current bot
|
|
590
|
+
*/
|
|
591
|
+
managed_bot_created?: ManagedBotCreated;
|
|
592
|
+
|
|
580
593
|
/**
|
|
581
594
|
* Optional. Service message: the price for paid messages has changed in the chat
|
|
582
595
|
*/
|
|
583
596
|
paid_message_price_changed?: PaidMessagePriceChanged;
|
|
584
597
|
|
|
598
|
+
/**
|
|
599
|
+
* Optional. Service message: answer option was added to a poll
|
|
600
|
+
*/
|
|
601
|
+
poll_option_added?: PollOptionAdded;
|
|
602
|
+
|
|
603
|
+
/**
|
|
604
|
+
* Optional. Service message: answer option was deleted from a poll
|
|
605
|
+
*/
|
|
606
|
+
poll_option_deleted?: PollOptionDeleted;
|
|
607
|
+
|
|
585
608
|
/**
|
|
586
609
|
* Optional. Service message: a suggested post was approved
|
|
587
610
|
*/
|
|
@@ -699,7 +722,10 @@ export const messageTypes = [
|
|
|
699
722
|
"giveaway",
|
|
700
723
|
"giveaway_winners",
|
|
701
724
|
"giveaway_completed",
|
|
725
|
+
"managed_bot_created",
|
|
702
726
|
"paid_message_price_changed",
|
|
727
|
+
"poll_option_added",
|
|
728
|
+
"poll_option_deleted",
|
|
703
729
|
"suggested_post_approved",
|
|
704
730
|
"suggested_post_approval_failed",
|
|
705
731
|
"suggested_post_declined",
|
package/@types/Poll.ts
CHANGED
|
@@ -53,10 +53,15 @@ export type Poll = {
|
|
|
53
53
|
allows_multiple_answers: boolean;
|
|
54
54
|
|
|
55
55
|
/**
|
|
56
|
-
*
|
|
57
|
-
* closed, or was sent (not forwarded) by the bot or to the private chat with the bot.
|
|
56
|
+
* True, if the poll allows to change the chosen answer options
|
|
58
57
|
*/
|
|
59
|
-
|
|
58
|
+
allows_revoting: boolean;
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* Optional. Array of 0-based identifiers of the correct answer options. Available only for polls in quiz mode which
|
|
62
|
+
* are closed or were sent (not forwarded) by the bot or to the private chat with the bot.
|
|
63
|
+
*/
|
|
64
|
+
correct_option_ids?: number[];
|
|
60
65
|
|
|
61
66
|
/**
|
|
62
67
|
* Optional. Text that is shown when a user chooses an incorrect answer or taps on the lamp icon in a quiz-style poll,
|
|
@@ -78,4 +83,14 @@ export type Poll = {
|
|
|
78
83
|
* Optional. Point in time (Unix timestamp) when the poll will be automatically closed
|
|
79
84
|
*/
|
|
80
85
|
close_date?: number;
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* Optional. Description of the poll; for polls inside the Message object only
|
|
89
|
+
*/
|
|
90
|
+
description?: string;
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* Optional. Special entities like usernames, URLs, bot commands, etc. that appear in the description
|
|
94
|
+
*/
|
|
95
|
+
description_entities?: MessageEntity[];
|
|
81
96
|
};
|
package/@types/PollAnswer.ts
CHANGED
|
@@ -25,4 +25,9 @@ export type PollAnswer = {
|
|
|
25
25
|
* 0-based identifiers of chosen answer options. May be empty if the vote was retracted.
|
|
26
26
|
*/
|
|
27
27
|
option_ids: number[];
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Persistent identifiers of the chosen answer options. May be empty if the vote was retracted.
|
|
31
|
+
*/
|
|
32
|
+
option_persistent_ids: string[];
|
|
28
33
|
};
|
package/@types/PollOption.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { MessageEntity } from "./
|
|
1
|
+
import type { Chat, MessageEntity, User } from "./";
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* ## PollOption
|
|
@@ -6,6 +6,11 @@ import type { MessageEntity } from "./MessageEntity";
|
|
|
6
6
|
* @see https://core.telegram.org/bots/api#polloption
|
|
7
7
|
*/
|
|
8
8
|
export type PollOption = {
|
|
9
|
+
/**
|
|
10
|
+
* Unique identifier of the option, persistent on option addition and deletion
|
|
11
|
+
*/
|
|
12
|
+
persistent_id: string;
|
|
13
|
+
|
|
9
14
|
/**
|
|
10
15
|
* Option text, 1-100 characters
|
|
11
16
|
*/
|
|
@@ -18,7 +23,23 @@ export type PollOption = {
|
|
|
18
23
|
text_entities?: MessageEntity[];
|
|
19
24
|
|
|
20
25
|
/**
|
|
21
|
-
* Number of users
|
|
26
|
+
* Number of users who voted for this option; may be 0 if unknown
|
|
22
27
|
*/
|
|
23
28
|
voter_count: number;
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Optional. User who added the option; omitted if the option wasn't added by a user after poll creation
|
|
32
|
+
*/
|
|
33
|
+
added_by_user?: User;
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Optional. Chat that added the option; omitted if the option wasn't added by a chat after poll creation
|
|
37
|
+
*/
|
|
38
|
+
added_by_chat?: Chat;
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* Optional. Point in time (Unix timestamp) when the option was added; omitted if the option existed in the original
|
|
42
|
+
* poll
|
|
43
|
+
*/
|
|
44
|
+
addition_date?: number;
|
|
24
45
|
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { MaybeInaccessibleMessage, MessageEntity } from "./";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* ## PollOptionAdded
|
|
5
|
+
* Describes a service message about an option added to a poll.
|
|
6
|
+
* @see https://core.telegram.org/bots/api#polloptionadded
|
|
7
|
+
*/
|
|
8
|
+
export type PollOptionAdded = {
|
|
9
|
+
/**
|
|
10
|
+
* Optional. Message containing the poll to which the option was added, if known. Note that the Message object in this
|
|
11
|
+
* field will not contain the reply_to_message field even if it itself is a reply.
|
|
12
|
+
*/
|
|
13
|
+
poll_message?: MaybeInaccessibleMessage;
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Unique identifier of the added option
|
|
17
|
+
*/
|
|
18
|
+
option_persistent_id: string;
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Option text
|
|
22
|
+
*/
|
|
23
|
+
option_text: string;
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Optional. Special entities that appear in the option_text
|
|
27
|
+
*/
|
|
28
|
+
option_text_entities?: MessageEntity[];
|
|
29
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { MaybeInaccessibleMessage, MessageEntity } from "./";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* ## PollOptionDeleted
|
|
5
|
+
* Describes a service message about an option deleted from a poll.
|
|
6
|
+
* @see https://core.telegram.org/bots/api#polloptiondeleted
|
|
7
|
+
*/
|
|
8
|
+
export type PollOptionDeleted = {
|
|
9
|
+
/**
|
|
10
|
+
* Optional. Message containing the poll from which the option was deleted, if known. Note that the Message object in
|
|
11
|
+
* this field will not contain the reply_to_message field even if it itself is a reply.
|
|
12
|
+
*/
|
|
13
|
+
poll_message?: MaybeInaccessibleMessage;
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Unique identifier of the deleted option
|
|
17
|
+
*/
|
|
18
|
+
option_persistent_id: string;
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Option text
|
|
22
|
+
*/
|
|
23
|
+
option_text: string;
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Optional. Special entities that appear in the option_text
|
|
27
|
+
*/
|
|
28
|
+
option_text_entities?: MessageEntity[];
|
|
29
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ## PreparedKeyboardButton
|
|
3
|
+
* Describes a keyboard button to be used by a user of a Mini App.
|
|
4
|
+
* @see https://core.telegram.org/bots/api#preparedkeyboardbutton
|
|
5
|
+
*/
|
|
6
|
+
export type PreparedKeyboardButton = {
|
|
7
|
+
/**
|
|
8
|
+
* Unique identifier of the keyboard button
|
|
9
|
+
*/
|
|
10
|
+
id: string;
|
|
11
|
+
};
|
|
@@ -51,4 +51,9 @@ export type ReplyParameters = {
|
|
|
51
51
|
* Optional. Identifier of the specific checklist task to be replied to
|
|
52
52
|
*/
|
|
53
53
|
checklist_task_id?: number;
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* Optional. Persistent identifier of the specific poll option to be replied to
|
|
57
|
+
*/
|
|
58
|
+
poll_option_id?: string;
|
|
54
59
|
};
|
package/@types/Update.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import type { AtMostOne } from "../utils";
|
|
2
1
|
import type {
|
|
3
2
|
BusinessConnection,
|
|
4
3
|
BusinessMessagesDeleted,
|
|
@@ -9,6 +8,7 @@ import type {
|
|
|
9
8
|
ChatMemberUpdated,
|
|
10
9
|
ChosenInlineResult,
|
|
11
10
|
InlineQuery,
|
|
11
|
+
ManagedBotUpdated,
|
|
12
12
|
Message,
|
|
13
13
|
MessageReactionCountUpdated,
|
|
14
14
|
MessageReactionUpdated,
|
|
@@ -18,6 +18,7 @@ import type {
|
|
|
18
18
|
PreCheckoutQuery,
|
|
19
19
|
ShippingQuery,
|
|
20
20
|
} from "./";
|
|
21
|
+
import type { AtMostOne } from "./utils";
|
|
21
22
|
|
|
22
23
|
/**
|
|
23
24
|
* @see https://core.telegram.org/bots/api#update
|
|
@@ -149,6 +150,11 @@ export type EventTypes = {
|
|
|
149
150
|
* A boost was removed from a chat. The bot must be an administrator in the chat to receive these updates.
|
|
150
151
|
*/
|
|
151
152
|
removed_chat_boost: ChatBoostRemoved;
|
|
153
|
+
|
|
154
|
+
/**
|
|
155
|
+
* A new bot was created to be managed by the bot or token of a bot was changed
|
|
156
|
+
*/
|
|
157
|
+
managed_bot: ManagedBotUpdated;
|
|
152
158
|
};
|
|
153
159
|
|
|
154
160
|
/**
|
package/@types/User.ts
CHANGED
|
@@ -81,4 +81,9 @@ export type User = {
|
|
|
81
81
|
* Optional. True, if the bot allows users to create and delete topics in private chats. Returned only in getMe.
|
|
82
82
|
*/
|
|
83
83
|
allows_users_to_create_topics?: boolean;
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* Optional. True, if other bots can be created to be controlled by the bot. Returned only in getMe.
|
|
87
|
+
*/
|
|
88
|
+
can_manage_bots?: boolean;
|
|
84
89
|
};
|
package/@types/index.ts
CHANGED
|
@@ -151,12 +151,15 @@ export * from "./index";
|
|
|
151
151
|
export * from "./KeyboardButton";
|
|
152
152
|
export * from "./KeyboardButtonPollType";
|
|
153
153
|
export * from "./KeyboardButtonRequestChat";
|
|
154
|
+
export * from "./KeyboardButtonRequestManagedBot";
|
|
154
155
|
export * from "./KeyboardButtonRequestUsers";
|
|
155
156
|
export * from "./LabeledPrice";
|
|
156
157
|
export * from "./LinkPreviewOptions";
|
|
157
158
|
export * from "./Location";
|
|
158
159
|
export * from "./LocationAddress";
|
|
159
160
|
export * from "./LoginUrl";
|
|
161
|
+
export * from "./ManagedBotCreated";
|
|
162
|
+
export * from "./ManagedBotUpdated";
|
|
160
163
|
export * from "./MaskPosition";
|
|
161
164
|
export * from "./MaybeInaccessibleMessage";
|
|
162
165
|
export * from "./MenuButton";
|
|
@@ -207,8 +210,11 @@ export * from "./PhotoSize";
|
|
|
207
210
|
export * from "./Poll";
|
|
208
211
|
export * from "./PollAnswer";
|
|
209
212
|
export * from "./PollOption";
|
|
213
|
+
export * from "./PollOptionAdded";
|
|
214
|
+
export * from "./PollOptionDeleted";
|
|
210
215
|
export * from "./PreCheckoutQuery";
|
|
211
216
|
export * from "./PreparedInlineMessage";
|
|
217
|
+
export * from "./PreparedKeyboardButton";
|
|
212
218
|
export * from "./ProximityAlertTriggered";
|
|
213
219
|
export * from "./ReactionCount";
|
|
214
220
|
export * from "./ReactionType";
|
package/biome.json
CHANGED
package/bun.lock
CHANGED
|
@@ -5,12 +5,12 @@
|
|
|
5
5
|
"": {
|
|
6
6
|
"name": "nyx-bot-client",
|
|
7
7
|
"dependencies": {
|
|
8
|
-
"@biomejs/biome": "^2.4.
|
|
9
|
-
"@types/node": "^25.
|
|
10
|
-
"dotenv": "^17.
|
|
11
|
-
"kysely": "^0.28.
|
|
12
|
-
"mysql2": "^3.
|
|
13
|
-
"ts-debounce": "^
|
|
8
|
+
"@biomejs/biome": "^2.4.12",
|
|
9
|
+
"@types/node": "^25.6.0",
|
|
10
|
+
"dotenv": "^17.4.2",
|
|
11
|
+
"kysely": "^0.28.16",
|
|
12
|
+
"mysql2": "^3.22.1",
|
|
13
|
+
"ts-debounce": "^5.0.0",
|
|
14
14
|
"zod": "^4.3.6",
|
|
15
15
|
},
|
|
16
16
|
"devDependencies": {
|
|
@@ -22,27 +22,27 @@
|
|
|
22
22
|
},
|
|
23
23
|
},
|
|
24
24
|
"packages": {
|
|
25
|
-
"@biomejs/biome": ["@biomejs/biome@2.4.
|
|
25
|
+
"@biomejs/biome": ["@biomejs/biome@2.4.12", "", { "optionalDependencies": { "@biomejs/cli-darwin-arm64": "2.4.12", "@biomejs/cli-darwin-x64": "2.4.12", "@biomejs/cli-linux-arm64": "2.4.12", "@biomejs/cli-linux-arm64-musl": "2.4.12", "@biomejs/cli-linux-x64": "2.4.12", "@biomejs/cli-linux-x64-musl": "2.4.12", "@biomejs/cli-win32-arm64": "2.4.12", "@biomejs/cli-win32-x64": "2.4.12" }, "bin": { "biome": "bin/biome" } }, "sha512-Rro7adQl3NLq/zJCIL98eElXKI8eEiBtoeu5TbXF/U3qbjuSc7Jb5rjUbeHHcquDWeSf3HnGP7XI5qGrlRk/pA=="],
|
|
26
26
|
|
|
27
|
-
"@biomejs/cli-darwin-arm64": ["@biomejs/cli-darwin-arm64@2.4.
|
|
27
|
+
"@biomejs/cli-darwin-arm64": ["@biomejs/cli-darwin-arm64@2.4.12", "", { "os": "darwin", "cpu": "arm64" }, "sha512-BnMU4Pc3ciEVteVpZ0BK33MLr7X57F5w1dwDLDn+/iy/yTrA4Q/N2yftidFtsA4vrDh0FMXDpacNV/Tl3fbmng=="],
|
|
28
28
|
|
|
29
|
-
"@biomejs/cli-darwin-x64": ["@biomejs/cli-darwin-x64@2.4.
|
|
29
|
+
"@biomejs/cli-darwin-x64": ["@biomejs/cli-darwin-x64@2.4.12", "", { "os": "darwin", "cpu": "x64" }, "sha512-x9uJ0bI1rJsWICp3VH8w/5PnAVD3A7SqzDpbrfoUQX1QyWrK5jSU4fRLo/wSgGeplCivbxBRKmt5Xq4/nWvq8A=="],
|
|
30
30
|
|
|
31
|
-
"@biomejs/cli-linux-arm64": ["@biomejs/cli-linux-arm64@2.4.
|
|
31
|
+
"@biomejs/cli-linux-arm64": ["@biomejs/cli-linux-arm64@2.4.12", "", { "os": "linux", "cpu": "arm64" }, "sha512-tOwuCuZZtKi1jVzbk/5nXmIsziOB6yqN8c9r9QM0EJYPU6DpQWf11uBOSCfFKKM4H3d9ZoarvlgMfbcuD051Pw=="],
|
|
32
32
|
|
|
33
|
-
"@biomejs/cli-linux-arm64-musl": ["@biomejs/cli-linux-arm64-musl@2.4.
|
|
33
|
+
"@biomejs/cli-linux-arm64-musl": ["@biomejs/cli-linux-arm64-musl@2.4.12", "", { "os": "linux", "cpu": "arm64" }, "sha512-FhfpkAAlKL6kwvcVap0Hgp4AhZmtd3YImg0kK1jd7C/aSoh4SfsB2f++yG1rU0lr8Y5MCFJrcSkmssiL9Xnnig=="],
|
|
34
34
|
|
|
35
|
-
"@biomejs/cli-linux-x64": ["@biomejs/cli-linux-x64@2.4.
|
|
35
|
+
"@biomejs/cli-linux-x64": ["@biomejs/cli-linux-x64@2.4.12", "", { "os": "linux", "cpu": "x64" }, "sha512-8pFeAnLU9QdW9jCIslB/v82bI0lhBmz2ZAKc8pVMFPO0t0wAHsoEkrUQUbMkIorTRIjbqyNZHA3lEXavsPWYSw=="],
|
|
36
36
|
|
|
37
|
-
"@biomejs/cli-linux-x64-musl": ["@biomejs/cli-linux-x64-musl@2.4.
|
|
37
|
+
"@biomejs/cli-linux-x64-musl": ["@biomejs/cli-linux-x64-musl@2.4.12", "", { "os": "linux", "cpu": "x64" }, "sha512-dwTIgZrGutzhkQCuvHynCkyW6hJxUuyZqKKO0YNfaS2GUoRO+tOvxXZqZB6SkWAOdfZTzwaw8IEdUnIkHKHoew=="],
|
|
38
38
|
|
|
39
|
-
"@biomejs/cli-win32-arm64": ["@biomejs/cli-win32-arm64@2.4.
|
|
39
|
+
"@biomejs/cli-win32-arm64": ["@biomejs/cli-win32-arm64@2.4.12", "", { "os": "win32", "cpu": "arm64" }, "sha512-B0DLnx0vA9ya/3v7XyCaP+/lCpnbWbMOfUFFve+xb5OxyYvdHaS55YsSddr228Y+JAFk58agCuZTsqNiw2a6ig=="],
|
|
40
40
|
|
|
41
|
-
"@biomejs/cli-win32-x64": ["@biomejs/cli-win32-x64@2.4.
|
|
41
|
+
"@biomejs/cli-win32-x64": ["@biomejs/cli-win32-x64@2.4.12", "", { "os": "win32", "cpu": "x64" }, "sha512-yMckRzTyZ83hkk8iDFWswqSdU8tvZxspJKnYNh7JZr/zhZNOlzH13k4ecboU6MurKExCe2HUkH75pGI/O2JwGA=="],
|
|
42
42
|
|
|
43
43
|
"@types/bun": ["@types/bun@1.2.17", "", { "dependencies": { "bun-types": "1.2.17" } }, "sha512-l/BYs/JYt+cXA/0+wUhulYJB6a6p//GTPiJ7nV+QHa8iiId4HZmnu/3J/SowP5g0rTiERY2kfGKXEK5Ehltx4Q=="],
|
|
44
44
|
|
|
45
|
-
"@types/node": ["@types/node@25.
|
|
45
|
+
"@types/node": ["@types/node@25.6.0", "", { "dependencies": { "undici-types": "~7.19.0" } }, "sha512-+qIYRKdNYJwY3vRCZMdJbPLJAtGjQBudzZzdzwQYkEPQd+PJGixUL5QfvCLDaULoLv+RhT3LDkwEfKaAkgSmNQ=="],
|
|
46
46
|
|
|
47
47
|
"aws-ssl-profiles": ["aws-ssl-profiles@1.1.2", "", {}, "sha512-NZKeq9AfyQvEeNlN0zSYAaWrmBffJh3IELMZfRpJVWgrpEbtEpnjvzqBPf+mxoI287JohRDoa+/nsfqqiZmF6g=="],
|
|
48
48
|
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
|
|
51
51
|
"denque": ["denque@2.1.0", "", {}, "sha512-HVQE3AAb/pxF8fQAoiqpvg9i3evqug3hoiwakOyZAwJm+6vZehbkYXZ0l4JxS+I3QxM97v5aaRNhj8v5oBhekw=="],
|
|
52
52
|
|
|
53
|
-
"dotenv": ["dotenv@17.
|
|
53
|
+
"dotenv": ["dotenv@17.4.2", "", {}, "sha512-nI4U3TottKAcAD9LLud4Cb7b2QztQMUEfHbvhTH09bqXTxnSie8WnjPALV/WMCrJZ6UV/qHJ6L03OqO3LcdYZw=="],
|
|
54
54
|
|
|
55
55
|
"generate-function": ["generate-function@2.3.1", "", { "dependencies": { "is-property": "^1.0.2" } }, "sha512-eeB5GfMNeevm/GRYq20ShmsaGcmI81kIX2K9XQx5miC8KdHaC6Jm0qQ8ZNeGOi7wYB8OsdxKs+Y2oVuTFuVwKQ=="],
|
|
56
56
|
|
|
@@ -58,13 +58,13 @@
|
|
|
58
58
|
|
|
59
59
|
"is-property": ["is-property@1.0.2", "", {}, "sha512-Ks/IoX00TtClbGQr4TWXemAnktAQvYB7HzcCxDGqEZU6oCmb2INHuOoKxbtR+HFkmYWBKv/dOZtGRiAjDhj92g=="],
|
|
60
60
|
|
|
61
|
-
"kysely": ["kysely@0.28.
|
|
61
|
+
"kysely": ["kysely@0.28.16", "", {}, "sha512-3i5pmOiZvMDj00qhrIVbH0AnioVTx22DMP7Vn5At4yJO46iy+FM8Y/g61ltenLVSo3fiO8h8Q3QOFgf/gQ72ww=="],
|
|
62
62
|
|
|
63
63
|
"long": ["long@5.3.2", "", {}, "sha512-mNAgZ1GmyNhD7AuqnTG3/VQ26o760+ZYBPKjPvugO8+nLbYfX6TVpJPseBvopbdY+qpZ/lKUnmEc1LeZYS3QAA=="],
|
|
64
64
|
|
|
65
65
|
"lru.min": ["lru.min@1.1.4", "", {}, "sha512-DqC6n3QQ77zdFpCMASA1a3Jlb64Hv2N2DciFGkO/4L9+q/IpIAuRlKOvCXabtRW6cQf8usbmM6BE/TOPysCdIA=="],
|
|
66
66
|
|
|
67
|
-
"mysql2": ["mysql2@3.
|
|
67
|
+
"mysql2": ["mysql2@3.22.1", "", { "dependencies": { "aws-ssl-profiles": "^1.1.2", "denque": "^2.1.0", "generate-function": "^2.3.1", "iconv-lite": "^0.7.2", "long": "^5.3.2", "lru.min": "^1.1.4", "named-placeholders": "^1.1.6", "sql-escaper": "^1.3.3" }, "peerDependencies": { "@types/node": ">= 8" } }, "sha512-48+9UXehKyxxiP2pqCxUq+MSFvX+v41jwsSpFDQO/jAoFuAELutBGJUhWJnDbe82/OBlIhSBMC82WeonmznT/Q=="],
|
|
68
68
|
|
|
69
69
|
"named-placeholders": ["named-placeholders@1.1.6", "", { "dependencies": { "lru.min": "^1.1.0" } }, "sha512-Tz09sEL2EEuv5fFowm419c1+a/jSMiBjI9gHxVLrVdbUkkNUUfjsVYs9pVZu5oCon/kmRh9TfLEObFtkVxmY0w=="],
|
|
70
70
|
|
|
@@ -72,11 +72,11 @@
|
|
|
72
72
|
|
|
73
73
|
"sql-escaper": ["sql-escaper@1.3.3", "", {}, "sha512-BsTCV265VpTp8tm1wyIm1xqQCS+Q9NHx2Sr+WcnUrgLrQ6yiDIvHYJV5gHxsj1lMBy2zm5twLaZao8Jd+S8JJw=="],
|
|
74
74
|
|
|
75
|
-
"ts-debounce": ["ts-debounce@
|
|
75
|
+
"ts-debounce": ["ts-debounce@5.0.0", "", {}, "sha512-u0TCPC1koR5OcYC8hUC9ZisNlkxW87VejeoK+qX2in0grK1Dy0Fjlq9diNwHsFZwbFjM5lCTloRPPrs4TcPPug=="],
|
|
76
76
|
|
|
77
77
|
"typescript": ["typescript@5.8.3", "", { "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" } }, "sha512-p1diW6TqL9L07nNxvRMM7hMMw4c5XOo/1ibL4aAIGmSAt9slTE1Xgw5KWuof2uTOvCg9BY7ZRi+GaF+7sfgPeQ=="],
|
|
78
78
|
|
|
79
|
-
"undici-types": ["undici-types@7.
|
|
79
|
+
"undici-types": ["undici-types@7.19.2", "", {}, "sha512-qYVnV5OEm2AW8cJMCpdV20CDyaN3g0AjDlOGf1OW4iaDEx8MwdtChUp4zu4H0VP3nDRF/8RKWH+IPp9uW0YGZg=="],
|
|
80
80
|
|
|
81
81
|
"zod": ["zod@4.3.6", "", {}, "sha512-rftlrkhHZOcjDwkGlnUtZZkvaPHCsDATp4pGpuOOMDaTdDDXF91wuVDJoWoPsKX/3YPQ5fHuF3STjcYyKr+Qhg=="],
|
|
82
82
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nyx-bot-client",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.1",
|
|
4
4
|
"module": "index.ts",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"devDependencies": {
|
|
@@ -10,12 +10,12 @@
|
|
|
10
10
|
"typescript": "^5"
|
|
11
11
|
},
|
|
12
12
|
"dependencies": {
|
|
13
|
-
"@biomejs/biome": "^2.4.
|
|
14
|
-
"@types/node": "^25.
|
|
15
|
-
"dotenv": "^17.
|
|
16
|
-
"kysely": "^0.28.
|
|
17
|
-
"mysql2": "^3.
|
|
18
|
-
"ts-debounce": "^
|
|
13
|
+
"@biomejs/biome": "^2.4.12",
|
|
14
|
+
"@types/node": "^25.6.0",
|
|
15
|
+
"dotenv": "^17.4.2",
|
|
16
|
+
"kysely": "^0.28.16",
|
|
17
|
+
"mysql2": "^3.22.1",
|
|
18
|
+
"ts-debounce": "^5.0.0",
|
|
19
19
|
"zod": "^4.3.6"
|
|
20
20
|
}
|
|
21
21
|
}
|
package/utils/methods.ts
CHANGED
|
@@ -29,6 +29,7 @@ import type {
|
|
|
29
29
|
InputPollOption,
|
|
30
30
|
InputProfilePhoto,
|
|
31
31
|
InputSticker,
|
|
32
|
+
KeyboardButton,
|
|
32
33
|
LabeledPrice,
|
|
33
34
|
LinkPreviewOptions,
|
|
34
35
|
MaskPosition,
|
|
@@ -39,6 +40,7 @@ import type {
|
|
|
39
40
|
OwnedGifts,
|
|
40
41
|
PassportElementError,
|
|
41
42
|
Poll,
|
|
43
|
+
PreparedKeyboardButton,
|
|
42
44
|
ReactionType,
|
|
43
45
|
ReplyKeyboardMarkup,
|
|
44
46
|
ReplyKeyboardRemove,
|
|
@@ -2104,3 +2106,29 @@ export type setChatMemberTagParams = {
|
|
|
2104
2106
|
|
|
2105
2107
|
export const setChatMemberTag = (params: setChatMemberTagParams): APIResponse =>
|
|
2106
2108
|
requestTelegramAPI("setChatMemberTag", params);
|
|
2109
|
+
|
|
2110
|
+
export type getManagedBotTokenParams = {
|
|
2111
|
+
user_id: number;
|
|
2112
|
+
} & methodParams;
|
|
2113
|
+
|
|
2114
|
+
export const getManagedBotToken = (
|
|
2115
|
+
params: getManagedBotTokenParams,
|
|
2116
|
+
): APIResponse<string> => requestTelegramAPI("getManagedBotToken", params);
|
|
2117
|
+
|
|
2118
|
+
export type replaceManagedBotTokenParams = {
|
|
2119
|
+
user_id: number;
|
|
2120
|
+
} & methodParams;
|
|
2121
|
+
|
|
2122
|
+
export const replaceManagedBotToken = (
|
|
2123
|
+
params: replaceManagedBotTokenParams,
|
|
2124
|
+
): APIResponse<string> => requestTelegramAPI("replaceManagedBotToken", params);
|
|
2125
|
+
|
|
2126
|
+
export type savePreparedKeyboardButtonParams = {
|
|
2127
|
+
user_id: number;
|
|
2128
|
+
button: KeyboardButton;
|
|
2129
|
+
} & methodParams;
|
|
2130
|
+
|
|
2131
|
+
export const savePreparedKeyboardButton = (
|
|
2132
|
+
params: savePreparedKeyboardButtonParams,
|
|
2133
|
+
): APIResponse<PreparedKeyboardButton> =>
|
|
2134
|
+
requestTelegramAPI("savePreparedKeyboardButton", params);
|