@grom.js/bot-api-spec 0.3.2 → 0.4.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/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: 'int52' }`
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 `int52` 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 `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 | ValueTypeInteger52 | ValueTypeFloat | ValueTypeInputFile | ValueTypeApiType | ValueTypeArray | ValueTypeUnion;
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 ValueTypeInteger52 {
114
- type: 'int52';
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, ValueTypeInteger52, ValueTypeString, ValueTypeUnion, methods, types };
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
@@ -5827,7 +5827,10 @@ const editMessageText = {
5827
5827
  types: [{
5828
5828
  type: "api-type",
5829
5829
  name: "Message"
5830
- }, { type: "bool" }]
5830
+ }, {
5831
+ type: "bool",
5832
+ literal: true
5833
+ }]
5831
5834
  }
5832
5835
  };
5833
5836
  const editMessageCaption = {
@@ -5915,7 +5918,10 @@ const editMessageCaption = {
5915
5918
  types: [{
5916
5919
  type: "api-type",
5917
5920
  name: "Message"
5918
- }, { type: "bool" }]
5921
+ }, {
5922
+ type: "bool",
5923
+ literal: true
5924
+ }]
5919
5925
  }
5920
5926
  };
5921
5927
  const editMessageMedia = {
@@ -5979,7 +5985,10 @@ const editMessageMedia = {
5979
5985
  types: [{
5980
5986
  type: "api-type",
5981
5987
  name: "Message"
5982
- }, { type: "bool" }]
5988
+ }, {
5989
+ type: "bool",
5990
+ literal: true
5991
+ }]
5983
5992
  }
5984
5993
  };
5985
5994
  const editMessageLiveLocation = {
@@ -6075,7 +6084,10 @@ const editMessageLiveLocation = {
6075
6084
  types: [{
6076
6085
  type: "api-type",
6077
6086
  name: "Message"
6078
- }, { type: "bool" }]
6087
+ }, {
6088
+ type: "bool",
6089
+ literal: true
6090
+ }]
6079
6091
  }
6080
6092
  };
