nyx-bot-client 1.0.0 → 1.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.
Files changed (62) hide show
  1. package/@types/BackgroundFillSolid.ts +1 -1
  2. package/@types/BackgroundTypePattern.ts +2 -2
  3. package/@types/BackgroundTypeWallpaper.ts +2 -2
  4. package/@types/BotAccessSettings.ts +18 -0
  5. package/@types/ChatMemberRestricted.ts +5 -0
  6. package/@types/ChatPermissions.ts +8 -1
  7. package/@types/ExternalReplyInfo.ts +6 -0
  8. package/@types/ForumTopic.ts +1 -1
  9. package/@types/ForumTopicCreated.ts +1 -1
  10. package/@types/Giveaway.ts +2 -2
  11. package/@types/GiveawayCompleted.ts +3 -3
  12. package/@types/InlineQueryResultArticle.ts +3 -3
  13. package/@types/InlineQueryResultGif.ts +1 -1
  14. package/@types/InlineQueryResultMpeg4Gif.ts +1 -1
  15. package/@types/InlineQueryResultVenue.ts +5 -0
  16. package/@types/InlineQueryResultsButton.ts +1 -1
  17. package/@types/InputInvoiceMessageContent.ts +1 -1
  18. package/@types/InputMedia.ts +4 -1
  19. package/@types/InputMediaLivePhoto.ts +54 -0
  20. package/@types/InputMediaLocation.ts +26 -0
  21. package/@types/InputMediaSticker.ts +26 -0
  22. package/@types/InputMediaVenue.ts +52 -0
  23. package/@types/InputPaidMedia.ts +6 -1
  24. package/@types/InputPaidMediaLivePhoto.ts +29 -0
  25. package/@types/InputPollMedia.ts +33 -0
  26. package/@types/InputPollOption.ts +6 -1
  27. package/@types/InputPollOptionMedia.ts +30 -0
  28. package/@types/KeyboardButton.ts +9 -1
  29. package/@types/KeyboardButtonRequestChat.ts +2 -2
  30. package/@types/KeyboardButtonRequestManagedBot.ts +22 -0
  31. package/@types/LivePhoto.ts +51 -0
  32. package/@types/ManagedBotCreated.ts +13 -0
  33. package/@types/ManagedBotUpdated.ts +18 -0
  34. package/@types/Message.ts +51 -0
  35. package/@types/MessageReactionUpdated.ts +2 -2
  36. package/@types/OrderInfo.ts +1 -1
  37. package/@types/OwnedGiftUnique.ts +2 -2
  38. package/@types/PaidMedia.ts +8 -2
  39. package/@types/PaidMediaLivePhoto.ts +18 -0
  40. package/@types/PaidMediaVideo.ts +1 -1
  41. package/@types/PaidMessagePriceChanged.ts +4 -8
  42. package/@types/Poll.ts +41 -4
  43. package/@types/PollAnswer.ts +7 -2
  44. package/@types/PollMedia.ts +63 -0
  45. package/@types/PollOption.ts +28 -2
  46. package/@types/PollOptionAdded.ts +29 -0
  47. package/@types/PollOptionDeleted.ts +29 -0
  48. package/@types/PreparedKeyboardButton.ts +11 -0
  49. package/@types/ReplyKeyboardMarkup.ts +1 -1
  50. package/@types/ReplyParameters.ts +7 -2
  51. package/@types/SentGuestMessage.ts +11 -0
  52. package/@types/SentWebAppMessage.ts +1 -1
  53. package/@types/SwitchInlineQueryChosenChat.ts +1 -1
  54. package/@types/TextQuote.ts +2 -2
  55. package/@types/Update.ts +13 -1
  56. package/@types/User.ts +11 -2
  57. package/@types/WebhookInfo.ts +1 -1
  58. package/@types/index.ts +18 -0
  59. package/biome.json +1 -1
  60. package/bun.lock +23 -23
  61. package/package.json +8 -8
  62. package/utils/methods.ts +168 -0
