@grom.js/bot-api-spec 0.7.1 → 0.8.0
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/README.md +1 -1
- package/dist/methods.gen.d.ts +1 -0
- package/dist/methods.gen.d.ts.map +1 -1
- package/dist/methods.gen.js +64 -3
- package/dist/methods.gen.js.map +1 -1
- package/dist/types.gen.d.ts.map +1 -1
- package/dist/types.gen.js +98 -4
- package/dist/types.gen.js.map +1 -1
- package/package.json +5 -5
- package/src/methods.gen.ts +65 -3
- package/src/types.gen.ts +98 -4
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@grom.js/bot-api-spec",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.8.0",
|
|
5
5
|
"description": "Telegram Bot API specification as a collection of JavaScript objects in a custom format.",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"repository": {
|
|
@@ -26,14 +26,14 @@
|
|
|
26
26
|
"node": ">=22.18"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
|
-
"@antfu/eslint-config": "7.
|
|
30
|
-
"@types/node": "22.19.
|
|
29
|
+
"@antfu/eslint-config": "7.6.1",
|
|
30
|
+
"@types/node": "22.19.13",
|
|
31
31
|
"@types/turndown": "5.0.6",
|
|
32
32
|
"bumpp": "10.4.1",
|
|
33
33
|
"cheerio": "1.2.0",
|
|
34
34
|
"domhandler": "5.0.3",
|
|
35
|
-
"eslint": "9.39.
|
|
36
|
-
"eslint-plugin-format": "
|
|
35
|
+
"eslint": "9.39.3",
|
|
36
|
+
"eslint-plugin-format": "2.0.1",
|
|
37
37
|
"taze": "19.9.2",
|
|
38
38
|
"turndown": "7.2.2",
|
|
39
39
|
"typescript": "5.9.3",
|
package/src/methods.gen.ts
CHANGED
|
@@ -4225,7 +4225,7 @@ const sendChecklist: ApiMethod = {
|
|
|
4225
4225
|
name: 'InlineKeyboardMarkup',
|
|
4226
4226
|
},
|
|
4227
4227
|
description: {
|
|
4228
|
-
markdown: 'An object for an inline keyboard',
|
|
4228
|
+
markdown: 'An object for an [inline keyboard](https://core.telegram.org/bots/features#inline-keyboards)',
|
|
4229
4229
|
},
|
|
4230
4230
|
required: false,
|
|
4231
4231
|
},
|
|
@@ -4426,7 +4426,7 @@ const sendDice: ApiMethod = {
|
|
|
4426
4426
|
const sendMessageDraft: ApiMethod = {
|
|
4427
4427
|
name: 'sendMessageDraft',
|
|
4428
4428
|
description: {
|
|
4429
|
-
markdown: 'Use this method to stream a partial message to a user while the message is being generated
|
|
4429
|
+
markdown: 'Use this method to stream a partial message to a user while the message is being generated. Returns _True_ on success.',
|
|
4430
4430
|
},
|
|
4431
4431
|
parameters: [
|
|
4432
4432
|
{
|
|
@@ -5216,6 +5216,16 @@ const promoteChatMember: ApiMethod = {
|
|
|
5216
5216
|
},
|
|
5217
5217
|
required: false,
|
|
5218
5218
|
},
|
|
5219
|
+
{
|
|
5220
|
+
name: 'can_manage_tags',
|
|
5221
|
+
type: {
|
|
5222
|
+
type: 'bool',
|
|
5223
|
+
},
|
|
5224
|
+
description: {
|
|
5225
|
+
markdown: 'Pass _True_ if the administrator can edit the tags of regular members; for groups and supergroups only',
|
|
5226
|
+
},
|
|
5227
|
+
required: false,
|
|
5228
|
+
},
|
|
5219
5229
|
],
|
|
5220
5230
|
returnType: {
|
|
5221
5231
|
type: 'bool',
|
|
@@ -5274,6 +5284,57 @@ const setChatAdministratorCustomTitle: ApiMethod = {
|
|
|
5274
5284
|
},
|
|
5275
5285
|
}
|
|
5276
5286
|
|
|
5287
|
+
const setChatMemberTag: ApiMethod = {
|
|
5288
|
+
name: 'setChatMemberTag',
|
|
5289
|
+
description: {
|
|
5290
|
+
markdown: 'Use this method to set a tag for a regular member in a group or a supergroup. The bot must be an administrator in the chat for this to work and must have the _can\\_manage\\_tags_ administrator right. Returns _True_ on success.',
|
|
5291
|
+
},
|
|
5292
|
+
parameters: [
|
|
5293
|
+
{
|
|
5294
|
+
name: 'chat_id',
|
|
5295
|
+
type: {
|
|
5296
|
+
type: 'union',
|
|
5297
|
+
types: [
|
|
5298
|
+
{
|
|
5299
|
+
type: 'int32',
|
|
5300
|
+
},
|
|
5301
|
+
{
|
|
5302
|
+
type: 'str',
|
|
5303
|
+
},
|
|
5304
|
+
],
|
|
5305
|
+
},
|
|
5306
|
+
description: {
|
|
5307
|
+
markdown: 'Unique identifier for the target chat or username of the target supergroup (in the format `@supergroupusername`)',
|
|
5308
|
+
},
|
|
5309
|
+
required: true,
|
|
5310
|
+
},
|
|
5311
|
+
{
|
|
5312
|
+
name: 'user_id',
|
|
5313
|
+
type: {
|
|
5314
|
+
type: 'int32',
|
|
5315
|
+
},
|
|
5316
|
+
description: {
|
|
5317
|
+
markdown: 'Unique identifier of the target user',
|
|
5318
|
+
},
|
|
5319
|
+
required: true,
|
|
5320
|
+
},
|
|
5321
|
+
{
|
|
5322
|
+
name: 'tag',
|
|
5323
|
+
type: {
|
|
5324
|
+
type: 'str',
|
|
5325
|
+
},
|
|
5326
|
+
description: {
|
|
5327
|
+
markdown: 'New tag for the member; 0-16 characters, emoji are not allowed',
|
|
5328
|
+
},
|
|
5329
|
+
required: false,
|
|
5330
|
+
},
|
|
5331
|
+
],
|
|
5332
|
+
returnType: {
|
|
5333
|
+
type: 'bool',
|
|
5334
|
+
literal: true,
|
|
5335
|
+
},
|
|
5336
|
+
}
|
|
5337
|
+
|
|
5277
5338
|
const banChatSenderChat: ApiMethod = {
|
|
5278
5339
|
name: 'banChatSenderChat',
|
|
5279
5340
|
description: {
|
|
@@ -9699,7 +9760,7 @@ const editMessageChecklist: ApiMethod = {
|
|
|
9699
9760
|
name: 'InlineKeyboardMarkup',
|
|
9700
9761
|
},
|
|
9701
9762
|
description: {
|
|
9702
|
-
markdown: 'An object for the new inline keyboard for the message',
|
|
9763
|
+
markdown: 'An object for the new [inline keyboard](https://core.telegram.org/bots/features#inline-keyboards) for the message',
|
|
9703
9764
|
},
|
|
9704
9765
|
required: false,
|
|
9705
9766
|
},
|
|
@@ -12161,6 +12222,7 @@ export const methods = {
|
|
|
12161
12222
|
restrictChatMember,
|
|
12162
12223
|
promoteChatMember,
|
|
12163
12224
|
setChatAdministratorCustomTitle,
|
|
12225
|
+
setChatMemberTag,
|
|
12164
12226
|
banChatSenderChat,
|
|
12165
12227
|
unbanChatSenderChat,
|
|
12166
12228
|
setChatPermissions,
|
package/src/types.gen.ts
CHANGED
|
@@ -1304,6 +1304,16 @@ const Message = t({
|
|
|
1304
1304
|
},
|
|
1305
1305
|
required: false,
|
|
1306
1306
|
},
|
|
1307
|
+
{
|
|
1308
|
+
name: 'sender_tag',
|
|
1309
|
+
type: {
|
|
1310
|
+
type: 'str',
|
|
1311
|
+
},
|
|
1312
|
+
description: {
|
|
1313
|
+
markdown: 'Tag or custom title of the sender of the message; for supergroups only',
|
|
1314
|
+
},
|
|
1315
|
+
required: false,
|
|
1316
|
+
},
|
|
1307
1317
|
{
|
|
1308
1318
|
name: 'date',
|
|
1309
1319
|
type: {
|
|
@@ -1482,7 +1492,7 @@ const Message = t({
|
|
|
1482
1492
|
type: 'str',
|
|
1483
1493
|
},
|
|
1484
1494
|
description: {
|
|
1485
|
-
markdown: 'The unique identifier of a media message group this message belongs to',
|
|
1495
|
+
markdown: 'The unique identifier inside this chat of a media message group this message belongs to',
|
|
1486
1496
|
},
|
|
1487
1497
|
required: false,
|
|
1488
1498
|
},
|
|
@@ -2379,7 +2389,7 @@ const Message = t({
|
|
|
2379
2389
|
name: 'InlineKeyboardMarkup',
|
|
2380
2390
|
},
|
|
2381
2391
|
description: {
|
|
2382
|
-
markdown: 'Inline keyboard attached to the message. `login_url` buttons are represented as ordinary `url` buttons.',
|
|
2392
|
+
markdown: '[Inline keyboard](https://core.telegram.org/bots/features#inline-keyboards) attached to the message. `login_url` buttons are represented as ordinary `url` buttons.',
|
|
2383
2393
|
},
|
|
2384
2394
|
required: false,
|
|
2385
2395
|
},
|
|
@@ -2550,10 +2560,14 @@ const MessageEntity = t({
|
|
|
2550
2560
|
type: 'str',
|
|
2551
2561
|
literal: 'custom_emoji',
|
|
2552
2562
|
},
|
|
2563
|
+
{
|
|
2564
|
+
type: 'str',
|
|
2565
|
+
literal: 'date_time',
|
|
2566
|
+
},
|
|
2553
2567
|
],
|
|
2554
2568
|
},
|
|
2555
2569
|
description: {
|
|
2556
|
-
markdown: 'Type of the entity. Currently, can be “mention” (`@username`), “hashtag” (`#hashtag` or `#hashtag@chatusername`), “cashtag” (`$USD` or `$USD@chatusername`), “bot\\_command” (`/start@jobs_bot`), “url” (`https://telegram.org`), “email” (`do-not-reply@telegram.org`), “phone\\_number” (`+1-212-555-0123`), “bold” (**bold text**), “italic” (_italic text_), “underline” (underlined text), “strikethrough” (strikethrough text), “spoiler” (spoiler message), “blockquote” (block quotation), “expandable\\_blockquote” (collapsed-by-default block quotation), “code” (monowidth string), “pre” (monowidth block), “text\\_link” (for clickable text URLs), “text\\_mention” (for users [without usernames](https://telegram.org/blog/edit#new-mentions)), “custom\\_emoji” (for inline custom emoji stickers)',
|
|
2570
|
+
markdown: 'Type of the entity. Currently, can be “mention” (`@username`), “hashtag” (`#hashtag` or `#hashtag@chatusername`), “cashtag” (`$USD` or `$USD@chatusername`), “bot\\_command” (`/start@jobs_bot`), “url” (`https://telegram.org`), “email” (`do-not-reply@telegram.org`), “phone\\_number” (`+1-212-555-0123`), “bold” (**bold text**), “italic” (_italic text_), “underline” (underlined text), “strikethrough” (strikethrough text), “spoiler” (spoiler message), “blockquote” (block quotation), “expandable\\_blockquote” (collapsed-by-default block quotation), “code” (monowidth string), “pre” (monowidth block), “text\\_link” (for clickable text URLs), “text\\_mention” (for users [without usernames](https://telegram.org/blog/edit#new-mentions)), “custom\\_emoji” (for inline custom emoji stickers), or “date\\_time” (for formatted date and time)',
|
|
2557
2571
|
},
|
|
2558
2572
|
required: true,
|
|
2559
2573
|
},
|
|
@@ -2618,6 +2632,26 @@ const MessageEntity = t({
|
|
|
2618
2632
|
},
|
|
2619
2633
|
required: false,
|
|
2620
2634
|
},
|
|
2635
|
+
{
|
|
2636
|
+
name: 'unix_time',
|
|
2637
|
+
type: {
|
|
2638
|
+
type: 'int32',
|
|
2639
|
+
},
|
|
2640
|
+
description: {
|
|
2641
|
+
markdown: 'For “date\\_time” only, the Unix time associated with the entity',
|
|
2642
|
+
},
|
|
2643
|
+
required: false,
|
|
2644
|
+
},
|
|
2645
|
+
{
|
|
2646
|
+
name: 'date_time_format',
|
|
2647
|
+
type: {
|
|
2648
|
+
type: 'str',
|
|
2649
|
+
},
|
|
2650
|
+
description: {
|
|
2651
|
+
markdown: 'For “date\\_time” only, the string that defines the formatting of the date and time. See [date-time entity formatting](https://core.telegram.org/bots/api#date-time-entity-formatting) for more details.',
|
|
2652
|
+
},
|
|
2653
|
+
required: false,
|
|
2654
|
+
},
|
|
2621
2655
|
],
|
|
2622
2656
|
})
|
|
2623
2657
|
|
|
@@ -8156,6 +8190,16 @@ const ChatAdministratorRights = t({
|
|
|
8156
8190
|
},
|
|
8157
8191
|
required: false,
|
|
8158
8192
|
},
|
|
8193
|
+
{
|
|
8194
|
+
name: 'can_manage_tags',
|
|
8195
|
+
type: {
|
|
8196
|
+
type: 'bool',
|
|
8197
|
+
},
|
|
8198
|
+
description: {
|
|
8199
|
+
markdown: '_True_, if the administrator can edit the tags of regular members; for groups and supergroups only. If omitted defaults to the value of can\\_pin\\_messages.',
|
|
8200
|
+
},
|
|
8201
|
+
required: false,
|
|
8202
|
+
},
|
|
8159
8203
|
],
|
|
8160
8204
|
})
|
|
8161
8205
|
|
|
@@ -8535,6 +8579,16 @@ const ChatMemberAdministrator = t({
|
|
|
8535
8579
|
},
|
|
8536
8580
|
required: false,
|
|
8537
8581
|
},
|
|
8582
|
+
{
|
|
8583
|
+
name: 'can_manage_tags',
|
|
8584
|
+
type: {
|
|
8585
|
+
type: 'bool',
|
|
8586
|
+
},
|
|
8587
|
+
description: {
|
|
8588
|
+
markdown: '_True_, if the administrator can edit the tags of regular members; for groups and supergroups only. If omitted defaults to the value of can\\_pin\\_messages.',
|
|
8589
|
+
},
|
|
8590
|
+
required: false,
|
|
8591
|
+
},
|
|
8538
8592
|
{
|
|
8539
8593
|
name: 'custom_title',
|
|
8540
8594
|
type: {
|
|
@@ -8565,6 +8619,16 @@ const ChatMemberMember = t({
|
|
|
8565
8619
|
},
|
|
8566
8620
|
required: true,
|
|
8567
8621
|
},
|
|
8622
|
+
{
|
|
8623
|
+
name: 'tag',
|
|
8624
|
+
type: {
|
|
8625
|
+
type: 'str',
|
|
8626
|
+
},
|
|
8627
|
+
description: {
|
|
8628
|
+
markdown: 'Tag of the member',
|
|
8629
|
+
},
|
|
8630
|
+
required: false,
|
|
8631
|
+
},
|
|
8568
8632
|
{
|
|
8569
8633
|
name: 'user',
|
|
8570
8634
|
type: {
|
|
@@ -8606,6 +8670,16 @@ const ChatMemberRestricted = t({
|
|
|
8606
8670
|
},
|
|
8607
8671
|
required: true,
|
|
8608
8672
|
},
|
|
8673
|
+
{
|
|
8674
|
+
name: 'tag',
|
|
8675
|
+
type: {
|
|
8676
|
+
type: 'str',
|
|
8677
|
+
},
|
|
8678
|
+
description: {
|
|
8679
|
+
markdown: 'Tag of the member',
|
|
8680
|
+
},
|
|
8681
|
+
required: false,
|
|
8682
|
+
},
|
|
8609
8683
|
{
|
|
8610
8684
|
name: 'user',
|
|
8611
8685
|
type: {
|
|
@@ -8727,6 +8801,16 @@ const ChatMemberRestricted = t({
|
|
|
8727
8801
|
},
|
|
8728
8802
|
required: true,
|
|
8729
8803
|
},
|
|
8804
|
+
{
|
|
8805
|
+
name: 'can_edit_tag',
|
|
8806
|
+
type: {
|
|
8807
|
+
type: 'bool',
|
|
8808
|
+
},
|
|
8809
|
+
description: {
|
|
8810
|
+
markdown: '_True_, if the user is allowed to edit their own tag',
|
|
8811
|
+
},
|
|
8812
|
+
required: true,
|
|
8813
|
+
},
|
|
8730
8814
|
{
|
|
8731
8815
|
name: 'can_change_info',
|
|
8732
8816
|
type: {
|
|
@@ -9030,6 +9114,16 @@ const ChatPermissions = t({
|
|
|
9030
9114
|
},
|
|
9031
9115
|
required: false,
|
|
9032
9116
|
},
|
|
9117
|
+
{
|
|
9118
|
+
name: 'can_edit_tag',
|
|
9119
|
+
type: {
|
|
9120
|
+
type: 'bool',
|
|
9121
|
+
},
|
|
9122
|
+
description: {
|
|
9123
|
+
markdown: '_True_, if the user is allowed to edit their own tag',
|
|
9124
|
+
},
|
|
9125
|
+
required: false,
|
|
9126
|
+
},
|
|
9033
9127
|
{
|
|
9034
9128
|
name: 'can_change_info',
|
|
9035
9129
|
type: {
|
|
@@ -15276,7 +15370,7 @@ const InlineQueryResultDocument = t({
|
|
|
15276
15370
|
name: 'InlineKeyboardMarkup',
|
|
15277
15371
|
},
|
|
15278
15372
|
description: {
|
|
15279
|
-
markdown: 'Inline keyboard attached to the message',
|
|
15373
|
+
markdown: '[Inline keyboard](https://core.telegram.org/bots/features#inline-keyboards) attached to the message',
|
|
15280
15374
|
},
|
|
15281
15375
|
required: false,
|
|
15282
15376
|
},
|