6081
6093
  const stopMessageLiveLocation = {
@@ -8362,7 +8374,7 @@ const User = t({
8362
8374
  fields: [
8363
8375
  {
8364
8376
  name: "id",
8365
- type: { type: "int52" },
8377
+ type: { type: "int53" },
8366
8378
  description: { markdown: "Unique identifier for this user or bot." },
8367
8379
  required: true,
8368
8380
  jsonSerialized: false
@@ -8465,7 +8477,7 @@ const Chat = t({
8465
8477
  fields: [
8466
8478
  {
8467
8479
  name: "id",
8468
- type: { type: "int52" },
8480
+ type: { type: "int53" },
8469
8481
  description: { markdown: "Unique identifier for this chat." },
8470
8482
  required: true,
8471
8483
  jsonSerialized: false
@@ -8533,7 +8545,7 @@ const ChatFullInfo = t({
8533
8545
  fields: [
8534
8546
  {
8535
8547
  name: "id",
8536
- type: { type: "int52" },
8548
+ type: { type: "int53" },
8537
8549
  description: { markdown: "Unique identifier for this chat." },
8538
8550
  required: true,
8539
8551
  jsonSerialized: false
@@ -8923,7 +8935,7 @@ const ChatFullInfo = t({
8923
8935
  },
8924
8936
  {
8925
8937
  name: "linked_chat_id",
8926
- type: { type: "int52" },
8938
+ type: { type: "int53" },
8927
8939
  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
8940
  required: false,
8929
8941
  jsonSerialized: false
@@ -9529,14 +9541,14 @@ const Message = t({
9529
9541
  },
9530
9542
  {
9531
9543
  name: "migrate_to_chat_id",
9532
- type: { type: "int52" },
9544
+ type: { type: "int53" },
9533
9545
  description: { markdown: "The group has been migrated to a supergroup with the specified identifier." },
9534
9546
  required: false,
9535
9547
  jsonSerialized: false
9536
9548
  },
9537
9549
  {
9538
9550
  name: "migrate_from_chat_id",
9539
- type: { type: "int52" },
9551
+ type: { type: "int53" },
9540
9552
  description: { markdown: "The supergroup has been migrated from a group with the specified identifier." },
9541
9553
  required: false,
9542
9554
  jsonSerialized: false
@@ -10676,7 +10688,7 @@ const Animation = t({
10676
10688
  },
10677
10689
  {
10678
10690
  name: "file_size",
10679
- type: { type: "int52" },
10691
+ type: { type: "int53" },
10680
10692
  description: { markdown: "File size in bytes." },
10681
10693
  required: false,
10682
10694
  jsonSerialized: false
@@ -10738,7 +10750,7 @@ const Audio = t({
10738
10750
  },
10739
10751
  {
10740
10752
  name: "file_size",
10741
- type: { type: "int52" },
10753
+ type: { type: "int53" },
10742
10754
  description: { markdown: "File size in bytes." },
10743
10755
  required: false,
10744
10756
  jsonSerialized: false
@@ -10799,7 +10811,7 @@ const Document = t({
10799
10811
  },
10800
10812
  {
10801
10813
  name: "file_size",
10802
- type: { type: "int52" },
10814
+ type: { type: "int53" },
10803
10815
  description: { markdown: "File size in bytes." },
10804
10816
  required: false,
10805
10817
  jsonSerialized: false
@@ -10911,7 +10923,7 @@ const Video = t({
10911
10923
  },
10912
10924
  {
10913
10925
  name: "file_size",
10914
- type: { type: "int52" },
10926
+ type: { type: "int53" },
10915
10927
  description: { markdown: "File size in bytes." },
10916
10928
  required: false,
10917
10929
  jsonSerialized: false
@@ -11003,7 +11015,7 @@ const Voice = t({
11003
11015
  },
11004
11016
  {
11005
11017
  name: "file_size",
11006
- type: { type: "int52" },
11018
+ type: { type: "int53" },
11007
11019
  description: { markdown: "File size in bytes." },
11008
11020
  required: false,
11009
11021
  jsonSerialized: false
@@ -11155,7 +11167,7 @@ const Contact = t({
11155
11167
  },
11156
11168
  {
11157
11169
  name: "user_id",
11158
- type: { type: "int52" },
11170
+ type: { type: "int53" },
11159
11171
  description: { markdown: "Contact's user identifier in Telegram." },
11160
11172
  required: false,
11161
11173
  jsonSerialized: false
@@ -12218,7 +12230,7 @@ const SharedUser = t({
12218
12230
  fields: [
12219
12231
  {
12220
12232
  name: "user_id",
12221
- type: { type: "int52" },
12233
+ type: { type: "int53" },
12222
12234
  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
12235
  required: true,
12224
12236
  jsonSerialized: false
@@ -12295,7 +12307,7 @@ const ChatShared = t({
12295
12307
  },
12296
12308
  {
12297
12309
  name: "chat_id",
12298
- type: { type: "int52" },
12310
+ type: { type: "int53" },
12299
12311
  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
12312
  required: true,
12301
12313
  jsonSerialized: false
@@ -12917,7 +12929,7 @@ const DirectMessagesTopic = t({
12917
12929
  description: { markdown: "Describes a topic of a direct messages chat." },
12918
12930
  fields: [{
12919
12931
  name: "topic_id",
12920
- type: { type: "int52" },
12932
+ type: { type: "int53" },
12921
12933
  description: { markdown: "Unique identifier of the topic." },
12922
12934
  required: true,
12923
12935
  jsonSerialized: false
@@ -12978,7 +12990,7 @@ const File = t({
12978
12990
  },
12979
12991
  {
12980
12992
  name: "file_size",
12981
- type: { type: "int52" },
12993
+ type: { type: "int53" },
12982
12994
  description: { markdown: "File size in bytes." },
12983
12995
  required: false,
12984
12996
  jsonSerialized: false
@@ -14369,7 +14381,7 @@ const ChatJoinRequest = t({
14369
14381
  },
14370
14382
  {
14371
14383
  name: "user_chat_id",
14372
- type: { type: "int52" },
14384
+ type: { type: "int53" },
14373
14385
  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
14386
  required: true,
14375
14387
  jsonSerialized: false
@@ -16503,7 +16515,7 @@ const BusinessConnection = t({
16503
16515
  },
16504
16516
  {
16505
16517
  name: "user_chat_id",
16506
- type: { type: "int52" },
16518
+ type: { type: "int53" },
16507
16519
  description: { markdown: "Identifier of a private chat with the user who created the business connection." },
16508
16520
  required: true,
16509
16521
  jsonSerialized: false
@@ -16572,7 +16584,7 @@ const ResponseParameters = t({
16572
16584
  description: { markdown: "Describes why a request was unsuccessful." },
16573
16585
  fields: [{
16574
16586
  name: "migrate_to_chat_id",
16575
- type: { type: "int52" },
16587
+ type: { type: "int53" },
16576
16588
  description: { markdown: "The group has been migrated to a supergroup with the specified identifier." },
16577
16589
  required: false,
16578
16590
  jsonSerialized: false
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.3.2",
4
+ "version": "0.4.1",
5
5
  "description": "Telegram Bot API specification as a collection of JavaScript objects in a custom format.",
6
6
  "license": "MIT",
7
7
  "repository": {