@grom.js/bot-api-spec 0.3.2 → 0.4.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 +2 -2
- package/dist/index.d.ts +4 -4
- package/dist/index.js +19 -19
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -25,7 +25,7 @@ Below are the rules how we map type of a field/parameter to the `ValueType`:
|
|
|
25
25
|
|
|
26
26
|
- _Type_ is _String_ — `{ type: 'str' }`
|
|
27
27
|
- _Type_ is _Integer_ — `{ type: 'int32' }`
|
|
28
|
-
- _Type_ is _Integer_ and _Description_ says "...may have more than 32 significant bits...but it has at most 52 significant bits..." — `{ type: '
|
|
28
|
+
- _Type_ is _Integer_ and _Description_ says "...may have more than 32 significant bits...but it has at most 52 significant bits..." — `{ type: 'int53' }`
|
|
29
29
|
- _Type_ is _Boolean_ — `{ type: 'bool' }`
|
|
30
30
|
- _Type_ is _True_ — `{ type: 'bool', literal: true }`
|
|
31
31
|
- _Type_ is _Float_ — `{ type: 'float' }`
|
|
@@ -41,4 +41,4 @@ Objects also include descriptions of the API types, methods, fields, and paramet
|
|
|
41
41
|
- Description is an object with a single `markdown` property, a string containing the description in Markdown format with formatting (**bold**, _italic_, etc.) and links preserved.
|
|
42
42
|
- "_Optional._" prefix in field descriptions is omitted; instead, the `required` property is set to `false` for such fields.
|
|
43
43
|
- "JSON-serialized..." in field/parameter descriptions is omitted; instead, the `jsonSerialized` property is set to `true` for such fields/parameters.
|
|
44
|
-
- "...may have more than 32 significant bits...but it has at most 52 significant bits..." in _Integer_ field/parameter descriptions is omitted; instead, `type` is set to `
|
|
44
|
+
- "...may have more than 32 significant bits...but it has at most 52 significant bits..." in _Integer_ field/parameter descriptions is omitted; instead, `type` is set to `int53` for such fields/parameters (as per [TDLib](https://core.telegram.org/tdlib/docs/td__api_8h.html#a6f57ab89c6371535f0fb7fec2d770126)).
|
package/dist/index.d.ts
CHANGED
|
@@ -83,7 +83,7 @@ interface Description {
|
|
|
83
83
|
/**
|
|
84
84
|
* Type of a value.
|
|
85
85
|
*/
|
|
86
|
-
type ValueType = ValueTypeString | ValueTypeBoolean | ValueTypeInteger32 |
|
|
86
|
+
type ValueType = ValueTypeString | ValueTypeBoolean | ValueTypeInteger32 | ValueTypeInteger53 | ValueTypeFloat | ValueTypeInputFile | ValueTypeApiType | ValueTypeArray | ValueTypeUnion;
|
|
87
87
|
/**
|
|
88
88
|
* `String` value type.
|
|
89
89
|
*/
|
|
@@ -110,8 +110,8 @@ interface ValueTypeInteger32 {
|
|
|
110
110
|
* at most 52 significant bits, so a 64-bit integer or double-precision float
|
|
111
111
|
* type are safe for storing values of this type.
|
|
112
112
|
*/
|
|
113
|
-
interface
|
|
114
|
-
type: '
|
|
113
|
+
interface ValueTypeInteger53 {
|
|
114
|
+
type: 'int53';
|
|
115
115
|
}
|
|
116
116
|
/**
|
|
117
117
|
* `Float` value type.
|
|
@@ -598,4 +598,4 @@ declare const types: {
|
|
|
598
598
|
GameHighScore: ApiType;
|
|
599
599
|
};
|
|
600
600
|
//#endregion
|
|
601
|
-
export { ApiMethod, ApiType, ApiTypeObject, ApiTypeOneOf, Description, FieldOrParam, ValueType, ValueTypeApiType, ValueTypeArray, ValueTypeBoolean, ValueTypeFloat, ValueTypeInputFile, ValueTypeInteger32,
|
|
601
|
+
export { ApiMethod, ApiType, ApiTypeObject, ApiTypeOneOf, Description, FieldOrParam, ValueType, ValueTypeApiType, ValueTypeArray, ValueTypeBoolean, ValueTypeFloat, ValueTypeInputFile, ValueTypeInteger32, ValueTypeInteger53, ValueTypeString, ValueTypeUnion, methods, types };
|
package/dist/index.js
CHANGED
|
@@ -8362,7 +8362,7 @@ const User = t({
|
|
|
8362
8362
|
fields: [
|
|
8363
8363
|
{
|
|
8364
8364
|
name: "id",
|
|
8365
|
-
type: { type: "
|
|
8365
|
+
type: { type: "int53" },
|
|
8366
8366
|
description: { markdown: "Unique identifier for this user or bot." },
|
|
8367
8367
|
required: true,
|
|
8368
8368
|
jsonSerialized: false
|
|
@@ -8465,7 +8465,7 @@ const Chat = t({
|
|
|
8465
8465
|
fields: [
|
|
8466
8466
|
{
|
|
8467
8467
|
name: "id",
|
|
8468
|
-
type: { type: "
|
|
8468
|
+
type: { type: "int53" },
|
|
8469
8469
|
description: { markdown: "Unique identifier for this chat." },
|
|
8470
8470
|
required: true,
|
|
8471
8471
|
jsonSerialized: false
|
|
@@ -8533,7 +8533,7 @@ const ChatFullInfo = t({
|
|
|
8533
8533
|
fields: [
|
|
8534
8534
|
{
|
|
8535
8535
|
name: "id",
|
|
8536
|
-
type: { type: "
|
|
8536
|
+
type: { type: "int53" },
|
|
8537
8537
|
description: { markdown: "Unique identifier for this chat." },
|
|
8538
8538
|
required: true,
|
|
8539
8539
|
jsonSerialized: false
|
|
@@ -8923,7 +8923,7 @@ const ChatFullInfo = t({
|
|
|
8923
8923
|
},
|
|
8924
8924
|
{
|
|
8925
8925
|
name: "linked_chat_id",
|
|
8926
|
-
type: { type: "
|
|
8926
|
+
type: { type: "int53" },
|
|
8927
8927
|
description: { markdown: "Unique identifier for the linked chat, i.e. the discussion group identifier for a channel and vice versa; for supergroups and channel chats." },
|
|
8928
8928
|
required: false,
|
|
8929
8929
|
jsonSerialized: false
|
|
@@ -9529,14 +9529,14 @@ const Message = t({
|
|
|
9529
9529
|
},
|
|
9530
9530
|
{
|
|
9531
9531
|
name: "migrate_to_chat_id",
|
|
9532
|
-
type: { type: "
|
|
9532
|
+
type: { type: "int53" },
|
|
9533
9533
|
description: { markdown: "The group has been migrated to a supergroup with the specified identifier." },
|
|
9534
9534
|
required: false,
|
|
9535
9535
|
jsonSerialized: false
|
|
9536
9536
|
},
|
|
9537
9537
|
{
|
|
9538
9538
|
name: "migrate_from_chat_id",
|
|
9539
|
-
type: { type: "
|
|
9539
|
+
type: { type: "int53" },
|
|
9540
9540
|
description: { markdown: "The supergroup has been migrated from a group with the specified identifier." },
|
|
9541
9541
|
required: false,
|
|
9542
9542
|
jsonSerialized: false
|
|
@@ -10676,7 +10676,7 @@ const Animation = t({
|
|
|
10676
10676
|
},
|
|
10677
10677
|
{
|
|
10678
10678
|
name: "file_size",
|
|
10679
|
-
type: { type: "
|
|
10679
|
+
type: { type: "int53" },
|
|
10680
10680
|
description: { markdown: "File size in bytes." },
|
|
10681
10681
|
required: false,
|
|
10682
10682
|
jsonSerialized: false
|
|
@@ -10738,7 +10738,7 @@ const Audio = t({
|
|
|
10738
10738
|
},
|
|
10739
10739
|
{
|
|
10740
10740
|
name: "file_size",
|
|
10741
|
-
type: { type: "
|
|
10741
|
+
type: { type: "int53" },
|
|
10742
10742
|
description: { markdown: "File size in bytes." },
|
|
10743
10743
|
required: false,
|
|
10744
10744
|
jsonSerialized: false
|
|
@@ -10799,7 +10799,7 @@ const Document = t({
|
|
|
10799
10799
|
},
|
|
10800
10800
|
{
|
|
10801
10801
|
name: "file_size",
|
|
10802
|
-
type: { type: "
|
|
10802
|
+
type: { type: "int53" },
|
|
10803
10803
|
description: { markdown: "File size in bytes." },
|
|
10804
10804
|
required: false,
|
|
10805
10805
|
jsonSerialized: false
|
|
@@ -10911,7 +10911,7 @@ const Video = t({
|
|
|
10911
10911
|
},
|
|
10912
10912
|
{
|
|
10913
10913
|
name: "file_size",
|
|
10914
|
-
type: { type: "
|
|
10914
|
+
type: { type: "int53" },
|
|
10915
10915
|
description: { markdown: "File size in bytes." },
|
|
10916
10916
|
required: false,
|
|
10917
10917
|
jsonSerialized: false
|
|
@@ -11003,7 +11003,7 @@ const Voice = t({
|
|
|
11003
11003
|
},
|
|
11004
11004
|
{
|
|
11005
11005
|
name: "file_size",
|
|
11006
|
-
type: { type: "
|
|
11006
|
+
type: { type: "int53" },
|
|
11007
11007
|
description: { markdown: "File size in bytes." },
|
|
11008
11008
|
required: false,
|
|
11009
11009
|
jsonSerialized: false
|
|
@@ -11155,7 +11155,7 @@ const Contact = t({
|
|
|
11155
11155
|
},
|
|
11156
11156
|
{
|
|
11157
11157
|
name: "user_id",
|
|
11158
|
-
type: { type: "
|
|
11158
|
+
type: { type: "int53" },
|
|
11159
11159
|
description: { markdown: "Contact's user identifier in Telegram." },
|
|
11160
11160
|
required: false,
|
|
11161
11161
|
jsonSerialized: false
|
|
@@ -12218,7 +12218,7 @@ const SharedUser = t({
|
|
|
12218
12218
|
fields: [
|
|
12219
12219
|
{
|
|
12220
12220
|
name: "user_id",
|
|
12221
|
-
type: { type: "
|
|
12221
|
+
type: { type: "int53" },
|
|
12222
12222
|
description: { markdown: "Identifier of the shared user. The bot may not have access to the user and could be unable to use this identifier, unless the user is already known to the bot by some other means." },
|
|
12223
12223
|
required: true,
|
|
12224
12224
|
jsonSerialized: false
|
|
@@ -12295,7 +12295,7 @@ const ChatShared = t({
|
|
|
12295
12295
|
},
|
|
12296
12296
|
{
|
|
12297
12297
|
name: "chat_id",
|
|
12298
|
-
type: { type: "
|
|
12298
|
+
type: { type: "int53" },
|
|
12299
12299
|
description: { markdown: "Identifier of the shared chat. The bot may not have access to the chat and could be unable to use this identifier, unless the chat is already known to the bot by some other means." },
|
|
12300
12300
|
required: true,
|
|
12301
12301
|
jsonSerialized: false
|
|
@@ -12917,7 +12917,7 @@ const DirectMessagesTopic = t({
|
|
|
12917
12917
|
description: { markdown: "Describes a topic of a direct messages chat." },
|
|
12918
12918
|
fields: [{
|
|
12919
12919
|
name: "topic_id",
|
|
12920
|
-
type: { type: "
|
|
12920
|
+
type: { type: "int53" },
|
|
12921
12921
|
description: { markdown: "Unique identifier of the topic." },
|
|
12922
12922
|
required: true,
|
|
12923
12923
|
jsonSerialized: false
|
|
@@ -12978,7 +12978,7 @@ const File = t({
|
|
|
12978
12978
|
},
|
|
12979
12979
|
{
|
|
12980
12980
|
name: "file_size",
|
|
12981
|
-
type: { type: "
|
|
12981
|
+
type: { type: "int53" },
|
|
12982
12982
|
description: { markdown: "File size in bytes." },
|
|
12983
12983
|
required: false,
|
|
12984
12984
|
jsonSerialized: false
|
|
@@ -14369,7 +14369,7 @@ const ChatJoinRequest = t({
|
|
|
14369
14369
|
},
|
|
14370
14370
|
{
|
|
14371
14371
|
name: "user_chat_id",
|
|
14372
|
-
type: { type: "
|
|
14372
|
+
type: { type: "int53" },
|
|
14373
14373
|
description: { markdown: "Identifier of a private chat with the user who sent the join request. The bot can use this identifier for 5 minutes to send messages until the join request is processed, assuming no other administrator contacted the user." },
|
|
14374
14374
|
required: true,
|
|
14375
14375
|
jsonSerialized: false
|
|
@@ -16503,7 +16503,7 @@ const BusinessConnection = t({
|
|
|
16503
16503
|
},
|
|
16504
16504
|
{
|
|
16505
16505
|
name: "user_chat_id",
|
|
16506
|
-
type: { type: "
|
|
16506
|
+
type: { type: "int53" },
|
|
16507
16507
|
description: { markdown: "Identifier of a private chat with the user who created the business connection." },
|
|
16508
16508
|
required: true,
|
|
16509
16509
|
jsonSerialized: false
|
|
@@ -16572,7 +16572,7 @@ const ResponseParameters = t({
|
|
|
16572
16572
|
description: { markdown: "Describes why a request was unsuccessful." },
|
|
16573
16573
|
fields: [{
|
|
16574
16574
|
name: "migrate_to_chat_id",
|
|
16575
|
-
type: { type: "
|
|
16575
|
+
type: { type: "int53" },
|
|
16576
16576
|
description: { markdown: "The group has been migrated to a supergroup with the specified identifier." },
|
|
16577
16577
|
required: false,
|
|
16578
16578
|
jsonSerialized: false
|
package/package.json
CHANGED