package/@types/User.ts CHANGED
@@ -56,14 +56,18 @@ export type User = {
56
56
  */
57
57
  can_read_all_group_messages?: boolean;
58
58
 
59
+ /**
60
+ * Optional. True, if the bot supports guest queries from chats it is not a member of. Returned only in getMe.
61
+ */
62
+ supports_guest_queries?: boolean;
63
+
59
64
  /**
60
65
  * Optional. True, if the bot supports inline queries. Returned only in getMe.
61
66
  */
62
67
  supports_inline_queries?: boolean;
63
68
 
64
69
  /**
65
- * Optional. True, if the bot can be connected to a Telegram Business account to receive its messages. Returned only
66
- * in getMe.
70
+ * Optional. True, if the bot can be connected to a user account to manage it. Returned only in getMe.
67
71
  */
68
72
  can_connect_to_business?: boolean;
69
73
 
@@ -81,4 +85,9 @@ export type User = {
81
85
  * Optional. True, if the bot allows users to create and delete topics in private chats. Returned only in getMe.
82
86
  */
83
87
  allows_users_to_create_topics?: boolean;
88
+
89
+ /**
90
+ * Optional. True, if other bots can be created to be controlled by the bot. Returned only in getMe.
91
+ */
92
+ can_manage_bots?: boolean;
84
93
  };
@@ -45,7 +45,7 @@ export type WebhookInfo = {
45
45
  /**
46
46
  * Optional. The maximum allowed number of simultaneous HTTPS connections to the webhook for update delivery
47
47
  */
48
- max_connections?: string;
48
+ max_connections?: number;
49
49
 
50
50
  /**
51
51
  * Optional. A list of update types the bot is subscribed to. Defaults to all update types except chat_member
package/@types/index.ts CHANGED
@@ -12,6 +12,7 @@ export * from "./BackgroundTypeFill";
12
12
  export * from "./BackgroundTypePattern";
13
13
  export * from "./BackgroundTypeWallpaper";
14
14
  export * from "./Birthdate";
15
+ export * from "./BotAccessSettings";
15
16
  export * from "./BotCommand";
16
17
  export * from "./BotCommandScope";
17
18
  export * from "./BotCommandScopeAllChatAdministrators";
@@ -130,13 +131,20 @@ export * from "./InputMedia";
130
131
  export * from "./InputMediaAnimation";
131
132
  export * from "./InputMediaAudio";
132
133
  export * from "./InputMediaDocument";
134
+ export * from "./InputMediaLivePhoto";
135
+ export * from "./InputMediaLocation";
133
136
  export * from "./InputMediaPhoto";
137
+ export * from "./InputMediaSticker";
138
+ export * from "./InputMediaVenue";
134
139
  export * from "./InputMediaVideo";
135
140
  export * from "./InputMessageContent";
136
141
  export * from "./InputPaidMedia";
142
+ export * from "./InputPaidMediaLivePhoto";
137
143
  export * from "./InputPaidMediaPhoto";
138
144
  export * from "./InputPaidMediaVideo";
145
+ export * from "./InputPollMedia";
139
146
  export * from "./InputPollOption";
147
+ export * from "./InputPollOptionMedia";
140
148
  export * from "./InputProfilePhoto";
141
149
  export * from "./InputProfilePhotoAnimated";
142
150
  export * from "./InputProfilePhotoStatic";
@@ -151,12 +159,16 @@ export * from "./index";
151
159
  export * from "./KeyboardButton";
152
160
  export * from "./KeyboardButtonPollType";
153
161
  export * from "./KeyboardButtonRequestChat";
162
+ export * from "./KeyboardButtonRequestManagedBot";
154
163
  export * from "./KeyboardButtonRequestUsers";
155
164
  export * from "./LabeledPrice";
156
165
  export * from "./LinkPreviewOptions";
166
+ export * from "./LivePhoto";
157
167
  export * from "./Location";
158
168
  export * from "./LocationAddress";
159
169
  export * from "./LoginUrl";
170
+ export * from "./ManagedBotCreated";
171
+ export * from "./ManagedBotUpdated";
160
172
  export * from "./MaskPosition";
161
173
  export * from "./MaybeInaccessibleMessage";
162
174
  export * from "./MenuButton";
@@ -183,6 +195,7 @@ export * from "./PaidMedia";
183
195
  export * from "./PaidMedia";
184
196
  export * from "./PaidMediaInfo";
185
197
  export * from "./PaidMediaInfo";
198
+ export * from "./PaidMediaLivePhoto";
186
199
  export * from "./PaidMediaPhoto";
187
200
  export * from "./PaidMediaPhoto";
188
201
  export * from "./PaidMediaPreview";
@@ -206,9 +219,13 @@ export * from "./PassportFile";
206
219
  export * from "./PhotoSize";
207
220
  export * from "./Poll";
208
221
  export * from "./PollAnswer";
222
+ export * from "./PollMedia";
209
223
  export * from "./PollOption";
224
+ export * from "./PollOptionAdded";
225
+ export * from "./PollOptionDeleted";
210
226
  export * from "./PreCheckoutQuery";
211
227
  export * from "./PreparedInlineMessage";
228
+ export * from "./PreparedKeyboardButton";
212
229
  export * from "./ProximityAlertTriggered";
213
230
  export * from "./ReactionCount";
214
231
  export * from "./ReactionType";
@@ -224,6 +241,7 @@ export * from "./RevenueWithdrawalState";
224
241
  export * from "./RevenueWithdrawalStateFailed";
225
242
  export * from "./RevenueWithdrawalStatePending";
226
243
  export * from "./RevenueWithdrawalStateSucceeded";
244
+ export * from "./SentGuestMessage";
227
245
  export * from "./SentWebAppMessage";
228
246
  export * from "./SharedUser";
229
247
  export * from "./ShippingAddress";
package/biome.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "$schema": "https://biomejs.dev/schemas/2.4.6/schema.json",
2
+ "$schema": "https://biomejs.dev/schemas/2.4.14/schema.json",
3
3
  "formatter": {
4
4
  "enabled": true,
5
5
  "indentStyle": "tab",
package/bun.lock CHANGED
@@ -5,13 +5,13 @@
5
5
  "": {
6
6
  "name": "nyx-bot-client",
7
7
  "dependencies": {
8
- "@biomejs/biome": "^2.4.6",
9
- "@types/node": "^25.3.5",
10
- "dotenv": "^17.3.1",
11
- "kysely": "^0.28.11",
12
- "mysql2": "^3.19.0",
13
- "ts-debounce": "^4.0.0",
14
- "zod": "^4.3.6",
8
+ "@biomejs/biome": "^2.4.14",
9
+ "@types/node": "^25.6.2",
10
+ "dotenv": "^17.4.2",
11
+ "kysely": "^0.28.17",
12
+ "mysql2": "^3.22.3",
13
+ "ts-debounce": "^5.0.1",
14
+ "zod": "^4.4.3",
15
15
  },
16
16
  "devDependencies": {
17
17
  "@types/bun": "latest",
@@ -22,27 +22,27 @@
22
22
  },
23
23
  },
24
24
  "packages": {
25
- "@biomejs/biome": ["@biomejs/biome@2.4.6", "", { "optionalDependencies": { "@biomejs/cli-darwin-arm64": "2.4.6", "@biomejs/cli-darwin-x64": "2.4.6", "@biomejs/cli-linux-arm64": "2.4.6", "@biomejs/cli-linux-arm64-musl": "2.4.6", "@biomejs/cli-linux-x64": "2.4.6", "@biomejs/cli-linux-x64-musl": "2.4.6", "@biomejs/cli-win32-arm64": "2.4.6", "@biomejs/cli-win32-x64": "2.4.6" }, "bin": { "biome": "bin/biome" } }, "sha512-QnHe81PMslpy3mnpL8DnO2M4S4ZnYPkjlGCLWBZT/3R9M6b5daArWMMtEfP52/n174RKnwRIf3oT8+wc9ihSfQ=="],
25
+ "@biomejs/biome": ["@biomejs/biome@2.4.14", "", { "optionalDependencies": { "@biomejs/cli-darwin-arm64": "2.4.14", "@biomejs/cli-darwin-x64": "2.4.14", "@biomejs/cli-linux-arm64": "2.4.14", "@biomejs/cli-linux-arm64-musl": "2.4.14", "@biomejs/cli-linux-x64": "2.4.14", "@biomejs/cli-linux-x64-musl": "2.4.14", "@biomejs/cli-win32-arm64": "2.4.14", "@biomejs/cli-win32-x64": "2.4.14" }, "bin": { "biome": "bin/biome" } }, "sha512-TmAvxOEgrpLypzVGJ8FulIZnlyA9TxrO1hyqYrCz9r+bwma9xXxuLA5IuYnj55XQneFx460KjRbx6SWGLkg3bQ=="],
26
26
 
27
- "@biomejs/cli-darwin-arm64": ["@biomejs/cli-darwin-arm64@2.4.6", "", { "os": "darwin", "cpu": "arm64" }, "sha512-NW18GSyxr+8sJIqgoGwVp5Zqm4SALH4b4gftIA0n62PTuBs6G2tHlwNAOj0Vq0KKSs7Sf88VjjmHh0O36EnzrQ=="],
27
+ "@biomejs/cli-darwin-arm64": ["@biomejs/cli-darwin-arm64@2.4.14", "", { "os": "darwin", "cpu": "arm64" }, "sha512-XvgoE9XOawUOQPdmvs4J7wPhi/DLwSCGks3AlPJDmh34O0awRTqCED1HRcRDdpf1Zrp4us4MGOOdIxNpbqNF5Q=="],
28
28
 
29
- "@biomejs/cli-darwin-x64": ["@biomejs/cli-darwin-x64@2.4.6", "", { "os": "darwin", "cpu": "x64" }, "sha512-4uiE/9tuI7cnjtY9b07RgS7gGyYOAfIAGeVJWEfeCnAarOAS7qVmuRyX6d7JTKw28/mt+rUzMasYeZ+0R/U1Mw=="],
29
+ "@biomejs/cli-darwin-x64": ["@biomejs/cli-darwin-x64@2.4.14", "", { "os": "darwin", "cpu": "x64" }, "sha512-jE7hKBCFhOx3uUh+ZkWBfOHxAcILPfhFplNkuID/eZeSTLHzfZzoZxW8fbqY9xXRnPi7jGNAf1iPVR+0yWsM/Q=="],
30
30
 
31
- "@biomejs/cli-linux-arm64": ["@biomejs/cli-linux-arm64@2.4.6", "", { "os": "linux", "cpu": "arm64" }, "sha512-kMLaI7OF5GN1Q8Doymjro1P8rVEoy7BKQALNz6fiR8IC1WKduoNyteBtJlHT7ASIL0Cx2jR6VUOBIbcB1B8pew=="],
31
+ "@biomejs/cli-linux-arm64": ["@biomejs/cli-linux-arm64@2.4.14", "", { "os": "linux", "cpu": "arm64" }, "sha512-2TELhZnW5RSLL063l9rc5xLpA0ZIw0Ccwy/0q384rvNAgFw3yI76bd59547yxowdQr5MNPET/xDLrLuvgSeeWQ=="],
32
32
 
33
- "@biomejs/cli-linux-arm64-musl": ["@biomejs/cli-linux-arm64-musl@2.4.6", "", { "os": "linux", "cpu": "arm64" }, "sha512-F/JdB7eN22txiTqHM5KhIVt0jVkzZwVYrdTR1O3Y4auBOQcXxHK4dxULf4z43QyZI5tsnQJrRBHZy7wwtL+B3A=="],
33
+ "@biomejs/cli-linux-arm64-musl": ["@biomejs/cli-linux-arm64-musl@2.4.14", "", { "os": "linux", "cpu": "arm64" }, "sha512-/z+6gqAqqUQTHazwStxSXKHg9b8UvqBmDFRp+c4wYbq2KXhELQDon9EoC9RpmQ8JWkqQx/lIUy/cs+MhzDZp6A=="],
34
34
 
35
- "@biomejs/cli-linux-x64": ["@biomejs/cli-linux-x64@2.4.6", "", { "os": "linux", "cpu": "x64" }, "sha512-oHXmUFEoH8Lql1xfc3QkFLiC1hGR7qedv5eKNlC185or+o4/4HiaU7vYODAH3peRCfsuLr1g6v2fK9dFFOYdyw=="],
35
+ "@biomejs/cli-linux-x64": ["@biomejs/cli-linux-x64@2.4.14", "", { "os": "linux", "cpu": "x64" }, "sha512-zHrlQZDBDUz4OLAraYpWKcnLS6HOewBFWYOzY91d1ZjdqZwibOyb6BEu6WuWLugyo0P3riCmsbV9UqV1cSXwQg=="],
36
36
 
37
- "@biomejs/cli-linux-x64-musl": ["@biomejs/cli-linux-x64-musl@2.4.6", "", { "os": "linux", "cpu": "x64" }, "sha512-C9s98IPDu7DYarjlZNuzJKTjVHN03RUnmHV5htvqsx6vEUXCDSJ59DNwjKVD5XYoSS4N+BYhq3RTBAL8X6svEg=="],
37
+ "@biomejs/cli-linux-x64-musl": ["@biomejs/cli-linux-x64-musl@2.4.14", "", { "os": "linux", "cpu": "x64" }, "sha512-R6BWgJdQOwW9ulJatuTVrQkjnODjqHZkKNOqb1sz++3Noe5LYd0i3PchnOBUCYAPHoPWHhjJqbdZlHEu0hpjdA=="],
38
38
 
39
- "@biomejs/cli-win32-arm64": ["@biomejs/cli-win32-arm64@2.4.6", "", { "os": "win32", "cpu": "arm64" }, "sha512-xzThn87Pf3YrOGTEODFGONmqXpTwUNxovQb72iaUOdcw8sBSY3+3WD8Hm9IhMYLnPi0n32s3L3NWU6+eSjfqFg=="],
39
+ "@biomejs/cli-win32-arm64": ["@biomejs/cli-win32-arm64@2.4.14", "", { "os": "win32", "cpu": "arm64" }, "sha512-M3EH5hqOI/F/FUA2u4xcLoUgmxd218mvuj/6JL7Hv2toQvr2/AdOvKSpGkoRuWFCtQPVa+ZqkEV3Q5xBA9+XSA=="],
40
40
 
41
- "@biomejs/cli-win32-x64": ["@biomejs/cli-win32-x64@2.4.6", "", { "os": "win32", "cpu": "x64" }, "sha512-7++XhnsPlr1HDbor5amovPjOH6vsrFOCdp93iKXhFn6bcMUI6soodj3WWKfgEO6JosKU1W5n3uky3WW9RlRjTg=="],
41
+ "@biomejs/cli-win32-x64": ["@biomejs/cli-win32-x64@2.4.14", "", { "os": "win32", "cpu": "x64" }, "sha512-WL0EG5qE+EAKomGXbf2g6VnSKJhTL3tXC0QRzWRwA5VpjxNYa6H4P7ZWfymbGE4IhZZQi1KXQ2R0YjwInmz2fA=="],
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.3.5", "", { "dependencies": { "undici-types": "~7.18.0" } }, "sha512-oX8xrhvpiyRCQkG1MFchB09f+cXftgIXb3a7UUa4Y3wpmZPw5tyZGTLWhlESOLq1Rq6oDlc8npVU2/9xiCuXMA=="],
45
+ "@types/node": ["@types/node@25.6.2", "", { "dependencies": { "undici-types": "~7.19.0" } }, "sha512-sokuT28dxf9JT5Kady1fsXOvI4HVpjZa95NKT5y9PNTIrs2AsobR4GFAA90ZG8M+nxVRLysCXsVj6eGC7Vbrlw=="],
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.3.1", "", {}, "sha512-IO8C/dzEb6O3F9/twg6ZLXz164a2fhTnEWb95H23Dm4OuN+92NmEAlTrupP9VW6Jm3sO26tQlqyvyi4CsnY9GA=="],
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.11", "", {}, "sha512-zpGIFg0HuoC893rIjYX1BETkVWdDnzTzF5e0kWXJFg5lE0k1/LfNWBejrcnOFu8Q2Rfq/hTDTU7XLUM8QOrpzg=="],
61
+ "kysely": ["kysely@0.28.17", "", {}, "sha512-nbD8lB9EB3wNdMhOCdx5Li8DxnLbvKByylRLcJ1h+4SkrowVeECAyZlyiKMThF7xFdRz0jSQ2MoJr+wXux2y0Q=="],
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.19.0", "", { "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-760Ay9HViAUT7V8QkYxrIx/LHJPGWtE+D/31VuiDm1eu2IFaUIqMcK7+hVHnmgnC7JnnwreFKsZoa8K6BnGl8Q=="],
67
+ "mysql2": ["mysql2@3.22.3", "", { "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-uWWxvZSRvRhtBdh2CdcuK83YcOfPdmEeEYB069bAmPnV93QApDGVPuvCQOLjlh7tYHEWdgQPrn6kosDxHBVLkA=="],
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,13 +72,13 @@
72
72
 
73
73
  "sql-escaper": ["sql-escaper@1.3.3", "", {}, "sha512-BsTCV265VpTp8tm1wyIm1xqQCS+Q9NHx2Sr+WcnUrgLrQ6yiDIvHYJV5gHxsj1lMBy2zm5twLaZao8Jd+S8JJw=="],
74
74
 
75
- "ts-debounce": ["ts-debounce@4.0.0", "", {}, "sha512-+1iDGY6NmOGidq7i7xZGA4cm8DAa6fqdYcvO5Z6yBevH++Bdo9Qt/mN0TzHUgcCcKv1gmh9+W5dHqz8pMWbCbg=="],
75
+ "ts-debounce": ["ts-debounce@5.0.1", "", {}, "sha512-HzwqxastMnaSKu96T8S+fRUorxSptTawIc9004Fs6R9MduRo5IqOE6jS2RfJCl4DVwJvxdcYEXg8g5zQCQR0Ow=="],
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.18.2", "", {}, "sha512-AsuCzffGHJybSaRrmr5eHr81mwJU3kjw6M+uprWvCXiNeN9SOGwQ3Jn8jb8m3Z6izVgknn1R0FTCEAP2QrLY/w=="],
79
+ "undici-types": ["undici-types@7.19.2", "", {}, "sha512-qYVnV5OEm2AW8cJMCpdV20CDyaN3g0AjDlOGf1OW4iaDEx8MwdtChUp4zu4H0VP3nDRF/8RKWH+IPp9uW0YGZg=="],
80
80
 
81
- "zod": ["zod@4.3.6", "", {}, "sha512-rftlrkhHZOcjDwkGlnUtZZkvaPHCsDATp4pGpuOOMDaTdDDXF91wuVDJoWoPsKX/3YPQ5fHuF3STjcYyKr+Qhg=="],
81
+ "zod": ["zod@4.4.3", "", {}, "sha512-ytENFjIJFl2UwYglde2jchW2Hwm4GJFLDiSXWdTrJQBIN9Fcyp7n4DhxJEiWNAJMV1/BqWfW/kkg71UDcHJyTQ=="],
82
82
 
83
83
  "bun-types/@types/node": ["@types/node@24.0.4", "", { "dependencies": { "undici-types": "~7.8.0" } }, "sha512-ulyqAkrhnuNq9pB76DRBTkcS6YsmDALy6Ua63V8OhrOBgbcYt6IOdzpw5P1+dyRIyMerzLkeYWBeOXPpA9GMAA=="],
84
84
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nyx-bot-client",
3
- "version": "1.0.0",
3
+ "version": "1.0.2",
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.6",
14
- "@types/node": "^25.3.5",
15
- "dotenv": "^17.3.1",
16
- "kysely": "^0.28.11",
17
- "mysql2": "^3.19.0",
18
- "ts-debounce": "^4.0.0",
19
- "zod": "^4.3.6"
13
+ "@biomejs/biome": "^2.4.14",
14
+ "@types/node": "^25.6.2",
15
+ "dotenv": "^17.4.2",
16
+ "kysely": "^0.28.17",
17
+ "mysql2": "^3.22.3",
18
+ "ts-debounce": "^5.0.1",
19
+ "zod": "^4.4.3"
20
20
  }
21
21
  }
package/utils/methods.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  import type {
2
+ BotAccessSettings,
2
3
  BotCommand,
3
4
  BotCommandScope,
4
5
  BotDescription,
@@ -26,9 +27,11 @@ import type {
26
27
  InputMediaPhoto,
27
28
  InputMediaVideo,
28
29
  InputPaidMedia,
30
+ InputPollMedia,
29
31
  InputPollOption,
30
32
  InputProfilePhoto,
31
33
  InputSticker,
34
+ KeyboardButton,
32
35
  LabeledPrice,
33
36
  LinkPreviewOptions,
34
37
  MaskPosition,
@@ -39,10 +42,12 @@ import type {
39
42
  OwnedGifts,
40
43
  PassportElementError,
41
44
  Poll,
45
+ PreparedKeyboardButton,
42
46
  ReactionType,
43
47
  ReplyKeyboardMarkup,
44
48
  ReplyKeyboardRemove,
45
49
  ReplyParameters,
50
+ SentGuestMessage,
46
51
  SentWebAppMessage,
47
52
  ShippingOption,
48
53
  StarAmount,
@@ -51,6 +56,7 @@ import type {
51
56
  Sticker,
52
57
  StickerSet,
53
58
  Story,
59
+ SuggestedPostParameters,
54
60
  Update,
55
61
  User,
56
62
  UserProfilePhotos,
@@ -98,6 +104,8 @@ export type sendMessageParams = {
98
104
  protect_content?: boolean;
99
105
  allow_paid_broadcast?: boolean;
100
106
  message_effect_id?: string;
107
+ suggested_post_parameters?: SuggestedPostParameters;
108
+ direct_messages_topic_id?: number;
101
109
  reply_parameters?: ReplyParameters;
102
110
  reply_markup?:
103
111
  | InlineKeyboardMarkup
@@ -168,6 +176,8 @@ export type forwardMessageParams = {
168
176
  video_start_timestamp?: number;
169
177
  disable_notification?: boolean;
170
178
  protect_content?: boolean;
179
+ suggested_post_parameters?: SuggestedPostParameters;
180
+ direct_messages_topic_id?: number;
171
181
  } & methodParams;
172
182
 
173
183
  export const forwardMessage = (
@@ -181,6 +191,7 @@ export type forwardMessagesParams = {
181
191
  message_thread_id?: number;
182
192
  disable_notification?: boolean;
183
193
  protect_content?: boolean;
194
+ direct_messages_topic_id?: number;
184
195
  } & methodParams;
185
196
 
186
197
  export const forwardMessages = (
@@ -200,6 +211,8 @@ export type copyMessageParams = {
200
211
  disable_notification?: boolean;
201
212
  protect_content?: boolean;
202
213
  allow_paid_broadcast?: boolean;
214
+ suggested_post_parameters?: SuggestedPostParameters;
215
+ direct_messages_topic_id?: number;
203
216
  reply_parameters?: ReplyParameters;
204
217
  reply_markup?:
205
218
  | InlineKeyboardMarkup
@@ -224,6 +237,7 @@ export type copyMessagesParams = {
224
237
  disable_notification?: boolean;
225
238
  protect_content?: boolean;
226
239
  remove_caption?: boolean;
240
+ direct_messages_topic_id?: number;
227
241
  } & methodParams;
228
242
 
229
243
  export const copyMessages = (
@@ -244,6 +258,8 @@ export type sendPhotoParams = {
244
258
  protect_content?: boolean;
245
259
  allow_paid_broadcast?: boolean;
246
260
  message_effect_id?: string;
261
+ suggested_post_parameters?: SuggestedPostParameters;
262
+ direct_messages_topic_id?: number;
247
263
  reply_parameters?: ReplyParameters;
248
264
  reply_markup?:
249
265
  | InlineKeyboardMarkup
@@ -274,6 +290,8 @@ export type sendAudioParams = {
274
290
  protect_content?: boolean;
275
291
  allow_paid_broadcast?: boolean;
276
292
  message_effect_id?: string;
293
+ suggested_post_parameters?: SuggestedPostParameters;
294
+ direct_messages_topic_id?: number;
277
295
  reply_parameters?: ReplyParameters;
278
296
  reply_markup?:
279
297
  | InlineKeyboardMarkup
@@ -302,6 +320,8 @@ export type sendDocumentParams = {
302
320
  protect_content?: boolean;
303
321
  allow_paid_broadcast?: boolean;
304
322
  message_effect_id?: string;
323
+ suggested_post_parameters?: SuggestedPostParameters;
324
+ direct_messages_topic_id?: number;
305
325
  reply_parameters?: ReplyParameters;
306
326
  reply_markup?:
307
327
  | InlineKeyboardMarkup
@@ -339,6 +359,8 @@ export type sendVideoParams = {
339
359
  protect_content?: boolean;
340
360
  allow_paid_broadcast?: boolean;
341
361
  message_effect_id?: string;
362
+ suggested_post_parameters?: SuggestedPostParameters;
363
+ direct_messages_topic_id?: number;
342
364
  reply_parameters?: ReplyParameters;
343
365
  reply_markup?:
344
366
  | InlineKeyboardMarkup
@@ -371,6 +393,8 @@ export type sendAnimationParams = {
371
393
  protect_content?: boolean;
372
394
  allow_paid_broadcast?: boolean;
373
395
  message_effect_id?: string;
396
+ suggested_post_parameters?: SuggestedPostParameters;
397
+ direct_messages_topic_id?: number;
374
398
  reply_parameters?: ReplyParameters;
375
399
  reply_markup?:
376
400
  | InlineKeyboardMarkup
@@ -400,6 +424,8 @@ export type sendVoiceParams = {
400
424
  protect_content?: boolean;
401
425
  allow_paid_broadcast?: boolean;
402
426
  message_effect_id?: string;
427
+ suggested_post_parameters?: SuggestedPostParameters;
428
+ direct_messages_topic_id?: number;
403
429
  reply_parameters?: ReplyParameters;
404
430
  reply_markup?:
405
431
  | InlineKeyboardMarkup
@@ -426,6 +452,8 @@ export type sendVideoNoteParams = {
426
452
  protect_content?: boolean;
427
453
  allow_paid_broadcast?: boolean;
428
454
  message_effect_id?: string;
455
+ suggested_post_parameters?: SuggestedPostParameters;
456
+ direct_messages_topic_id?: number;
429
457
  reply_parameters?: ReplyParameters;
430
458
  reply_markup?:
431
459
  | InlineKeyboardMarkup
@@ -453,6 +481,8 @@ export type sendPaidMediaParams = {
453
481
  protect_content?: boolean;
454
482
  allow_paid_broadcast?: boolean;
455
483
  message_effect_id?: string;
484
+ suggested_post_parameters?: SuggestedPostParameters;
485
+ direct_messages_topic_id?: number;
456
486
  reply_parameters?: ReplyParameters;
457
487
  reply_markup?:
458
488
  | InlineKeyboardMarkup
@@ -482,6 +512,7 @@ export type sendMediaGroupParams = {
482
512
  protect_content?: boolean;
483
513
  allow_paid_broadcast?: boolean;
484
514
  message_effect_id?: string;
515
+ direct_messages_topic_id?: number;
485
516
  reply_parameters?: ReplyParameters;
486
517
  reply_markup?:
487
518
  | InlineKeyboardMarkup
@@ -508,6 +539,8 @@ export type sendLocationParams = {
508
539
  protect_content?: boolean;
509
540
  allow_paid_broadcast?: boolean;
510
541
  message_effect_id?: string;
542
+ suggested_post_parameters?: SuggestedPostParameters;
543
+ direct_messages_topic_id?: number;
511
544
  reply_parameters?: ReplyParameters;
512
545
  reply_markup?:
513
546
  | InlineKeyboardMarkup
@@ -536,6 +569,8 @@ export type sendVenueParams = {
536
569
  protect_content?: boolean;
537
570
  allow_paid_broadcast?: boolean;
538
571
  message_effect_id?: string;
572
+ suggested_post_parameters?: SuggestedPostParameters;
573
+ direct_messages_topic_id?: number;
539
574
  reply_parameters?: ReplyParameters;
540
575
  reply_markup?:
541
576
  | InlineKeyboardMarkup
@@ -559,6 +594,8 @@ export type sendContactParams = {
559
594
  protect_content?: boolean;
560
595
  allow_paid_broadcast?: boolean;
561
596
  message_effect_id?: string;
597
+ suggested_post_parameters?: SuggestedPostParameters;
598
+ direct_messages_topic_id?: number;
562
599
  reply_parameters?: ReplyParameters;
563
600
  reply_markup?:
564
601
  | InlineKeyboardMarkup
@@ -593,6 +630,10 @@ export type sendPollParams = {
593
630
  allow_paid_broadcast?: boolean;
594
631
  message_effect_id?: string;
595
632
  reply_parameters?: ReplyParameters;
633
+ media?: InputPollMedia;
634
+ explanation_media?: InputPollMedia;
635
+ members_only?: boolean;
636
+ country_codes?: string[];
596
637
  reply_markup?:
597
638
  | InlineKeyboardMarkup
598
639
  | ReplyKeyboardMarkup
@@ -619,6 +660,8 @@ export type sendDiceParams = {
619
660
  protect_content?: boolean;
620
661
  allow_paid_broadcast?: boolean;
621
662
  message_effect_id?: string;
663
+ suggested_post_parameters?: SuggestedPostParameters;
664
+ direct_messages_topic_id?: number;
622
665
  reply_parameters?: ReplyParameters;
623
666
  reply_markup?:
624
667
  | InlineKeyboardMarkup
@@ -933,6 +976,7 @@ export const getChat = (params: getChatParams): APIResponse<ChatFullInfo> =>
933
976
 
934
977
  export type getChatAdministratorsParams = {
935
978
  chat_id: string | number;
979
+ return_bots?: boolean;
936
980
  } & methodParams;
937
981
 
938
982
  export const getChatAdministrators = (
@@ -1615,6 +1659,8 @@ export type sendStickerParams = {
1615
1659
  protect_content?: boolean;
1616
1660
  allow_paid_broadcast?: boolean;
1617
1661
  message_effect_id?: string;
1662
+ suggested_post_parameters?: SuggestedPostParameters;
1663
+ direct_messages_topic_id?: number;
1618
1664
  reply_parameters?: ReplyParameters;
1619
1665
  reply_markup?:
1620
1666
  | InlineKeyboardMarkup
@@ -1831,6 +1877,8 @@ export type sendInvoiceParams = {
1831
1877
  protect_content?: boolean;
1832
1878
  allow_paid_broadcast?: boolean;
1833
1879
  message_effect_id?: string;
1880
+ suggested_post_parameters?: SuggestedPostParameters;
1881
+ direct_messages_topic_id?: number;
1834
1882
  reply_parameters?: ReplyParameters;
1835
1883
  reply_markup?: InlineKeyboardMarkup;
1836
1884
  } & methodParams;
@@ -2104,3 +2152,123 @@ export type setChatMemberTagParams = {
2104
2152
 
2105
2153
  export const setChatMemberTag = (params: setChatMemberTagParams): APIResponse =>
2106
2154
  requestTelegramAPI("setChatMemberTag", params);
2155
+
2156
+ export type getManagedBotTokenParams = {
2157
+ user_id: number;
2158
+ } & methodParams;
2159
+
2160
+ export const getManagedBotToken = (
2161
+ params: getManagedBotTokenParams,
2162
+ ): APIResponse<string> => requestTelegramAPI("getManagedBotToken", params);
2163
+
2164
+ export type replaceManagedBotTokenParams = {
2165
+ user_id: number;
2166
+ } & methodParams;
2167
+
2168
+ export const replaceManagedBotToken = (
2169
+ params: replaceManagedBotTokenParams,
2170
+ ): APIResponse<string> => requestTelegramAPI("replaceManagedBotToken", params);
2171
+
2172
+ export type savePreparedKeyboardButtonParams = {
2173
+ user_id: number;
2174
+ button: KeyboardButton;
2175
+ } & methodParams;
2176
+
2177
+ export const savePreparedKeyboardButton = (
2178
+ params: savePreparedKeyboardButtonParams,
2179
+ ): APIResponse<PreparedKeyboardButton> =>
2180
+ requestTelegramAPI("savePreparedKeyboardButton", params);
2181
+
2182
+ export type answerGuestQueryParams = {
2183
+ guest_query_id: string;
2184
+ result: InlineQueryResult;
2185
+ } & methodParams;
2186
+
2187
+ export const answerGuestQuery = (
2188
+ params: answerGuestQueryParams,
2189
+ ): APIResponse<SentGuestMessage> =>
2190
+ requestTelegramAPI("answerGuestQuery", params);
2191
+
2192
+ export type deleteAllMessageReactionsParams = {
2193
+ chat_id: string | number;
2194
+ user_id?: number;
2195
+ actor_chat_id?: number;
2196
+ } & methodParams;
2197
+
2198
+ export const deleteAllMessageReactions = (
2199
+ params: deleteAllMessageReactionsParams,
2200
+ ): APIResponse => requestTelegramAPI("deleteAllMessageReactions", params);
2201
+
2202
+ export type deleteMessageReactionParams = {
2203
+ chat_id: string | number;
2204
+ message_id: number;
2205
+ user_id?: number;
2206
+ actor_chat_id?: number;
2207
+ } & methodParams;
2208
+
2209
+ export const deleteMessageReaction = (
2210
+ params: deleteMessageReactionParams,
2211
+ ): APIResponse => requestTelegramAPI("deleteMessageReaction", params);
2212
+
2213
+ export type sendLivePhotoParams = {
2214
+ chat_id: string | number;
2215
+ live_photo: InputFile | string;
2216
+ photo: InputFile | string;
2217
+ caption?: string;
2218
+ caption_entities?: MessageEntity[];
2219
+ show_caption_above_media?: boolean;
2220
+ has_spoiler?: boolean;
2221
+ business_connection_id?: string;
2222
+ message_thread_id?: number;
2223
+ disable_notification?: boolean;
2224
+ protect_content?: boolean;
2225
+ allow_paid_broadcast?: boolean;
2226
+ message_effect_id?: string;
2227
+ parse_mode?: string;
2228
+ suggested_post_parameters?: SuggestedPostParameters;
2229
+ direct_messages_topic_id?: number;
2230
+ reply_parameters?: ReplyParameters;
2231
+ reply_markup?:
2232
+ | InlineKeyboardMarkup
2233
+ | ReplyKeyboardMarkup
2234
+ | ReplyKeyboardRemove
2235
+ | ForceReply;
2236
+ } & methodParams;
2237
+
2238
+ export const sendLivePhoto = (
2239
+ params: sendLivePhotoParams,
2240
+ ): APIResponse<Message> => {
2241
+ params.parse_mode =
2242
+ params.parse_mode ?? (params.parse_mode === "none" ? undefined : "HTML");
2243
+
2244
+ return requestTelegramAPI("sendLivePhoto", params);
2245
+ };
2246
+
2247
+ export type getManagedBotAccessSettingsParams = {
2248
+ user_id: number;
2249
+ } & methodParams;
2250
+
2251
+ export const getManagedBotAccessSettings = (
2252
+ params: getManagedBotAccessSettingsParams,
2253
+ ): APIResponse<BotAccessSettings> =>
2254
+ requestTelegramAPI("getManagedBotAccessSettings", params);
2255
+
2256
+ export type setManagedBotAccessSettingsParams = {
2257
+ user_id: number;
2258
+ is_access_restricted: boolean;
2259
+ added_user_ids?: number[];
2260
+ } & methodParams;
2261
+
2262
+ export const setManagedBotAccessSettings = (
2263
+ params: setManagedBotAccessSettingsParams,
2264
+ ): APIResponse => requestTelegramAPI("setManagedBotAccessSettings", params);
2265
+
2266
+ export type getUserPersonalChatMessagesParams = {
2267
+ user_id: number;
2268
+ limit: number;
2269
+ } & methodParams;
2270
+
2271
+ export const getUserPersonalChatMessages = (
2272
+ params: getUserPersonalChatMessagesParams,
2273
+ ): APIResponse<Message[]> =>
2274
+ requestTelegramAPI("getUserPersonalChatMessages", params);