@myronsi/messenger-api 2.1.0-alpha.2.next.63 → 2.1.0-alpha.21
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/CHANGELOG.md +226 -0
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1 -1
- package/dist/openapi.yaml +3443 -220
- package/dist/schema.d.ts +6653 -1749
- package/dist/ws-docs.json +99 -3
- package/dist/ws-events.d.ts +356 -8
- package/dist/ws-events.schema.json +2438 -368
- package/package.json +1 -1
|
@@ -202,6 +202,16 @@
|
|
|
202
202
|
"invalid_client_version",
|
|
203
203
|
"blocked_by_user",
|
|
204
204
|
"approval_required",
|
|
205
|
+
"user_verification_required",
|
|
206
|
+
"session_too_new",
|
|
207
|
+
"calls_unavailable",
|
|
208
|
+
"calls_not_allowed",
|
|
209
|
+
"call_identity_required",
|
|
210
|
+
"call_full",
|
|
211
|
+
"call_ended",
|
|
212
|
+
"already_in_call",
|
|
213
|
+
"stale_epoch",
|
|
214
|
+
"limit_reached",
|
|
205
215
|
"internal_error"
|
|
206
216
|
]
|
|
207
217
|
},
|
|
@@ -484,7 +494,8 @@
|
|
|
484
494
|
"required": [
|
|
485
495
|
"id",
|
|
486
496
|
"type",
|
|
487
|
-
"created_at"
|
|
497
|
+
"created_at",
|
|
498
|
+
"location"
|
|
488
499
|
],
|
|
489
500
|
"properties": {
|
|
490
501
|
"id": {
|
|
@@ -496,6 +507,24 @@
|
|
|
496
507
|
"created_at": {
|
|
497
508
|
"type": "string",
|
|
498
509
|
"format": "date-time"
|
|
510
|
+
},
|
|
511
|
+
"user_agent": {
|
|
512
|
+
"type": [
|
|
513
|
+
"string",
|
|
514
|
+
"null"
|
|
515
|
+
],
|
|
516
|
+
"maxLength": 512
|
|
517
|
+
},
|
|
518
|
+
"location": {
|
|
519
|
+
"description": "Approximate location of the client when the event happened; `null` when unknown.",
|
|
520
|
+
"oneOf": [
|
|
521
|
+
{
|
|
522
|
+
"$ref": "#/$defs/Location"
|
|
523
|
+
},
|
|
524
|
+
{
|
|
525
|
+
"type": "null"
|
|
526
|
+
}
|
|
527
|
+
]
|
|
499
528
|
}
|
|
500
529
|
}
|
|
501
530
|
}
|
|
@@ -509,17 +538,14 @@
|
|
|
509
538
|
},
|
|
510
539
|
{
|
|
511
540
|
"type": "object",
|
|
512
|
-
"description": "
|
|
541
|
+
"description": "The one-time recovery key shown after registration.",
|
|
513
542
|
"properties": {
|
|
514
543
|
"recovery_key": {
|
|
515
544
|
"type": "string",
|
|
516
545
|
"description": "Shown once; only a keyed hash is stored"
|
|
517
546
|
},
|
|
518
|
-
"
|
|
519
|
-
"
|
|
520
|
-
},
|
|
521
|
-
"qr_part": {
|
|
522
|
-
"type": "string"
|
|
547
|
+
"username": {
|
|
548
|
+
"$ref": "#/$defs/Username"
|
|
523
549
|
}
|
|
524
550
|
}
|
|
525
551
|
}
|
|
@@ -551,52 +577,6 @@
|
|
|
551
577
|
}
|
|
552
578
|
]
|
|
553
579
|
},
|
|
554
|
-
"RecoveryRequest": {
|
|
555
|
-
"type": "object",
|
|
556
|
-
"required": [
|
|
557
|
-
"username"
|
|
558
|
-
],
|
|
559
|
-
"properties": {
|
|
560
|
-
"username": {
|
|
561
|
-
"$ref": "#/$defs/Username"
|
|
562
|
-
},
|
|
563
|
-
"device_part": {
|
|
564
|
-
"type": "string"
|
|
565
|
-
},
|
|
566
|
-
"qr_part": {
|
|
567
|
-
"type": "string"
|
|
568
|
-
}
|
|
569
|
-
}
|
|
570
|
-
},
|
|
571
|
-
"RecoveryResponse": {
|
|
572
|
-
"type": "object",
|
|
573
|
-
"required": [
|
|
574
|
-
"recovery_token"
|
|
575
|
-
],
|
|
576
|
-
"properties": {
|
|
577
|
-
"recovery_token": {
|
|
578
|
-
"type": "string"
|
|
579
|
-
}
|
|
580
|
-
}
|
|
581
|
-
},
|
|
582
|
-
"ResetPasswordRequest": {
|
|
583
|
-
"type": "object",
|
|
584
|
-
"required": [
|
|
585
|
-
"recovery_token",
|
|
586
|
-
"new_password"
|
|
587
|
-
],
|
|
588
|
-
"properties": {
|
|
589
|
-
"recovery_token": {
|
|
590
|
-
"type": "string"
|
|
591
|
-
},
|
|
592
|
-
"new_password": {
|
|
593
|
-
"type": "string",
|
|
594
|
-
"minLength": 8,
|
|
595
|
-
"maxLength": 128,
|
|
596
|
-
"writeOnly": true
|
|
597
|
-
}
|
|
598
|
-
}
|
|
599
|
-
},
|
|
600
580
|
"WebSocketTicket": {
|
|
601
581
|
"type": "object",
|
|
602
582
|
"required": [
|
|
@@ -712,7 +692,8 @@
|
|
|
712
692
|
"id",
|
|
713
693
|
"created_at",
|
|
714
694
|
"last_used_at",
|
|
715
|
-
"is_current"
|
|
695
|
+
"is_current",
|
|
696
|
+
"location"
|
|
716
697
|
],
|
|
717
698
|
"properties": {
|
|
718
699
|
"id": {
|
|
@@ -737,6 +718,50 @@
|
|
|
737
718
|
},
|
|
738
719
|
"is_current": {
|
|
739
720
|
"type": "boolean"
|
|
721
|
+
},
|
|
722
|
+
"location": {
|
|
723
|
+
"description": "Approximate location of the device when it signed in or last refreshed its token; `null` when unknown.",
|
|
724
|
+
"oneOf": [
|
|
725
|
+
{
|
|
726
|
+
"$ref": "#/$defs/Location"
|
|
727
|
+
},
|
|
728
|
+
{
|
|
729
|
+
"type": "null"
|
|
730
|
+
}
|
|
731
|
+
]
|
|
732
|
+
}
|
|
733
|
+
}
|
|
734
|
+
},
|
|
735
|
+
"Location": {
|
|
736
|
+
"type": "object",
|
|
737
|
+
"description": "Approximate location of a client address, looked up in an offline GeoIP database (IP geolocation by\nDB-IP, https://db-ip.com, CC BY 4.0). The address itself is never exposed. Each field is `null` when the\ndatabase does not know it; clients localise the country name from `country_code`.\n",
|
|
738
|
+
"required": [
|
|
739
|
+
"city",
|
|
740
|
+
"country_code",
|
|
741
|
+
"country"
|
|
742
|
+
],
|
|
743
|
+
"properties": {
|
|
744
|
+
"city": {
|
|
745
|
+
"type": [
|
|
746
|
+
"string",
|
|
747
|
+
"null"
|
|
748
|
+
],
|
|
749
|
+
"description": "City name in English"
|
|
750
|
+
},
|
|
751
|
+
"country_code": {
|
|
752
|
+
"type": [
|
|
753
|
+
"string",
|
|
754
|
+
"null"
|
|
755
|
+
],
|
|
756
|
+
"pattern": "^[A-Z]{2}$",
|
|
757
|
+
"description": "ISO 3166-1 alpha-2 country code"
|
|
758
|
+
},
|
|
759
|
+
"country": {
|
|
760
|
+
"type": [
|
|
761
|
+
"string",
|
|
762
|
+
"null"
|
|
763
|
+
],
|
|
764
|
+
"description": "Country name in English"
|
|
740
765
|
}
|
|
741
766
|
}
|
|
742
767
|
},
|
|
@@ -785,8 +810,7 @@
|
|
|
785
810
|
"DisableTwoFactorRequest": {
|
|
786
811
|
"type": "object",
|
|
787
812
|
"required": [
|
|
788
|
-
"password"
|
|
789
|
-
"code"
|
|
813
|
+
"password"
|
|
790
814
|
],
|
|
791
815
|
"properties": {
|
|
792
816
|
"password": {
|
|
@@ -803,7 +827,7 @@
|
|
|
803
827
|
},
|
|
804
828
|
"Visibility": {
|
|
805
829
|
"type": "string",
|
|
806
|
-
"description": "Who may see the item. `*_except`
|
|
830
|
+
"description": "Who may see the item. The exception lists apply to every value; `*_except` behave like `everyone` and `nobody`.\n`contacts` are the users you share a group with, or a direct chat that you opened or read in.\n",
|
|
807
831
|
"enum": [
|
|
808
832
|
"everyone",
|
|
809
833
|
"contacts",
|
|
@@ -840,7 +864,7 @@
|
|
|
840
864
|
},
|
|
841
865
|
"PrivacyExceptions": {
|
|
842
866
|
"type": "object",
|
|
843
|
-
"description": "User IDs per setting; `allow`
|
|
867
|
+
"description": "User IDs per setting. An exception wins over the setting whatever its value; `allow` always lets the user in, `deny` always keeps them out.",
|
|
844
868
|
"additionalProperties": {
|
|
845
869
|
"type": "object",
|
|
846
870
|
"required": [
|
|
@@ -873,6 +897,8 @@
|
|
|
873
897
|
"direct_messages",
|
|
874
898
|
"group_invites",
|
|
875
899
|
"search_visibility",
|
|
900
|
+
"calls_enabled",
|
|
901
|
+
"typing_indicators_enabled",
|
|
876
902
|
"exceptions"
|
|
877
903
|
],
|
|
878
904
|
"properties": {
|
|
@@ -897,6 +923,14 @@
|
|
|
897
923
|
"search_visibility": {
|
|
898
924
|
"$ref": "#/$defs/SearchVisibility"
|
|
899
925
|
},
|
|
926
|
+
"calls_enabled": {
|
|
927
|
+
"type": "boolean",
|
|
928
|
+
"description": "Whether others may ring this user. Calls are only possible from an existing direct chat or a shared group."
|
|
929
|
+
},
|
|
930
|
+
"typing_indicators_enabled": {
|
|
931
|
+
"type": "boolean",
|
|
932
|
+
"description": "Whether other members see that this user is typing or recording a voice message. The user still sees theirs."
|
|
933
|
+
},
|
|
900
934
|
"exceptions": {
|
|
901
935
|
"$ref": "#/$defs/PrivacyExceptions"
|
|
902
936
|
}
|
|
@@ -926,6 +960,12 @@
|
|
|
926
960
|
},
|
|
927
961
|
"search_visibility": {
|
|
928
962
|
"$ref": "#/$defs/SearchVisibility"
|
|
963
|
+
},
|
|
964
|
+
"calls_enabled": {
|
|
965
|
+
"type": "boolean"
|
|
966
|
+
},
|
|
967
|
+
"typing_indicators_enabled": {
|
|
968
|
+
"type": "boolean"
|
|
929
969
|
}
|
|
930
970
|
}
|
|
931
971
|
},
|
|
@@ -979,7 +1019,7 @@
|
|
|
979
1019
|
"string",
|
|
980
1020
|
"null"
|
|
981
1021
|
],
|
|
982
|
-
"description": "Path of the avatar, always same-origin (`/api/v2/users/{id}/avatar`)."
|
|
1022
|
+
"description": "Path of the avatar, always same-origin (`/api/v2/users/{id}/avatar?rev={revision}`)."
|
|
983
1023
|
},
|
|
984
1024
|
"bio": {
|
|
985
1025
|
"type": [
|
|
@@ -1088,9 +1128,11 @@
|
|
|
1088
1128
|
},
|
|
1089
1129
|
"UploadPurpose": {
|
|
1090
1130
|
"type": "string",
|
|
1131
|
+
"description": "`sticker`: a PNG, JPEG or still WebP of at most 5 MB. The server fits it into 512 x 512 px with a transparent\nborder and stores a WebP (`413` when that is still over 512 KB). Only its uploader can load it until it is\nadded to a pack.\n",
|
|
1091
1132
|
"enum": [
|
|
1092
1133
|
"message",
|
|
1093
|
-
"avatar"
|
|
1134
|
+
"avatar",
|
|
1135
|
+
"sticker"
|
|
1094
1136
|
]
|
|
1095
1137
|
},
|
|
1096
1138
|
"UploadAttachmentRequest": {
|
|
@@ -1182,6 +1224,14 @@
|
|
|
1182
1224
|
],
|
|
1183
1225
|
"readOnly": true
|
|
1184
1226
|
},
|
|
1227
|
+
"display_url": {
|
|
1228
|
+
"type": [
|
|
1229
|
+
"string",
|
|
1230
|
+
"null"
|
|
1231
|
+
],
|
|
1232
|
+
"readOnly": true,
|
|
1233
|
+
"description": "A JPEG of at most 1600 px to show in an image viewer instead of the original; `null` for small images and GIFs, which are shown as they are."
|
|
1234
|
+
},
|
|
1185
1235
|
"duration_ms": {
|
|
1186
1236
|
"type": [
|
|
1187
1237
|
"integer",
|
|
@@ -1199,6 +1249,178 @@
|
|
|
1199
1249
|
"minimum": 0,
|
|
1200
1250
|
"maximum": 255
|
|
1201
1251
|
}
|
|
1252
|
+
},
|
|
1253
|
+
"drawing": {
|
|
1254
|
+
"description": "What the sender drew on this image of this message. Clients show the image with the drawing on top\nand never without it. Absent when the image has no drawing. The same image can carry another drawing\nin another message.\n",
|
|
1255
|
+
"$ref": "#/$defs/Drawing"
|
|
1256
|
+
}
|
|
1257
|
+
}
|
|
1258
|
+
},
|
|
1259
|
+
"Drawing": {
|
|
1260
|
+
"type": "object",
|
|
1261
|
+
"description": "Strokes and text labels on an image. Coordinates, widths and sizes are fractions of the image as it is\nshown (0 is the left or top edge, 1 the right or bottom edge), so the drawing fits any display size.\nItems are drawn in order. The server rounds numbers to four decimals.\n",
|
|
1262
|
+
"required": [
|
|
1263
|
+
"version",
|
|
1264
|
+
"items"
|
|
1265
|
+
],
|
|
1266
|
+
"additionalProperties": false,
|
|
1267
|
+
"properties": {
|
|
1268
|
+
"version": {
|
|
1269
|
+
"type": "integer",
|
|
1270
|
+
"minimum": 1,
|
|
1271
|
+
"maximum": 1
|
|
1272
|
+
},
|
|
1273
|
+
"items": {
|
|
1274
|
+
"type": "array",
|
|
1275
|
+
"minItems": 1,
|
|
1276
|
+
"maxItems": 200,
|
|
1277
|
+
"items": {
|
|
1278
|
+
"$ref": "#/$defs/DrawingItem"
|
|
1279
|
+
}
|
|
1280
|
+
}
|
|
1281
|
+
}
|
|
1282
|
+
},
|
|
1283
|
+
"DrawingItem": {
|
|
1284
|
+
"type": "object",
|
|
1285
|
+
"required": [
|
|
1286
|
+
"type",
|
|
1287
|
+
"color"
|
|
1288
|
+
],
|
|
1289
|
+
"additionalProperties": false,
|
|
1290
|
+
"properties": {
|
|
1291
|
+
"type": {
|
|
1292
|
+
"type": "string",
|
|
1293
|
+
"enum": [
|
|
1294
|
+
"stroke",
|
|
1295
|
+
"text"
|
|
1296
|
+
]
|
|
1297
|
+
},
|
|
1298
|
+
"color": {
|
|
1299
|
+
"type": "string",
|
|
1300
|
+
"pattern": "^#[0-9a-fA-F]{6}$"
|
|
1301
|
+
},
|
|
1302
|
+
"width": {
|
|
1303
|
+
"type": "number",
|
|
1304
|
+
"format": "double",
|
|
1305
|
+
"minimum": 0.001,
|
|
1306
|
+
"maximum": 0.2,
|
|
1307
|
+
"description": "Stroke only. Line width as a fraction of the image width."
|
|
1308
|
+
},
|
|
1309
|
+
"points": {
|
|
1310
|
+
"type": "array",
|
|
1311
|
+
"minItems": 2,
|
|
1312
|
+
"maxItems": 10000,
|
|
1313
|
+
"description": "Stroke only. Flat list of x, y pairs. A drawing has at most 10000 numbers in all its strokes.",
|
|
1314
|
+
"items": {
|
|
1315
|
+
"type": "number",
|
|
1316
|
+
"format": "double",
|
|
1317
|
+
"minimum": 0,
|
|
1318
|
+
"maximum": 1
|
|
1319
|
+
}
|
|
1320
|
+
},
|
|
1321
|
+
"x": {
|
|
1322
|
+
"type": "number",
|
|
1323
|
+
"format": "double",
|
|
1324
|
+
"minimum": 0,
|
|
1325
|
+
"maximum": 1,
|
|
1326
|
+
"description": "Text only. Left edge of the label."
|
|
1327
|
+
},
|
|
1328
|
+
"y": {
|
|
1329
|
+
"type": "number",
|
|
1330
|
+
"format": "double",
|
|
1331
|
+
"minimum": 0,
|
|
1332
|
+
"maximum": 1,
|
|
1333
|
+
"description": "Text only. Top edge of the label."
|
|
1334
|
+
},
|
|
1335
|
+
"size": {
|
|
1336
|
+
"type": "number",
|
|
1337
|
+
"format": "double",
|
|
1338
|
+
"minimum": 0.01,
|
|
1339
|
+
"maximum": 0.5,
|
|
1340
|
+
"description": "Text only. Font height as a fraction of the image height."
|
|
1341
|
+
},
|
|
1342
|
+
"text": {
|
|
1343
|
+
"type": "string",
|
|
1344
|
+
"minLength": 1,
|
|
1345
|
+
"maxLength": 200,
|
|
1346
|
+
"description": "Text only."
|
|
1347
|
+
}
|
|
1348
|
+
},
|
|
1349
|
+
"if": {
|
|
1350
|
+
"properties": {
|
|
1351
|
+
"type": {
|
|
1352
|
+
"const": "stroke"
|
|
1353
|
+
}
|
|
1354
|
+
}
|
|
1355
|
+
},
|
|
1356
|
+
"then": {
|
|
1357
|
+
"required": [
|
|
1358
|
+
"width",
|
|
1359
|
+
"points"
|
|
1360
|
+
],
|
|
1361
|
+
"properties": {
|
|
1362
|
+
"width": {
|
|
1363
|
+
"type": "number"
|
|
1364
|
+
},
|
|
1365
|
+
"points": {
|
|
1366
|
+
"type": "array"
|
|
1367
|
+
},
|
|
1368
|
+
"x": {
|
|
1369
|
+
"not": {}
|
|
1370
|
+
},
|
|
1371
|
+
"y": {
|
|
1372
|
+
"not": {}
|
|
1373
|
+
},
|
|
1374
|
+
"size": {
|
|
1375
|
+
"not": {}
|
|
1376
|
+
},
|
|
1377
|
+
"text": {
|
|
1378
|
+
"not": {}
|
|
1379
|
+
}
|
|
1380
|
+
}
|
|
1381
|
+
},
|
|
1382
|
+
"else": {
|
|
1383
|
+
"required": [
|
|
1384
|
+
"x",
|
|
1385
|
+
"y",
|
|
1386
|
+
"size",
|
|
1387
|
+
"text"
|
|
1388
|
+
],
|
|
1389
|
+
"properties": {
|
|
1390
|
+
"x": {
|
|
1391
|
+
"type": "number"
|
|
1392
|
+
},
|
|
1393
|
+
"y": {
|
|
1394
|
+
"type": "number"
|
|
1395
|
+
},
|
|
1396
|
+
"size": {
|
|
1397
|
+
"type": "number"
|
|
1398
|
+
},
|
|
1399
|
+
"text": {
|
|
1400
|
+
"type": "string"
|
|
1401
|
+
},
|
|
1402
|
+
"width": {
|
|
1403
|
+
"not": {}
|
|
1404
|
+
},
|
|
1405
|
+
"points": {
|
|
1406
|
+
"not": {}
|
|
1407
|
+
}
|
|
1408
|
+
}
|
|
1409
|
+
}
|
|
1410
|
+
},
|
|
1411
|
+
"AttachmentDrawing": {
|
|
1412
|
+
"type": "object",
|
|
1413
|
+
"required": [
|
|
1414
|
+
"attachment_id",
|
|
1415
|
+
"drawing"
|
|
1416
|
+
],
|
|
1417
|
+
"additionalProperties": false,
|
|
1418
|
+
"properties": {
|
|
1419
|
+
"attachment_id": {
|
|
1420
|
+
"$ref": "#/$defs/AttachmentRef"
|
|
1421
|
+
},
|
|
1422
|
+
"drawing": {
|
|
1423
|
+
"$ref": "#/$defs/Drawing"
|
|
1202
1424
|
}
|
|
1203
1425
|
}
|
|
1204
1426
|
},
|
|
@@ -1206,7 +1428,8 @@
|
|
|
1206
1428
|
"type": "string",
|
|
1207
1429
|
"enum": [
|
|
1208
1430
|
"image",
|
|
1209
|
-
"audio"
|
|
1431
|
+
"audio",
|
|
1432
|
+
"visual"
|
|
1210
1433
|
]
|
|
1211
1434
|
},
|
|
1212
1435
|
"MessageType": {
|
|
@@ -1215,75 +1438,355 @@
|
|
|
1215
1438
|
"text",
|
|
1216
1439
|
"file",
|
|
1217
1440
|
"voice",
|
|
1218
|
-
"system"
|
|
1441
|
+
"system",
|
|
1442
|
+
"sticker"
|
|
1219
1443
|
]
|
|
1220
1444
|
},
|
|
1221
|
-
"
|
|
1445
|
+
"Sticker": {
|
|
1222
1446
|
"type": "object",
|
|
1447
|
+
"description": "One sticker of a pack. `image` is a WebP or PNG of at most 512 x 512 px with transparency, animated when\n`is_animated` is true; any signed-in user can load it. Clients show it without a bubble.\n",
|
|
1223
1448
|
"required": [
|
|
1449
|
+
"id",
|
|
1450
|
+
"pack_id",
|
|
1224
1451
|
"emoji",
|
|
1225
|
-
"
|
|
1452
|
+
"is_animated",
|
|
1453
|
+
"image"
|
|
1226
1454
|
],
|
|
1227
1455
|
"properties": {
|
|
1456
|
+
"id": {
|
|
1457
|
+
"$ref": "#/$defs/Id"
|
|
1458
|
+
},
|
|
1459
|
+
"pack_id": {
|
|
1460
|
+
"$ref": "#/$defs/Id"
|
|
1461
|
+
},
|
|
1462
|
+
"pack_slug": {
|
|
1463
|
+
"allOf": [
|
|
1464
|
+
{
|
|
1465
|
+
"$ref": "#/$defs/StickerPackSlug"
|
|
1466
|
+
}
|
|
1467
|
+
],
|
|
1468
|
+
"description": "The share link of the sticker's pack when a user made it; missing for built-in packs. A client that\nshows the pack of a sticker someone sent opens it with `GET /stickers/links/{slug}`.\n"
|
|
1469
|
+
},
|
|
1228
1470
|
"emoji": {
|
|
1229
1471
|
"type": "string",
|
|
1230
1472
|
"minLength": 1,
|
|
1231
|
-
"maxLength": 32
|
|
1473
|
+
"maxLength": 32,
|
|
1474
|
+
"description": "The emoji the sticker stands for, for previews, notifications and search."
|
|
1232
1475
|
},
|
|
1233
|
-
"
|
|
1234
|
-
"
|
|
1476
|
+
"is_animated": {
|
|
1477
|
+
"type": "boolean"
|
|
1478
|
+
},
|
|
1479
|
+
"image": {
|
|
1480
|
+
"$ref": "#/$defs/Attachment"
|
|
1235
1481
|
}
|
|
1236
1482
|
}
|
|
1237
1483
|
},
|
|
1238
|
-
"
|
|
1484
|
+
"StickerPackSlug": {
|
|
1485
|
+
"type": "string",
|
|
1486
|
+
"pattern": "^[A-Za-z0-9]{8,32}$"
|
|
1487
|
+
},
|
|
1488
|
+
"StickerPack": {
|
|
1239
1489
|
"type": "object",
|
|
1240
1490
|
"required": [
|
|
1241
|
-
"
|
|
1242
|
-
"
|
|
1491
|
+
"id",
|
|
1492
|
+
"title",
|
|
1493
|
+
"is_official",
|
|
1494
|
+
"is_installed",
|
|
1495
|
+
"is_mine",
|
|
1496
|
+
"is_hidden",
|
|
1497
|
+
"stickers"
|
|
1243
1498
|
],
|
|
1244
1499
|
"properties": {
|
|
1245
|
-
"
|
|
1500
|
+
"id": {
|
|
1246
1501
|
"$ref": "#/$defs/Id"
|
|
1247
1502
|
},
|
|
1248
|
-
"
|
|
1249
|
-
"
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
"
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
"
|
|
1503
|
+
"title": {
|
|
1504
|
+
"type": "string",
|
|
1505
|
+
"minLength": 1,
|
|
1506
|
+
"maxLength": 64
|
|
1507
|
+
},
|
|
1508
|
+
"is_official": {
|
|
1509
|
+
"type": "boolean",
|
|
1510
|
+
"description": "A built-in pack of the messenger, not made by a user."
|
|
1511
|
+
},
|
|
1512
|
+
"is_installed": {
|
|
1513
|
+
"type": "boolean",
|
|
1514
|
+
"description": "The pack is in the user's sticker panel."
|
|
1515
|
+
},
|
|
1516
|
+
"is_mine": {
|
|
1517
|
+
"type": "boolean",
|
|
1518
|
+
"description": "The user made the pack and may change it."
|
|
1519
|
+
},
|
|
1520
|
+
"is_hidden": {
|
|
1521
|
+
"type": "boolean",
|
|
1522
|
+
"description": "Hidden after reports; only the owner sees such a pack, and nobody can send from it."
|
|
1523
|
+
},
|
|
1524
|
+
"owner_id": {
|
|
1262
1525
|
"$ref": "#/$defs/Id"
|
|
1263
1526
|
},
|
|
1264
|
-
"
|
|
1265
|
-
"
|
|
1266
|
-
{
|
|
1267
|
-
"$ref": "#/$defs/Id"
|
|
1268
|
-
},
|
|
1527
|
+
"slug": {
|
|
1528
|
+
"allOf": [
|
|
1269
1529
|
{
|
|
1270
|
-
"
|
|
1530
|
+
"$ref": "#/$defs/StickerPackSlug"
|
|
1271
1531
|
}
|
|
1272
|
-
]
|
|
1532
|
+
],
|
|
1533
|
+
"description": "The share link of a pack a user made; missing for built-in packs."
|
|
1273
1534
|
},
|
|
1274
|
-
"
|
|
1275
|
-
"type": "
|
|
1535
|
+
"stickers": {
|
|
1536
|
+
"type": "array",
|
|
1537
|
+
"maxItems": 120,
|
|
1538
|
+
"items": {
|
|
1539
|
+
"$ref": "#/$defs/Sticker"
|
|
1540
|
+
}
|
|
1276
1541
|
}
|
|
1277
1542
|
}
|
|
1278
1543
|
},
|
|
1279
|
-
"
|
|
1544
|
+
"StickerPackList": {
|
|
1280
1545
|
"type": "object",
|
|
1281
1546
|
"required": [
|
|
1282
|
-
"
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
"
|
|
1286
|
-
|
|
1547
|
+
"items"
|
|
1548
|
+
],
|
|
1549
|
+
"properties": {
|
|
1550
|
+
"items": {
|
|
1551
|
+
"type": "array",
|
|
1552
|
+
"maxItems": 200,
|
|
1553
|
+
"items": {
|
|
1554
|
+
"$ref": "#/$defs/StickerPack"
|
|
1555
|
+
}
|
|
1556
|
+
}
|
|
1557
|
+
}
|
|
1558
|
+
},
|
|
1559
|
+
"CreateStickerPackRequest": {
|
|
1560
|
+
"type": "object",
|
|
1561
|
+
"additionalProperties": false,
|
|
1562
|
+
"required": [
|
|
1563
|
+
"title"
|
|
1564
|
+
],
|
|
1565
|
+
"properties": {
|
|
1566
|
+
"title": {
|
|
1567
|
+
"type": "string",
|
|
1568
|
+
"minLength": 1,
|
|
1569
|
+
"maxLength": 64
|
|
1570
|
+
}
|
|
1571
|
+
}
|
|
1572
|
+
},
|
|
1573
|
+
"UpdateStickerPackRequest": {
|
|
1574
|
+
"type": "object",
|
|
1575
|
+
"additionalProperties": false,
|
|
1576
|
+
"required": [
|
|
1577
|
+
"title"
|
|
1578
|
+
],
|
|
1579
|
+
"properties": {
|
|
1580
|
+
"title": {
|
|
1581
|
+
"type": "string",
|
|
1582
|
+
"minLength": 1,
|
|
1583
|
+
"maxLength": 64
|
|
1584
|
+
}
|
|
1585
|
+
}
|
|
1586
|
+
},
|
|
1587
|
+
"AddStickerRequest": {
|
|
1588
|
+
"type": "object",
|
|
1589
|
+
"additionalProperties": false,
|
|
1590
|
+
"required": [
|
|
1591
|
+
"attachment_id",
|
|
1592
|
+
"emoji"
|
|
1593
|
+
],
|
|
1594
|
+
"properties": {
|
|
1595
|
+
"attachment_id": {
|
|
1596
|
+
"$ref": "#/$defs/AttachmentRef"
|
|
1597
|
+
},
|
|
1598
|
+
"emoji": {
|
|
1599
|
+
"type": "string",
|
|
1600
|
+
"minLength": 1,
|
|
1601
|
+
"maxLength": 32
|
|
1602
|
+
}
|
|
1603
|
+
}
|
|
1604
|
+
},
|
|
1605
|
+
"UpdateStickerRequest": {
|
|
1606
|
+
"type": "object",
|
|
1607
|
+
"additionalProperties": false,
|
|
1608
|
+
"required": [
|
|
1609
|
+
"emoji"
|
|
1610
|
+
],
|
|
1611
|
+
"properties": {
|
|
1612
|
+
"emoji": {
|
|
1613
|
+
"type": "string",
|
|
1614
|
+
"minLength": 1,
|
|
1615
|
+
"maxLength": 32
|
|
1616
|
+
}
|
|
1617
|
+
}
|
|
1618
|
+
},
|
|
1619
|
+
"ReorderStickersRequest": {
|
|
1620
|
+
"type": "object",
|
|
1621
|
+
"additionalProperties": false,
|
|
1622
|
+
"required": [
|
|
1623
|
+
"sticker_ids"
|
|
1624
|
+
],
|
|
1625
|
+
"properties": {
|
|
1626
|
+
"sticker_ids": {
|
|
1627
|
+
"type": "array",
|
|
1628
|
+
"maxItems": 120,
|
|
1629
|
+
"items": {
|
|
1630
|
+
"$ref": "#/$defs/Id"
|
|
1631
|
+
}
|
|
1632
|
+
}
|
|
1633
|
+
}
|
|
1634
|
+
},
|
|
1635
|
+
"StickerPackReportReason": {
|
|
1636
|
+
"type": "string",
|
|
1637
|
+
"enum": [
|
|
1638
|
+
"spam",
|
|
1639
|
+
"violence",
|
|
1640
|
+
"sexual",
|
|
1641
|
+
"hate",
|
|
1642
|
+
"copyright",
|
|
1643
|
+
"other"
|
|
1644
|
+
]
|
|
1645
|
+
},
|
|
1646
|
+
"ReportStickerPackRequest": {
|
|
1647
|
+
"type": "object",
|
|
1648
|
+
"additionalProperties": false,
|
|
1649
|
+
"required": [
|
|
1650
|
+
"reason"
|
|
1651
|
+
],
|
|
1652
|
+
"properties": {
|
|
1653
|
+
"reason": {
|
|
1654
|
+
"$ref": "#/$defs/StickerPackReportReason"
|
|
1655
|
+
}
|
|
1656
|
+
}
|
|
1657
|
+
},
|
|
1658
|
+
"StickerList": {
|
|
1659
|
+
"type": "object",
|
|
1660
|
+
"required": [
|
|
1661
|
+
"items"
|
|
1662
|
+
],
|
|
1663
|
+
"properties": {
|
|
1664
|
+
"items": {
|
|
1665
|
+
"type": "array",
|
|
1666
|
+
"maxItems": 20,
|
|
1667
|
+
"items": {
|
|
1668
|
+
"$ref": "#/$defs/Sticker"
|
|
1669
|
+
}
|
|
1670
|
+
}
|
|
1671
|
+
}
|
|
1672
|
+
},
|
|
1673
|
+
"Reaction": {
|
|
1674
|
+
"type": "object",
|
|
1675
|
+
"required": [
|
|
1676
|
+
"emoji",
|
|
1677
|
+
"user_id"
|
|
1678
|
+
],
|
|
1679
|
+
"properties": {
|
|
1680
|
+
"emoji": {
|
|
1681
|
+
"type": "string",
|
|
1682
|
+
"minLength": 1,
|
|
1683
|
+
"maxLength": 32
|
|
1684
|
+
},
|
|
1685
|
+
"user_id": {
|
|
1686
|
+
"$ref": "#/$defs/Id"
|
|
1687
|
+
}
|
|
1688
|
+
}
|
|
1689
|
+
},
|
|
1690
|
+
"ReadReceipt": {
|
|
1691
|
+
"type": "object",
|
|
1692
|
+
"required": [
|
|
1693
|
+
"user_id",
|
|
1694
|
+
"read_at"
|
|
1695
|
+
],
|
|
1696
|
+
"properties": {
|
|
1697
|
+
"user_id": {
|
|
1698
|
+
"$ref": "#/$defs/Id"
|
|
1699
|
+
},
|
|
1700
|
+
"read_at": {
|
|
1701
|
+
"$ref": "#/$defs/Timestamp"
|
|
1702
|
+
}
|
|
1703
|
+
}
|
|
1704
|
+
},
|
|
1705
|
+
"ForwardedFrom": {
|
|
1706
|
+
"type": "object",
|
|
1707
|
+
"required": [
|
|
1708
|
+
"message_id",
|
|
1709
|
+
"sender_id",
|
|
1710
|
+
"sender_name"
|
|
1711
|
+
],
|
|
1712
|
+
"properties": {
|
|
1713
|
+
"message_id": {
|
|
1714
|
+
"$ref": "#/$defs/Id"
|
|
1715
|
+
},
|
|
1716
|
+
"sender_id": {
|
|
1717
|
+
"oneOf": [
|
|
1718
|
+
{
|
|
1719
|
+
"$ref": "#/$defs/Id"
|
|
1720
|
+
},
|
|
1721
|
+
{
|
|
1722
|
+
"type": "null"
|
|
1723
|
+
}
|
|
1724
|
+
]
|
|
1725
|
+
},
|
|
1726
|
+
"sender_name": {
|
|
1727
|
+
"type": "string"
|
|
1728
|
+
}
|
|
1729
|
+
}
|
|
1730
|
+
},
|
|
1731
|
+
"ReplyPreview": {
|
|
1732
|
+
"type": "object",
|
|
1733
|
+
"description": "What a reply shows of the message it answers, so a client can draw the quote without loading that\nmessage. Set on messages of history pages and `message` events when the recipient can see the answered\nmessage; absent when it is gone or hidden for them, and on chat-list previews and search results.\n",
|
|
1734
|
+
"required": [
|
|
1735
|
+
"id",
|
|
1736
|
+
"type",
|
|
1737
|
+
"sender",
|
|
1738
|
+
"content",
|
|
1739
|
+
"attachment",
|
|
1740
|
+
"is_deleted"
|
|
1741
|
+
],
|
|
1742
|
+
"properties": {
|
|
1743
|
+
"id": {
|
|
1744
|
+
"$ref": "#/$defs/Id"
|
|
1745
|
+
},
|
|
1746
|
+
"type": {
|
|
1747
|
+
"$ref": "#/$defs/MessageType"
|
|
1748
|
+
},
|
|
1749
|
+
"sender": {
|
|
1750
|
+
"oneOf": [
|
|
1751
|
+
{
|
|
1752
|
+
"$ref": "#/$defs/User"
|
|
1753
|
+
},
|
|
1754
|
+
{
|
|
1755
|
+
"type": "null"
|
|
1756
|
+
}
|
|
1757
|
+
]
|
|
1758
|
+
},
|
|
1759
|
+
"content": {
|
|
1760
|
+
"type": [
|
|
1761
|
+
"string",
|
|
1762
|
+
"null"
|
|
1763
|
+
],
|
|
1764
|
+
"maxLength": 100,
|
|
1765
|
+
"description": "The first 100 characters of the text or caption; `null` when deleted or empty."
|
|
1766
|
+
},
|
|
1767
|
+
"attachment": {
|
|
1768
|
+
"oneOf": [
|
|
1769
|
+
{
|
|
1770
|
+
"$ref": "#/$defs/Attachment"
|
|
1771
|
+
},
|
|
1772
|
+
{
|
|
1773
|
+
"type": "null"
|
|
1774
|
+
}
|
|
1775
|
+
]
|
|
1776
|
+
},
|
|
1777
|
+
"is_deleted": {
|
|
1778
|
+
"type": "boolean"
|
|
1779
|
+
}
|
|
1780
|
+
}
|
|
1781
|
+
},
|
|
1782
|
+
"Message": {
|
|
1783
|
+
"type": "object",
|
|
1784
|
+
"required": [
|
|
1785
|
+
"id",
|
|
1786
|
+
"chat_id",
|
|
1787
|
+
"type",
|
|
1788
|
+
"sender",
|
|
1789
|
+
"content",
|
|
1287
1790
|
"attachment",
|
|
1288
1791
|
"reply_to",
|
|
1289
1792
|
"forwarded_from",
|
|
@@ -1320,7 +1823,7 @@
|
|
|
1320
1823
|
"null"
|
|
1321
1824
|
],
|
|
1322
1825
|
"maxLength": 4096,
|
|
1323
|
-
"description": "Text, or the
|
|
1826
|
+
"description": "Text, the caption of a file, or the emoji of a sticker; `null` when deleted."
|
|
1324
1827
|
},
|
|
1325
1828
|
"attachment": {
|
|
1326
1829
|
"oneOf": [
|
|
@@ -1342,6 +1845,9 @@
|
|
|
1342
1845
|
}
|
|
1343
1846
|
]
|
|
1344
1847
|
},
|
|
1848
|
+
"reply_preview": {
|
|
1849
|
+
"$ref": "#/$defs/ReplyPreview"
|
|
1850
|
+
},
|
|
1345
1851
|
"forwarded_from": {
|
|
1346
1852
|
"oneOf": [
|
|
1347
1853
|
{
|
|
@@ -1352,6 +1858,19 @@
|
|
|
1352
1858
|
}
|
|
1353
1859
|
]
|
|
1354
1860
|
},
|
|
1861
|
+
"sticker": {
|
|
1862
|
+
"description": "The sticker of a `sticker` message; absent for other types and when deleted. `attachment` carries the\nsame image, so older clients show a sticker as a picture.\n",
|
|
1863
|
+
"$ref": "#/$defs/Sticker"
|
|
1864
|
+
},
|
|
1865
|
+
"attachments": {
|
|
1866
|
+
"type": "array",
|
|
1867
|
+
"description": "Ordered images and videos of an album. The first item is also returned as attachment for older clients.",
|
|
1868
|
+
"minItems": 2,
|
|
1869
|
+
"maxItems": 10,
|
|
1870
|
+
"items": {
|
|
1871
|
+
"$ref": "#/$defs/Attachment"
|
|
1872
|
+
}
|
|
1873
|
+
},
|
|
1355
1874
|
"reactions": {
|
|
1356
1875
|
"type": "array",
|
|
1357
1876
|
"items": {
|
|
@@ -1380,43 +1899,168 @@
|
|
|
1380
1899
|
"is_deleted": {
|
|
1381
1900
|
"type": "boolean"
|
|
1382
1901
|
},
|
|
1902
|
+
"system_event": {
|
|
1903
|
+
"$ref": "#/$defs/SystemEvent"
|
|
1904
|
+
},
|
|
1383
1905
|
"client_temp_id": {
|
|
1384
1906
|
"$ref": "#/$defs/ClientTempId"
|
|
1385
1907
|
}
|
|
1386
1908
|
}
|
|
1387
1909
|
},
|
|
1388
|
-
"
|
|
1910
|
+
"LinkPreview": {
|
|
1389
1911
|
"type": "object",
|
|
1390
1912
|
"required": [
|
|
1391
|
-
"
|
|
1392
|
-
"
|
|
1393
|
-
"
|
|
1913
|
+
"url",
|
|
1914
|
+
"title",
|
|
1915
|
+
"description",
|
|
1916
|
+
"site_name",
|
|
1917
|
+
"image"
|
|
1394
1918
|
],
|
|
1395
1919
|
"properties": {
|
|
1396
|
-
"
|
|
1397
|
-
"type": "
|
|
1398
|
-
"description": "
|
|
1399
|
-
"items": {
|
|
1400
|
-
"$ref": "#/$defs/Message"
|
|
1401
|
-
}
|
|
1920
|
+
"url": {
|
|
1921
|
+
"type": "string",
|
|
1922
|
+
"description": "The page after redirects"
|
|
1402
1923
|
},
|
|
1403
|
-
"
|
|
1404
|
-
"
|
|
1924
|
+
"title": {
|
|
1925
|
+
"type": [
|
|
1926
|
+
"string",
|
|
1927
|
+
"null"
|
|
1928
|
+
],
|
|
1929
|
+
"maxLength": 300
|
|
1930
|
+
},
|
|
1931
|
+
"description": {
|
|
1932
|
+
"type": [
|
|
1933
|
+
"string",
|
|
1934
|
+
"null"
|
|
1935
|
+
],
|
|
1936
|
+
"maxLength": 500
|
|
1937
|
+
},
|
|
1938
|
+
"site_name": {
|
|
1939
|
+
"type": [
|
|
1940
|
+
"string",
|
|
1941
|
+
"null"
|
|
1942
|
+
],
|
|
1943
|
+
"maxLength": 100
|
|
1944
|
+
},
|
|
1945
|
+
"image": {
|
|
1405
1946
|
"oneOf": [
|
|
1406
1947
|
{
|
|
1407
|
-
"$ref": "#/$defs/
|
|
1948
|
+
"$ref": "#/$defs/LinkPreviewImage"
|
|
1408
1949
|
},
|
|
1409
1950
|
{
|
|
1410
1951
|
"type": "null"
|
|
1411
1952
|
}
|
|
1412
1953
|
]
|
|
1413
|
-
}
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1954
|
+
}
|
|
1955
|
+
}
|
|
1956
|
+
},
|
|
1957
|
+
"LinkPreviewImage": {
|
|
1958
|
+
"type": "object",
|
|
1959
|
+
"required": [
|
|
1960
|
+
"url",
|
|
1961
|
+
"width",
|
|
1962
|
+
"height"
|
|
1963
|
+
],
|
|
1964
|
+
"properties": {
|
|
1965
|
+
"url": {
|
|
1966
|
+
"type": "string",
|
|
1967
|
+
"description": "`GET /link-preview/image` with the signed address of the page's image"
|
|
1968
|
+
},
|
|
1969
|
+
"width": {
|
|
1970
|
+
"type": [
|
|
1971
|
+
"integer",
|
|
1972
|
+
"null"
|
|
1973
|
+
],
|
|
1974
|
+
"minimum": 1
|
|
1975
|
+
},
|
|
1976
|
+
"height": {
|
|
1977
|
+
"type": [
|
|
1978
|
+
"integer",
|
|
1979
|
+
"null"
|
|
1980
|
+
],
|
|
1981
|
+
"minimum": 1
|
|
1982
|
+
}
|
|
1983
|
+
}
|
|
1984
|
+
},
|
|
1985
|
+
"SystemEventKind": {
|
|
1986
|
+
"type": "string",
|
|
1987
|
+
"enum": [
|
|
1988
|
+
"group_created",
|
|
1989
|
+
"member_added",
|
|
1990
|
+
"member_joined",
|
|
1991
|
+
"member_removed",
|
|
1992
|
+
"member_left",
|
|
1993
|
+
"call"
|
|
1994
|
+
]
|
|
1995
|
+
},
|
|
1996
|
+
"SystemEvent": {
|
|
1997
|
+
"type": "object",
|
|
1998
|
+
"description": "What a `system` message records; set on system messages only, whose `content` is then `null`. The names\nare the display names at the time of the event. `target` fields are set for `member_added` and\n`member_removed`. `call` is set for `call` messages: one per call, posted when the call ends, `actor` is the\ninitiator.\n",
|
|
1999
|
+
"required": [
|
|
2000
|
+
"kind",
|
|
2001
|
+
"actor_id",
|
|
2002
|
+
"actor_name"
|
|
2003
|
+
],
|
|
2004
|
+
"properties": {
|
|
2005
|
+
"kind": {
|
|
2006
|
+
"$ref": "#/$defs/SystemEventKind"
|
|
2007
|
+
},
|
|
2008
|
+
"actor_id": {
|
|
2009
|
+
"oneOf": [
|
|
2010
|
+
{
|
|
2011
|
+
"$ref": "#/$defs/Id"
|
|
2012
|
+
},
|
|
2013
|
+
{
|
|
2014
|
+
"type": "null"
|
|
2015
|
+
}
|
|
2016
|
+
]
|
|
2017
|
+
},
|
|
2018
|
+
"actor_name": {
|
|
2019
|
+
"type": "string"
|
|
2020
|
+
},
|
|
2021
|
+
"target_id": {
|
|
2022
|
+
"$ref": "#/$defs/Id"
|
|
2023
|
+
},
|
|
2024
|
+
"target_name": {
|
|
2025
|
+
"type": "string"
|
|
2026
|
+
},
|
|
2027
|
+
"call": {
|
|
2028
|
+
"$ref": "#/$defs/CallSummary"
|
|
2029
|
+
}
|
|
2030
|
+
}
|
|
2031
|
+
},
|
|
2032
|
+
"MessagePage": {
|
|
2033
|
+
"type": "object",
|
|
2034
|
+
"required": [
|
|
2035
|
+
"items",
|
|
2036
|
+
"next_cursor",
|
|
2037
|
+
"prev_cursor"
|
|
2038
|
+
],
|
|
2039
|
+
"properties": {
|
|
2040
|
+
"items": {
|
|
2041
|
+
"type": "array",
|
|
2042
|
+
"description": "Oldest to newest",
|
|
2043
|
+
"items": {
|
|
2044
|
+
"$ref": "#/$defs/Message"
|
|
2045
|
+
}
|
|
2046
|
+
},
|
|
2047
|
+
"next_cursor": {
|
|
2048
|
+
"description": "Continues in the direction of the request: pass it as `before` (older) for the\ndefault, `before` and `around` requests, or as `after` (newer) for `after` requests.\n",
|
|
2049
|
+
"oneOf": [
|
|
2050
|
+
{
|
|
2051
|
+
"$ref": "#/$defs/Id"
|
|
2052
|
+
},
|
|
2053
|
+
{
|
|
2054
|
+
"type": "null"
|
|
2055
|
+
}
|
|
2056
|
+
]
|
|
2057
|
+
},
|
|
2058
|
+
"prev_cursor": {
|
|
2059
|
+
"description": "The opposite direction (`after` for the default request, `before` for an `after` request).",
|
|
2060
|
+
"oneOf": [
|
|
2061
|
+
{
|
|
2062
|
+
"$ref": "#/$defs/Id"
|
|
2063
|
+
},
|
|
1420
2064
|
{
|
|
1421
2065
|
"type": "null"
|
|
1422
2066
|
}
|
|
@@ -1475,7 +2119,8 @@
|
|
|
1475
2119
|
"enum": [
|
|
1476
2120
|
"text",
|
|
1477
2121
|
"file",
|
|
1478
|
-
"voice"
|
|
2122
|
+
"voice",
|
|
2123
|
+
"sticker"
|
|
1479
2124
|
]
|
|
1480
2125
|
},
|
|
1481
2126
|
"content": {
|
|
@@ -1485,8 +2130,12 @@
|
|
|
1485
2130
|
],
|
|
1486
2131
|
"maxLength": 4096
|
|
1487
2132
|
},
|
|
2133
|
+
"sticker_id": {
|
|
2134
|
+
"description": "The sticker of a `sticker` message, from any pack that is not deleted. Sticker messages have no content,\nattachment or drawings; the server sets `content` to the sticker's emoji. Send stickers with this\noperation; the WebSocket `message` event does not take them.\n",
|
|
2135
|
+
"$ref": "#/$defs/Id"
|
|
2136
|
+
},
|
|
1488
2137
|
"attachment_id": {
|
|
1489
|
-
"description": "
|
|
2138
|
+
"description": "Single upload ID for a file or voice message. Omit for albums.",
|
|
1490
2139
|
"oneOf": [
|
|
1491
2140
|
{
|
|
1492
2141
|
"$ref": "#/$defs/AttachmentRef"
|
|
@@ -1496,6 +2145,16 @@
|
|
|
1496
2145
|
}
|
|
1497
2146
|
]
|
|
1498
2147
|
},
|
|
2148
|
+
"attachment_ids": {
|
|
2149
|
+
"type": "array",
|
|
2150
|
+
"description": "Ordered IDs of two to ten image or video uploads for one file message.",
|
|
2151
|
+
"minItems": 2,
|
|
2152
|
+
"maxItems": 10,
|
|
2153
|
+
"uniqueItems": true,
|
|
2154
|
+
"items": {
|
|
2155
|
+
"$ref": "#/$defs/AttachmentRef"
|
|
2156
|
+
}
|
|
2157
|
+
},
|
|
1499
2158
|
"reply_to": {
|
|
1500
2159
|
"oneOf": [
|
|
1501
2160
|
{
|
|
@@ -1505,6 +2164,14 @@
|
|
|
1505
2164
|
"type": "null"
|
|
1506
2165
|
}
|
|
1507
2166
|
]
|
|
2167
|
+
},
|
|
2168
|
+
"drawings": {
|
|
2169
|
+
"type": "array",
|
|
2170
|
+
"description": "Drawings on images of a `file` message, at most one per image. Each `attachment_id` must be one of the\nmessage's attachments. An image with a drawing may also be an image of the message in `reply_to`\ninstead of the sender's own upload: that is how a member draws on an image someone sent.\n",
|
|
2171
|
+
"maxItems": 10,
|
|
2172
|
+
"items": {
|
|
2173
|
+
"$ref": "#/$defs/AttachmentDrawing"
|
|
2174
|
+
}
|
|
1508
2175
|
}
|
|
1509
2176
|
},
|
|
1510
2177
|
"if": {
|
|
@@ -1518,405 +2185,1591 @@
|
|
|
1518
2185
|
}
|
|
1519
2186
|
},
|
|
1520
2187
|
"then": {
|
|
1521
|
-
"required": [
|
|
1522
|
-
"attachment_id"
|
|
1523
|
-
],
|
|
1524
2188
|
"properties": {
|
|
1525
|
-
"
|
|
1526
|
-
"
|
|
2189
|
+
"sticker_id": {
|
|
2190
|
+
"not": {}
|
|
1527
2191
|
}
|
|
1528
|
-
}
|
|
2192
|
+
},
|
|
2193
|
+
"oneOf": [
|
|
2194
|
+
{
|
|
2195
|
+
"required": [
|
|
2196
|
+
"attachment_id"
|
|
2197
|
+
],
|
|
2198
|
+
"properties": {
|
|
2199
|
+
"attachment_id": {
|
|
2200
|
+
"$ref": "#/$defs/AttachmentRef"
|
|
2201
|
+
},
|
|
2202
|
+
"attachment_ids": {
|
|
2203
|
+
"not": {}
|
|
2204
|
+
}
|
|
2205
|
+
}
|
|
2206
|
+
},
|
|
2207
|
+
{
|
|
2208
|
+
"required": [
|
|
2209
|
+
"attachment_ids"
|
|
2210
|
+
],
|
|
2211
|
+
"properties": {
|
|
2212
|
+
"type": {
|
|
2213
|
+
"const": "file"
|
|
2214
|
+
},
|
|
2215
|
+
"attachment_id": {
|
|
2216
|
+
"not": {}
|
|
2217
|
+
},
|
|
2218
|
+
"attachment_ids": {
|
|
2219
|
+
"type": "array"
|
|
2220
|
+
}
|
|
2221
|
+
}
|
|
2222
|
+
}
|
|
2223
|
+
]
|
|
1529
2224
|
},
|
|
1530
2225
|
"else": {
|
|
1531
|
-
"
|
|
1532
|
-
"
|
|
1533
|
-
|
|
1534
|
-
|
|
1535
|
-
|
|
1536
|
-
|
|
1537
|
-
|
|
1538
|
-
|
|
1539
|
-
|
|
1540
|
-
|
|
1541
|
-
|
|
2226
|
+
"if": {
|
|
2227
|
+
"properties": {
|
|
2228
|
+
"type": {
|
|
2229
|
+
"const": "sticker"
|
|
2230
|
+
}
|
|
2231
|
+
}
|
|
2232
|
+
},
|
|
2233
|
+
"then": {
|
|
2234
|
+
"required": [
|
|
2235
|
+
"sticker_id"
|
|
2236
|
+
],
|
|
2237
|
+
"properties": {
|
|
2238
|
+
"sticker_id": {
|
|
2239
|
+
"$ref": "#/$defs/Id"
|
|
2240
|
+
},
|
|
2241
|
+
"content": {
|
|
2242
|
+
"not": {}
|
|
2243
|
+
},
|
|
2244
|
+
"attachment_id": {
|
|
2245
|
+
"not": {}
|
|
2246
|
+
},
|
|
2247
|
+
"attachment_ids": {
|
|
2248
|
+
"not": {}
|
|
2249
|
+
},
|
|
2250
|
+
"drawings": {
|
|
2251
|
+
"not": {}
|
|
2252
|
+
}
|
|
2253
|
+
}
|
|
2254
|
+
},
|
|
2255
|
+
"else": {
|
|
2256
|
+
"required": [
|
|
2257
|
+
"content"
|
|
2258
|
+
],
|
|
2259
|
+
"properties": {
|
|
2260
|
+
"content": {
|
|
2261
|
+
"type": "string",
|
|
2262
|
+
"minLength": 1,
|
|
2263
|
+
"maxLength": 4096
|
|
2264
|
+
},
|
|
2265
|
+
"attachment_id": {
|
|
2266
|
+
"not": {}
|
|
2267
|
+
},
|
|
2268
|
+
"attachment_ids": {
|
|
2269
|
+
"not": {}
|
|
2270
|
+
},
|
|
2271
|
+
"drawings": {
|
|
2272
|
+
"not": {}
|
|
2273
|
+
},
|
|
2274
|
+
"sticker_id": {
|
|
2275
|
+
"not": {}
|
|
2276
|
+
}
|
|
2277
|
+
}
|
|
2278
|
+
}
|
|
2279
|
+
}
|
|
2280
|
+
},
|
|
2281
|
+
"EditMessageRequest": {
|
|
2282
|
+
"type": "object",
|
|
2283
|
+
"required": [
|
|
2284
|
+
"content"
|
|
2285
|
+
],
|
|
2286
|
+
"properties": {
|
|
2287
|
+
"content": {
|
|
2288
|
+
"type": "string",
|
|
2289
|
+
"maxLength": 4096,
|
|
2290
|
+
"description": "New text, or the new caption of a file. Empty removes a file's caption; a text message rejects it."
|
|
2291
|
+
}
|
|
2292
|
+
}
|
|
2293
|
+
},
|
|
2294
|
+
"ForwardMessageRequest": {
|
|
2295
|
+
"type": "object",
|
|
2296
|
+
"required": [
|
|
2297
|
+
"chat_ids"
|
|
2298
|
+
],
|
|
2299
|
+
"properties": {
|
|
2300
|
+
"chat_ids": {
|
|
2301
|
+
"type": "array",
|
|
2302
|
+
"minItems": 1,
|
|
2303
|
+
"maxItems": 20,
|
|
2304
|
+
"uniqueItems": true,
|
|
2305
|
+
"items": {
|
|
2306
|
+
"$ref": "#/$defs/Id"
|
|
2307
|
+
}
|
|
2308
|
+
}
|
|
2309
|
+
}
|
|
2310
|
+
},
|
|
2311
|
+
"ForwardMessagesRequest": {
|
|
2312
|
+
"type": "object",
|
|
2313
|
+
"required": [
|
|
2314
|
+
"message_ids",
|
|
2315
|
+
"chat_ids"
|
|
2316
|
+
],
|
|
2317
|
+
"properties": {
|
|
2318
|
+
"message_ids": {
|
|
2319
|
+
"type": "array",
|
|
2320
|
+
"minItems": 1,
|
|
2321
|
+
"maxItems": 20,
|
|
2322
|
+
"uniqueItems": true,
|
|
2323
|
+
"items": {
|
|
2324
|
+
"$ref": "#/$defs/Id"
|
|
2325
|
+
}
|
|
2326
|
+
},
|
|
2327
|
+
"chat_ids": {
|
|
2328
|
+
"type": "array",
|
|
2329
|
+
"minItems": 1,
|
|
2330
|
+
"maxItems": 20,
|
|
2331
|
+
"uniqueItems": true,
|
|
2332
|
+
"items": {
|
|
2333
|
+
"$ref": "#/$defs/Id"
|
|
2334
|
+
}
|
|
2335
|
+
}
|
|
2336
|
+
}
|
|
2337
|
+
},
|
|
2338
|
+
"DeleteMessagesRequest": {
|
|
2339
|
+
"type": "object",
|
|
2340
|
+
"required": [
|
|
2341
|
+
"message_ids",
|
|
2342
|
+
"scope"
|
|
2343
|
+
],
|
|
2344
|
+
"properties": {
|
|
2345
|
+
"message_ids": {
|
|
2346
|
+
"type": "array",
|
|
2347
|
+
"minItems": 1,
|
|
2348
|
+
"maxItems": 100,
|
|
2349
|
+
"uniqueItems": true,
|
|
2350
|
+
"items": {
|
|
2351
|
+
"$ref": "#/$defs/Id"
|
|
1542
2352
|
}
|
|
2353
|
+
},
|
|
2354
|
+
"scope": {
|
|
2355
|
+
"type": "string",
|
|
2356
|
+
"enum": [
|
|
2357
|
+
"me",
|
|
2358
|
+
"everyone"
|
|
2359
|
+
]
|
|
2360
|
+
}
|
|
2361
|
+
}
|
|
2362
|
+
},
|
|
2363
|
+
"MarkReadRequest": {
|
|
2364
|
+
"type": "object",
|
|
2365
|
+
"required": [
|
|
2366
|
+
"message_id"
|
|
2367
|
+
],
|
|
2368
|
+
"properties": {
|
|
2369
|
+
"message_id": {
|
|
2370
|
+
"description": "Everything up to and including this message is read.",
|
|
2371
|
+
"$ref": "#/$defs/Id"
|
|
2372
|
+
}
|
|
2373
|
+
}
|
|
2374
|
+
},
|
|
2375
|
+
"ChatType": {
|
|
2376
|
+
"type": "string",
|
|
2377
|
+
"enum": [
|
|
2378
|
+
"direct",
|
|
2379
|
+
"group"
|
|
2380
|
+
]
|
|
2381
|
+
},
|
|
2382
|
+
"GroupRole": {
|
|
2383
|
+
"type": "string",
|
|
2384
|
+
"description": "A moderator may delete other members' messages; owners and admins also manage the group.",
|
|
2385
|
+
"enum": [
|
|
2386
|
+
"owner",
|
|
2387
|
+
"admin",
|
|
2388
|
+
"moderator",
|
|
2389
|
+
"member"
|
|
2390
|
+
]
|
|
2391
|
+
},
|
|
2392
|
+
"GroupRoleEvent": {
|
|
2393
|
+
"type": "object",
|
|
2394
|
+
"description": "A member got a new role; `owner` means the actor transferred ownership to them.",
|
|
2395
|
+
"required": [
|
|
2396
|
+
"id",
|
|
2397
|
+
"actor",
|
|
2398
|
+
"target",
|
|
2399
|
+
"role",
|
|
2400
|
+
"created_at"
|
|
2401
|
+
],
|
|
2402
|
+
"properties": {
|
|
2403
|
+
"id": {
|
|
2404
|
+
"$ref": "#/$defs/Id"
|
|
2405
|
+
},
|
|
2406
|
+
"actor": {
|
|
2407
|
+
"description": "`null` when the account is gone.",
|
|
2408
|
+
"oneOf": [
|
|
2409
|
+
{
|
|
2410
|
+
"$ref": "#/$defs/User"
|
|
2411
|
+
},
|
|
2412
|
+
{
|
|
2413
|
+
"type": "null"
|
|
2414
|
+
}
|
|
2415
|
+
]
|
|
2416
|
+
},
|
|
2417
|
+
"target": {
|
|
2418
|
+
"$ref": "#/$defs/User"
|
|
2419
|
+
},
|
|
2420
|
+
"role": {
|
|
2421
|
+
"$ref": "#/$defs/GroupRole"
|
|
2422
|
+
},
|
|
2423
|
+
"created_at": {
|
|
2424
|
+
"$ref": "#/$defs/Timestamp"
|
|
2425
|
+
}
|
|
2426
|
+
}
|
|
2427
|
+
},
|
|
2428
|
+
"GroupRoleLog": {
|
|
2429
|
+
"type": "object",
|
|
2430
|
+
"required": [
|
|
2431
|
+
"items"
|
|
2432
|
+
],
|
|
2433
|
+
"properties": {
|
|
2434
|
+
"items": {
|
|
2435
|
+
"type": "array",
|
|
2436
|
+
"description": "Newest first, at most 100",
|
|
2437
|
+
"items": {
|
|
2438
|
+
"$ref": "#/$defs/GroupRoleEvent"
|
|
2439
|
+
}
|
|
2440
|
+
}
|
|
2441
|
+
}
|
|
2442
|
+
},
|
|
2443
|
+
"Chat": {
|
|
2444
|
+
"type": "object",
|
|
2445
|
+
"required": [
|
|
2446
|
+
"id",
|
|
2447
|
+
"type",
|
|
2448
|
+
"name",
|
|
2449
|
+
"avatar_url",
|
|
2450
|
+
"peer",
|
|
2451
|
+
"is_pinned",
|
|
2452
|
+
"unread_count",
|
|
2453
|
+
"last_message",
|
|
2454
|
+
"created_at"
|
|
2455
|
+
],
|
|
2456
|
+
"properties": {
|
|
2457
|
+
"id": {
|
|
2458
|
+
"$ref": "#/$defs/Id"
|
|
2459
|
+
},
|
|
2460
|
+
"type": {
|
|
2461
|
+
"$ref": "#/$defs/ChatType"
|
|
2462
|
+
},
|
|
2463
|
+
"name": {
|
|
2464
|
+
"type": "string",
|
|
2465
|
+
"description": "Display name of the peer or the group"
|
|
2466
|
+
},
|
|
2467
|
+
"avatar_url": {
|
|
2468
|
+
"type": [
|
|
2469
|
+
"string",
|
|
2470
|
+
"null"
|
|
2471
|
+
]
|
|
2472
|
+
},
|
|
2473
|
+
"peer": {
|
|
2474
|
+
"description": "The other user of a direct chat; `null` for groups.",
|
|
2475
|
+
"oneOf": [
|
|
2476
|
+
{
|
|
2477
|
+
"$ref": "#/$defs/User"
|
|
2478
|
+
},
|
|
2479
|
+
{
|
|
2480
|
+
"type": "null"
|
|
2481
|
+
}
|
|
2482
|
+
]
|
|
2483
|
+
},
|
|
2484
|
+
"is_pinned": {
|
|
2485
|
+
"type": "boolean"
|
|
2486
|
+
},
|
|
2487
|
+
"unread_count": {
|
|
2488
|
+
"type": "integer",
|
|
2489
|
+
"minimum": 0
|
|
2490
|
+
},
|
|
2491
|
+
"last_message": {
|
|
2492
|
+
"oneOf": [
|
|
2493
|
+
{
|
|
2494
|
+
"$ref": "#/$defs/Message"
|
|
2495
|
+
},
|
|
2496
|
+
{
|
|
2497
|
+
"type": "null"
|
|
2498
|
+
}
|
|
2499
|
+
]
|
|
2500
|
+
},
|
|
2501
|
+
"my_role": {
|
|
2502
|
+
"description": "Only for groups.",
|
|
2503
|
+
"oneOf": [
|
|
2504
|
+
{
|
|
2505
|
+
"$ref": "#/$defs/GroupRole"
|
|
2506
|
+
},
|
|
2507
|
+
{
|
|
2508
|
+
"type": "null"
|
|
2509
|
+
}
|
|
2510
|
+
]
|
|
2511
|
+
},
|
|
2512
|
+
"created_at": {
|
|
2513
|
+
"$ref": "#/$defs/Timestamp"
|
|
2514
|
+
}
|
|
2515
|
+
}
|
|
2516
|
+
},
|
|
2517
|
+
"ChatPage": {
|
|
2518
|
+
"type": "object",
|
|
2519
|
+
"required": [
|
|
2520
|
+
"items",
|
|
2521
|
+
"next_cursor"
|
|
2522
|
+
],
|
|
2523
|
+
"properties": {
|
|
2524
|
+
"items": {
|
|
2525
|
+
"type": "array",
|
|
2526
|
+
"items": {
|
|
2527
|
+
"$ref": "#/$defs/Chat"
|
|
2528
|
+
}
|
|
2529
|
+
},
|
|
2530
|
+
"next_cursor": {
|
|
2531
|
+
"$ref": "#/$defs/Cursor"
|
|
2532
|
+
}
|
|
2533
|
+
}
|
|
2534
|
+
},
|
|
2535
|
+
"CreateChatRequest": {
|
|
2536
|
+
"type": "object",
|
|
2537
|
+
"required": [
|
|
2538
|
+
"user_id"
|
|
2539
|
+
],
|
|
2540
|
+
"properties": {
|
|
2541
|
+
"user_id": {
|
|
2542
|
+
"$ref": "#/$defs/Id"
|
|
2543
|
+
},
|
|
2544
|
+
"initial_message": {
|
|
2545
|
+
"type": [
|
|
2546
|
+
"string",
|
|
2547
|
+
"null"
|
|
2548
|
+
],
|
|
2549
|
+
"maxLength": 4096
|
|
2550
|
+
}
|
|
2551
|
+
}
|
|
2552
|
+
},
|
|
2553
|
+
"GroupMember": {
|
|
2554
|
+
"type": "object",
|
|
2555
|
+
"required": [
|
|
2556
|
+
"user",
|
|
2557
|
+
"role",
|
|
2558
|
+
"joined_at"
|
|
2559
|
+
],
|
|
2560
|
+
"properties": {
|
|
2561
|
+
"user": {
|
|
2562
|
+
"$ref": "#/$defs/User"
|
|
2563
|
+
},
|
|
2564
|
+
"role": {
|
|
2565
|
+
"$ref": "#/$defs/GroupRole"
|
|
2566
|
+
},
|
|
2567
|
+
"joined_at": {
|
|
2568
|
+
"$ref": "#/$defs/Timestamp"
|
|
2569
|
+
}
|
|
2570
|
+
}
|
|
2571
|
+
},
|
|
2572
|
+
"Group": {
|
|
2573
|
+
"type": "object",
|
|
2574
|
+
"required": [
|
|
2575
|
+
"id",
|
|
2576
|
+
"name",
|
|
2577
|
+
"description",
|
|
2578
|
+
"avatar_url",
|
|
2579
|
+
"owner_id",
|
|
2580
|
+
"my_role",
|
|
2581
|
+
"members",
|
|
2582
|
+
"created_at"
|
|
2583
|
+
],
|
|
2584
|
+
"properties": {
|
|
2585
|
+
"id": {
|
|
2586
|
+
"$ref": "#/$defs/Id"
|
|
2587
|
+
},
|
|
2588
|
+
"name": {
|
|
2589
|
+
"type": "string",
|
|
2590
|
+
"minLength": 1,
|
|
2591
|
+
"maxLength": 64
|
|
2592
|
+
},
|
|
2593
|
+
"description": {
|
|
2594
|
+
"type": [
|
|
2595
|
+
"string",
|
|
2596
|
+
"null"
|
|
2597
|
+
],
|
|
2598
|
+
"maxLength": 500
|
|
2599
|
+
},
|
|
2600
|
+
"avatar_url": {
|
|
2601
|
+
"type": [
|
|
2602
|
+
"string",
|
|
2603
|
+
"null"
|
|
2604
|
+
]
|
|
2605
|
+
},
|
|
2606
|
+
"owner_id": {
|
|
2607
|
+
"$ref": "#/$defs/Id"
|
|
2608
|
+
},
|
|
2609
|
+
"my_role": {
|
|
2610
|
+
"$ref": "#/$defs/GroupRole"
|
|
2611
|
+
},
|
|
2612
|
+
"members": {
|
|
2613
|
+
"type": "array",
|
|
2614
|
+
"items": {
|
|
2615
|
+
"$ref": "#/$defs/GroupMember"
|
|
2616
|
+
}
|
|
2617
|
+
},
|
|
2618
|
+
"created_at": {
|
|
2619
|
+
"$ref": "#/$defs/Timestamp"
|
|
2620
|
+
}
|
|
2621
|
+
}
|
|
2622
|
+
},
|
|
2623
|
+
"CreateGroupRequest": {
|
|
2624
|
+
"type": "object",
|
|
2625
|
+
"required": [
|
|
2626
|
+
"name",
|
|
2627
|
+
"member_ids"
|
|
2628
|
+
],
|
|
2629
|
+
"properties": {
|
|
2630
|
+
"name": {
|
|
2631
|
+
"type": "string",
|
|
2632
|
+
"minLength": 1,
|
|
2633
|
+
"maxLength": 64
|
|
2634
|
+
},
|
|
2635
|
+
"description": {
|
|
2636
|
+
"type": [
|
|
2637
|
+
"string",
|
|
2638
|
+
"null"
|
|
2639
|
+
],
|
|
2640
|
+
"maxLength": 500
|
|
2641
|
+
},
|
|
2642
|
+
"member_ids": {
|
|
2643
|
+
"type": "array",
|
|
2644
|
+
"maxItems": 200,
|
|
2645
|
+
"uniqueItems": true,
|
|
2646
|
+
"items": {
|
|
2647
|
+
"$ref": "#/$defs/Id"
|
|
2648
|
+
}
|
|
2649
|
+
}
|
|
2650
|
+
}
|
|
2651
|
+
},
|
|
2652
|
+
"UpdateGroupRequest": {
|
|
2653
|
+
"type": "object",
|
|
2654
|
+
"minProperties": 1,
|
|
2655
|
+
"properties": {
|
|
2656
|
+
"name": {
|
|
2657
|
+
"type": "string",
|
|
2658
|
+
"minLength": 1,
|
|
2659
|
+
"maxLength": 64
|
|
2660
|
+
},
|
|
2661
|
+
"description": {
|
|
2662
|
+
"type": [
|
|
2663
|
+
"string",
|
|
2664
|
+
"null"
|
|
2665
|
+
],
|
|
2666
|
+
"maxLength": 500
|
|
2667
|
+
}
|
|
2668
|
+
}
|
|
2669
|
+
},
|
|
2670
|
+
"AddParticipantRequest": {
|
|
2671
|
+
"type": "object",
|
|
2672
|
+
"required": [
|
|
2673
|
+
"user_id"
|
|
2674
|
+
],
|
|
2675
|
+
"properties": {
|
|
2676
|
+
"user_id": {
|
|
2677
|
+
"$ref": "#/$defs/Id"
|
|
2678
|
+
}
|
|
2679
|
+
}
|
|
2680
|
+
},
|
|
2681
|
+
"UpdateRoleRequest": {
|
|
2682
|
+
"type": "object",
|
|
2683
|
+
"required": [
|
|
2684
|
+
"role"
|
|
2685
|
+
],
|
|
2686
|
+
"properties": {
|
|
2687
|
+
"role": {
|
|
2688
|
+
"type": "string",
|
|
2689
|
+
"enum": [
|
|
2690
|
+
"admin",
|
|
2691
|
+
"moderator",
|
|
2692
|
+
"member"
|
|
2693
|
+
]
|
|
2694
|
+
}
|
|
2695
|
+
}
|
|
2696
|
+
},
|
|
2697
|
+
"TransferOwnerRequest": {
|
|
2698
|
+
"type": "object",
|
|
2699
|
+
"required": [
|
|
2700
|
+
"user_id"
|
|
2701
|
+
],
|
|
2702
|
+
"properties": {
|
|
2703
|
+
"user_id": {
|
|
2704
|
+
"$ref": "#/$defs/Id"
|
|
2705
|
+
}
|
|
2706
|
+
}
|
|
2707
|
+
},
|
|
2708
|
+
"ApprovalRequestType": {
|
|
2709
|
+
"type": "string",
|
|
2710
|
+
"enum": [
|
|
2711
|
+
"direct_message",
|
|
2712
|
+
"group_invite"
|
|
2713
|
+
]
|
|
2714
|
+
},
|
|
2715
|
+
"ApprovalRequestStatus": {
|
|
2716
|
+
"type": "string",
|
|
2717
|
+
"enum": [
|
|
2718
|
+
"pending",
|
|
2719
|
+
"approved",
|
|
2720
|
+
"rejected"
|
|
2721
|
+
]
|
|
2722
|
+
},
|
|
2723
|
+
"ApprovalRequest": {
|
|
2724
|
+
"type": "object",
|
|
2725
|
+
"required": [
|
|
2726
|
+
"id",
|
|
2727
|
+
"type",
|
|
2728
|
+
"status",
|
|
2729
|
+
"requester",
|
|
2730
|
+
"created_at"
|
|
2731
|
+
],
|
|
2732
|
+
"properties": {
|
|
2733
|
+
"id": {
|
|
2734
|
+
"$ref": "#/$defs/Id"
|
|
2735
|
+
},
|
|
2736
|
+
"type": {
|
|
2737
|
+
"$ref": "#/$defs/ApprovalRequestType"
|
|
2738
|
+
},
|
|
2739
|
+
"status": {
|
|
2740
|
+
"$ref": "#/$defs/ApprovalRequestStatus"
|
|
2741
|
+
},
|
|
2742
|
+
"requester": {
|
|
2743
|
+
"$ref": "#/$defs/User"
|
|
2744
|
+
},
|
|
2745
|
+
"group_name": {
|
|
2746
|
+
"type": [
|
|
2747
|
+
"string",
|
|
2748
|
+
"null"
|
|
2749
|
+
],
|
|
2750
|
+
"description": "Only for `group_invite`"
|
|
2751
|
+
},
|
|
2752
|
+
"preview": {
|
|
2753
|
+
"type": [
|
|
2754
|
+
"string",
|
|
2755
|
+
"null"
|
|
2756
|
+
],
|
|
2757
|
+
"description": "First message of a direct-message request"
|
|
2758
|
+
},
|
|
2759
|
+
"created_at": {
|
|
2760
|
+
"$ref": "#/$defs/Timestamp"
|
|
2761
|
+
}
|
|
2762
|
+
}
|
|
2763
|
+
},
|
|
2764
|
+
"DeviceRecoveryStart": {
|
|
2765
|
+
"type": "object",
|
|
2766
|
+
"required": [
|
|
2767
|
+
"username"
|
|
2768
|
+
],
|
|
2769
|
+
"properties": {
|
|
2770
|
+
"username": {
|
|
2771
|
+
"$ref": "#/$defs/Username"
|
|
2772
|
+
}
|
|
2773
|
+
}
|
|
2774
|
+
},
|
|
2775
|
+
"DeviceRecoveryResult": {
|
|
2776
|
+
"type": "object",
|
|
2777
|
+
"required": [
|
|
2778
|
+
"request_id",
|
|
2779
|
+
"match_number",
|
|
2780
|
+
"expires_at"
|
|
2781
|
+
],
|
|
2782
|
+
"properties": {
|
|
2783
|
+
"request_id": {
|
|
2784
|
+
"type": "string",
|
|
2785
|
+
"minLength": 32,
|
|
2786
|
+
"maxLength": 128,
|
|
2787
|
+
"pattern": "^[A-Za-z0-9_-]+$"
|
|
2788
|
+
},
|
|
2789
|
+
"match_number": {
|
|
2790
|
+
"type": "integer",
|
|
2791
|
+
"minimum": 10,
|
|
2792
|
+
"maximum": 99
|
|
2793
|
+
},
|
|
2794
|
+
"expires_at": {
|
|
2795
|
+
"type": "string",
|
|
2796
|
+
"format": "date-time"
|
|
2797
|
+
}
|
|
2798
|
+
}
|
|
2799
|
+
},
|
|
2800
|
+
"DeviceRecoveryStatus": {
|
|
2801
|
+
"type": "object",
|
|
2802
|
+
"required": [
|
|
2803
|
+
"status"
|
|
2804
|
+
],
|
|
2805
|
+
"properties": {
|
|
2806
|
+
"status": {
|
|
2807
|
+
"type": "string",
|
|
2808
|
+
"enum": [
|
|
2809
|
+
"pending",
|
|
2810
|
+
"approved",
|
|
2811
|
+
"denied",
|
|
2812
|
+
"used",
|
|
2813
|
+
"expired"
|
|
2814
|
+
]
|
|
2815
|
+
}
|
|
2816
|
+
}
|
|
2817
|
+
},
|
|
2818
|
+
"DeviceRecoveryApproval": {
|
|
2819
|
+
"type": "object",
|
|
2820
|
+
"required": [
|
|
2821
|
+
"match_number"
|
|
2822
|
+
],
|
|
2823
|
+
"properties": {
|
|
2824
|
+
"match_number": {
|
|
2825
|
+
"type": "integer",
|
|
2826
|
+
"minimum": 10,
|
|
2827
|
+
"maximum": 99
|
|
2828
|
+
},
|
|
2829
|
+
"passkey": {
|
|
2830
|
+
"$ref": "#/$defs/PasskeyVerification"
|
|
2831
|
+
},
|
|
2832
|
+
"code": {
|
|
2833
|
+
"type": "string",
|
|
2834
|
+
"maxLength": 128
|
|
2835
|
+
},
|
|
2836
|
+
"password": {
|
|
2837
|
+
"type": "string",
|
|
2838
|
+
"maxLength": 1024,
|
|
2839
|
+
"deprecated": true,
|
|
2840
|
+
"description": "Ignored. Older clients still send it."
|
|
2841
|
+
}
|
|
2842
|
+
}
|
|
2843
|
+
},
|
|
2844
|
+
"DeviceRecoveryApprovalOptions": {
|
|
2845
|
+
"type": "object",
|
|
2846
|
+
"required": [
|
|
2847
|
+
"method"
|
|
2848
|
+
],
|
|
2849
|
+
"properties": {
|
|
2850
|
+
"method": {
|
|
2851
|
+
"type": "string",
|
|
2852
|
+
"enum": [
|
|
2853
|
+
"passkey",
|
|
2854
|
+
"session"
|
|
2855
|
+
]
|
|
2856
|
+
},
|
|
2857
|
+
"challenge_id": {
|
|
2858
|
+
"type": "string",
|
|
2859
|
+
"minLength": 32,
|
|
2860
|
+
"maxLength": 128,
|
|
2861
|
+
"description": "Present with `method: passkey`."
|
|
2862
|
+
},
|
|
2863
|
+
"public_key": {
|
|
2864
|
+
"type": "object",
|
|
2865
|
+
"additionalProperties": true,
|
|
2866
|
+
"description": "WebAuthn request options, present with `method: passkey`."
|
|
2867
|
+
},
|
|
2868
|
+
"approvable_from": {
|
|
2869
|
+
"type": "string",
|
|
2870
|
+
"format": "date-time",
|
|
2871
|
+
"description": "Present with `method: session` while the session is too new to approve."
|
|
2872
|
+
}
|
|
2873
|
+
}
|
|
2874
|
+
},
|
|
2875
|
+
"DeviceRecoveryComplete": {
|
|
2876
|
+
"type": "object",
|
|
2877
|
+
"required": [
|
|
2878
|
+
"new_password"
|
|
2879
|
+
],
|
|
2880
|
+
"properties": {
|
|
2881
|
+
"new_password": {
|
|
2882
|
+
"type": "string",
|
|
2883
|
+
"minLength": 8,
|
|
2884
|
+
"maxLength": 128,
|
|
2885
|
+
"writeOnly": true
|
|
2886
|
+
}
|
|
2887
|
+
}
|
|
2888
|
+
},
|
|
2889
|
+
"QrLoginStatus": {
|
|
2890
|
+
"type": "string",
|
|
2891
|
+
"description": "`pending` until a signed-in device opens the request, `scanned` once it did, then `approved` or `denied`.\n`expired` when the request timed out or was used (only in poll answers).\n",
|
|
2892
|
+
"enum": [
|
|
2893
|
+
"pending",
|
|
2894
|
+
"scanned",
|
|
2895
|
+
"approved",
|
|
2896
|
+
"denied",
|
|
2897
|
+
"expired"
|
|
2898
|
+
]
|
|
2899
|
+
},
|
|
2900
|
+
"QrLoginStart": {
|
|
2901
|
+
"type": "object",
|
|
2902
|
+
"required": [
|
|
2903
|
+
"request_id",
|
|
2904
|
+
"poll_token",
|
|
2905
|
+
"url",
|
|
2906
|
+
"expires_at"
|
|
2907
|
+
],
|
|
2908
|
+
"properties": {
|
|
2909
|
+
"request_id": {
|
|
2910
|
+
"type": "string",
|
|
2911
|
+
"minLength": 32,
|
|
2912
|
+
"maxLength": 128,
|
|
2913
|
+
"pattern": "^[A-Za-z0-9_-]+$"
|
|
2914
|
+
},
|
|
2915
|
+
"poll_token": {
|
|
2916
|
+
"type": "string",
|
|
2917
|
+
"minLength": 32,
|
|
2918
|
+
"maxLength": 128,
|
|
2919
|
+
"pattern": "^[A-Za-z0-9_-]+$",
|
|
2920
|
+
"description": "Secret of the requesting device; only a keyed hash is stored."
|
|
2921
|
+
},
|
|
2922
|
+
"url": {
|
|
2923
|
+
"type": "string",
|
|
2924
|
+
"description": "`<RECOVERY_WEB_URL>/qr/<request_id>`, the content of the QR code."
|
|
2925
|
+
},
|
|
2926
|
+
"expires_at": {
|
|
2927
|
+
"$ref": "#/$defs/Timestamp"
|
|
2928
|
+
}
|
|
2929
|
+
}
|
|
2930
|
+
},
|
|
2931
|
+
"QrLoginRequest": {
|
|
2932
|
+
"type": "object",
|
|
2933
|
+
"required": [
|
|
2934
|
+
"request_id",
|
|
2935
|
+
"status",
|
|
2936
|
+
"device",
|
|
2937
|
+
"location",
|
|
2938
|
+
"created_at",
|
|
2939
|
+
"expires_at"
|
|
2940
|
+
],
|
|
2941
|
+
"properties": {
|
|
2942
|
+
"request_id": {
|
|
2943
|
+
"type": "string"
|
|
2944
|
+
},
|
|
2945
|
+
"status": {
|
|
2946
|
+
"$ref": "#/$defs/QrLoginStatus"
|
|
2947
|
+
},
|
|
2948
|
+
"device": {
|
|
2949
|
+
"type": [
|
|
2950
|
+
"string",
|
|
2951
|
+
"null"
|
|
2952
|
+
],
|
|
2953
|
+
"maxLength": 512,
|
|
2954
|
+
"description": "User agent of the device that asks to sign in; `null` when it sent none."
|
|
2955
|
+
},
|
|
2956
|
+
"location": {
|
|
2957
|
+
"description": "Approximate location of the device that asks to sign in; `null` when unknown.",
|
|
2958
|
+
"oneOf": [
|
|
2959
|
+
{
|
|
2960
|
+
"$ref": "#/$defs/Location"
|
|
2961
|
+
},
|
|
2962
|
+
{
|
|
2963
|
+
"type": "null"
|
|
2964
|
+
}
|
|
2965
|
+
]
|
|
2966
|
+
},
|
|
2967
|
+
"created_at": {
|
|
2968
|
+
"$ref": "#/$defs/Timestamp"
|
|
2969
|
+
},
|
|
2970
|
+
"expires_at": {
|
|
2971
|
+
"$ref": "#/$defs/Timestamp"
|
|
2972
|
+
}
|
|
2973
|
+
}
|
|
2974
|
+
},
|
|
2975
|
+
"QrLoginPollRequest": {
|
|
2976
|
+
"type": "object",
|
|
2977
|
+
"required": [
|
|
2978
|
+
"poll_token"
|
|
2979
|
+
],
|
|
2980
|
+
"properties": {
|
|
2981
|
+
"poll_token": {
|
|
2982
|
+
"type": "string",
|
|
2983
|
+
"maxLength": 128,
|
|
2984
|
+
"writeOnly": true
|
|
2985
|
+
}
|
|
2986
|
+
}
|
|
2987
|
+
},
|
|
2988
|
+
"QrLoginPollResult": {
|
|
2989
|
+
"oneOf": [
|
|
2990
|
+
{
|
|
2991
|
+
"type": "object",
|
|
2992
|
+
"required": [
|
|
2993
|
+
"status"
|
|
2994
|
+
],
|
|
2995
|
+
"properties": {
|
|
2996
|
+
"status": {
|
|
2997
|
+
"type": "string",
|
|
2998
|
+
"enum": [
|
|
2999
|
+
"pending",
|
|
3000
|
+
"scanned",
|
|
3001
|
+
"denied",
|
|
3002
|
+
"expired"
|
|
3003
|
+
]
|
|
3004
|
+
}
|
|
3005
|
+
}
|
|
3006
|
+
},
|
|
3007
|
+
{
|
|
3008
|
+
"allOf": [
|
|
3009
|
+
{
|
|
3010
|
+
"$ref": "#/$defs/TokenResponse"
|
|
3011
|
+
},
|
|
3012
|
+
{
|
|
3013
|
+
"type": "object",
|
|
3014
|
+
"required": [
|
|
3015
|
+
"status"
|
|
3016
|
+
],
|
|
3017
|
+
"properties": {
|
|
3018
|
+
"status": {
|
|
3019
|
+
"type": "string",
|
|
3020
|
+
"const": "approved"
|
|
3021
|
+
}
|
|
3022
|
+
}
|
|
3023
|
+
}
|
|
3024
|
+
]
|
|
3025
|
+
}
|
|
3026
|
+
]
|
|
3027
|
+
},
|
|
3028
|
+
"QrLoginApproval": {
|
|
3029
|
+
"type": "object",
|
|
3030
|
+
"properties": {
|
|
3031
|
+
"code": {
|
|
3032
|
+
"type": "string",
|
|
3033
|
+
"maxLength": 128,
|
|
3034
|
+
"description": "An authenticator code or an unused recovery code; required when two-factor is on."
|
|
3035
|
+
}
|
|
3036
|
+
}
|
|
3037
|
+
},
|
|
3038
|
+
"PasskeyOptions": {
|
|
3039
|
+
"type": "object",
|
|
3040
|
+
"required": [
|
|
3041
|
+
"challenge_id",
|
|
3042
|
+
"public_key"
|
|
3043
|
+
],
|
|
3044
|
+
"properties": {
|
|
3045
|
+
"challenge_id": {
|
|
3046
|
+
"type": "string",
|
|
3047
|
+
"minLength": 32,
|
|
3048
|
+
"maxLength": 128
|
|
3049
|
+
},
|
|
3050
|
+
"public_key": {
|
|
3051
|
+
"type": "object",
|
|
3052
|
+
"additionalProperties": true
|
|
3053
|
+
}
|
|
3054
|
+
}
|
|
3055
|
+
},
|
|
3056
|
+
"PasskeyRegistration": {
|
|
3057
|
+
"type": "object",
|
|
3058
|
+
"required": [
|
|
3059
|
+
"password",
|
|
3060
|
+
"name"
|
|
3061
|
+
],
|
|
3062
|
+
"properties": {
|
|
3063
|
+
"password": {
|
|
3064
|
+
"type": "string",
|
|
3065
|
+
"maxLength": 128,
|
|
3066
|
+
"writeOnly": true
|
|
3067
|
+
},
|
|
3068
|
+
"code": {
|
|
3069
|
+
"type": "string",
|
|
3070
|
+
"maxLength": 128
|
|
3071
|
+
},
|
|
3072
|
+
"name": {
|
|
3073
|
+
"type": "string",
|
|
3074
|
+
"minLength": 1,
|
|
3075
|
+
"maxLength": 64
|
|
3076
|
+
}
|
|
3077
|
+
}
|
|
3078
|
+
},
|
|
3079
|
+
"PasskeyVerification": {
|
|
3080
|
+
"type": "object",
|
|
3081
|
+
"required": [
|
|
3082
|
+
"challenge_id",
|
|
3083
|
+
"credential"
|
|
3084
|
+
],
|
|
3085
|
+
"properties": {
|
|
3086
|
+
"challenge_id": {
|
|
3087
|
+
"type": "string",
|
|
3088
|
+
"minLength": 32,
|
|
3089
|
+
"maxLength": 128
|
|
3090
|
+
},
|
|
3091
|
+
"credential": {
|
|
3092
|
+
"type": "object",
|
|
3093
|
+
"additionalProperties": true
|
|
3094
|
+
}
|
|
3095
|
+
}
|
|
3096
|
+
},
|
|
3097
|
+
"PasskeyLoginOptions": {
|
|
3098
|
+
"type": "object",
|
|
3099
|
+
"required": [],
|
|
3100
|
+
"properties": {
|
|
3101
|
+
"username": {
|
|
3102
|
+
"$ref": "#/$defs/Username"
|
|
3103
|
+
}
|
|
3104
|
+
}
|
|
3105
|
+
},
|
|
3106
|
+
"PasskeyRename": {
|
|
3107
|
+
"type": "object",
|
|
3108
|
+
"required": [
|
|
3109
|
+
"name"
|
|
3110
|
+
],
|
|
3111
|
+
"properties": {
|
|
3112
|
+
"name": {
|
|
3113
|
+
"type": "string",
|
|
3114
|
+
"minLength": 1,
|
|
3115
|
+
"maxLength": 64
|
|
3116
|
+
}
|
|
3117
|
+
}
|
|
3118
|
+
},
|
|
3119
|
+
"PasskeyRemoval": {
|
|
3120
|
+
"type": "object",
|
|
3121
|
+
"required": [],
|
|
3122
|
+
"properties": {
|
|
3123
|
+
"password": {
|
|
3124
|
+
"type": "string",
|
|
3125
|
+
"maxLength": 128,
|
|
3126
|
+
"writeOnly": true
|
|
3127
|
+
}
|
|
3128
|
+
}
|
|
3129
|
+
},
|
|
3130
|
+
"Passkey": {
|
|
3131
|
+
"type": "object",
|
|
3132
|
+
"required": [
|
|
3133
|
+
"id",
|
|
3134
|
+
"name",
|
|
3135
|
+
"created_at",
|
|
3136
|
+
"last_used_at"
|
|
3137
|
+
],
|
|
3138
|
+
"properties": {
|
|
3139
|
+
"id": {
|
|
3140
|
+
"type": "string"
|
|
3141
|
+
},
|
|
3142
|
+
"name": {
|
|
3143
|
+
"type": "string",
|
|
3144
|
+
"minLength": 1,
|
|
3145
|
+
"maxLength": 64
|
|
3146
|
+
},
|
|
3147
|
+
"created_at": {
|
|
3148
|
+
"type": "string",
|
|
3149
|
+
"format": "date-time"
|
|
3150
|
+
},
|
|
3151
|
+
"last_used_at": {
|
|
3152
|
+
"type": [
|
|
3153
|
+
"string",
|
|
3154
|
+
"null"
|
|
3155
|
+
],
|
|
3156
|
+
"format": "date-time"
|
|
3157
|
+
}
|
|
3158
|
+
}
|
|
3159
|
+
},
|
|
3160
|
+
"PasskeyPage": {
|
|
3161
|
+
"type": "object",
|
|
3162
|
+
"required": [
|
|
3163
|
+
"items"
|
|
3164
|
+
],
|
|
3165
|
+
"properties": {
|
|
3166
|
+
"items": {
|
|
3167
|
+
"type": "array",
|
|
3168
|
+
"items": {
|
|
3169
|
+
"$ref": "#/$defs/Passkey"
|
|
3170
|
+
}
|
|
3171
|
+
}
|
|
3172
|
+
}
|
|
3173
|
+
},
|
|
3174
|
+
"RecoveryEmailStatus": {
|
|
3175
|
+
"type": "object",
|
|
3176
|
+
"required": [
|
|
3177
|
+
"address",
|
|
3178
|
+
"state",
|
|
3179
|
+
"enabled"
|
|
3180
|
+
],
|
|
3181
|
+
"properties": {
|
|
3182
|
+
"address": {
|
|
3183
|
+
"type": "string"
|
|
3184
|
+
},
|
|
3185
|
+
"state": {
|
|
3186
|
+
"type": "string",
|
|
3187
|
+
"enum": [
|
|
3188
|
+
"not_added",
|
|
3189
|
+
"pending",
|
|
3190
|
+
"verified"
|
|
3191
|
+
]
|
|
3192
|
+
},
|
|
3193
|
+
"enabled": {
|
|
3194
|
+
"type": "boolean"
|
|
3195
|
+
}
|
|
3196
|
+
}
|
|
3197
|
+
},
|
|
3198
|
+
"RecoveryOverview": {
|
|
3199
|
+
"type": "object",
|
|
3200
|
+
"required": [
|
|
3201
|
+
"recovery_key",
|
|
3202
|
+
"other_devices",
|
|
3203
|
+
"passkeys",
|
|
3204
|
+
"passkeys_enabled",
|
|
3205
|
+
"email"
|
|
3206
|
+
],
|
|
3207
|
+
"properties": {
|
|
3208
|
+
"recovery_key": {
|
|
3209
|
+
"$ref": "#/$defs/RecoveryKeyStatus"
|
|
3210
|
+
},
|
|
3211
|
+
"other_devices": {
|
|
3212
|
+
"type": "integer",
|
|
3213
|
+
"minimum": 0
|
|
3214
|
+
},
|
|
3215
|
+
"passkeys": {
|
|
3216
|
+
"type": "integer",
|
|
3217
|
+
"minimum": 0
|
|
3218
|
+
},
|
|
3219
|
+
"passkeys_enabled": {
|
|
3220
|
+
"type": "boolean"
|
|
3221
|
+
},
|
|
3222
|
+
"email": {
|
|
3223
|
+
"$ref": "#/$defs/RecoveryEmailStatus"
|
|
3224
|
+
}
|
|
3225
|
+
}
|
|
3226
|
+
},
|
|
3227
|
+
"SetRecoveryEmail": {
|
|
3228
|
+
"type": "object",
|
|
3229
|
+
"required": [
|
|
3230
|
+
"email",
|
|
3231
|
+
"password"
|
|
3232
|
+
],
|
|
3233
|
+
"properties": {
|
|
3234
|
+
"email": {
|
|
3235
|
+
"type": "string",
|
|
3236
|
+
"format": "email",
|
|
3237
|
+
"maxLength": 254
|
|
3238
|
+
},
|
|
3239
|
+
"password": {
|
|
3240
|
+
"type": "string",
|
|
3241
|
+
"minLength": 8,
|
|
3242
|
+
"maxLength": 128,
|
|
3243
|
+
"writeOnly": true
|
|
3244
|
+
},
|
|
3245
|
+
"code": {
|
|
3246
|
+
"type": "string",
|
|
3247
|
+
"maxLength": 128
|
|
3248
|
+
}
|
|
3249
|
+
}
|
|
3250
|
+
},
|
|
3251
|
+
"RemoveRecoveryEmail": {
|
|
3252
|
+
"type": "object",
|
|
3253
|
+
"required": [
|
|
3254
|
+
"password"
|
|
3255
|
+
],
|
|
3256
|
+
"properties": {
|
|
3257
|
+
"password": {
|
|
3258
|
+
"type": "string",
|
|
3259
|
+
"minLength": 8,
|
|
3260
|
+
"maxLength": 128,
|
|
3261
|
+
"writeOnly": true
|
|
3262
|
+
},
|
|
3263
|
+
"code": {
|
|
3264
|
+
"type": "string",
|
|
3265
|
+
"maxLength": 128
|
|
3266
|
+
}
|
|
3267
|
+
}
|
|
3268
|
+
},
|
|
3269
|
+
"VerifyRecoveryEmail": {
|
|
3270
|
+
"type": "object",
|
|
3271
|
+
"required": [
|
|
3272
|
+
"token"
|
|
3273
|
+
],
|
|
3274
|
+
"properties": {
|
|
3275
|
+
"token": {
|
|
3276
|
+
"type": "string",
|
|
3277
|
+
"minLength": 32,
|
|
3278
|
+
"maxLength": 128
|
|
3279
|
+
}
|
|
3280
|
+
}
|
|
3281
|
+
},
|
|
3282
|
+
"EmailResetRequest": {
|
|
3283
|
+
"type": "object",
|
|
3284
|
+
"required": [
|
|
3285
|
+
"username_or_email"
|
|
3286
|
+
],
|
|
3287
|
+
"properties": {
|
|
3288
|
+
"username_or_email": {
|
|
3289
|
+
"type": "string",
|
|
3290
|
+
"maxLength": 254
|
|
3291
|
+
}
|
|
3292
|
+
}
|
|
3293
|
+
},
|
|
3294
|
+
"EmailResetConfirmation": {
|
|
3295
|
+
"type": "object",
|
|
3296
|
+
"required": [
|
|
3297
|
+
"token",
|
|
3298
|
+
"new_password"
|
|
3299
|
+
],
|
|
3300
|
+
"properties": {
|
|
3301
|
+
"token": {
|
|
3302
|
+
"type": "string",
|
|
3303
|
+
"minLength": 32,
|
|
3304
|
+
"maxLength": 128
|
|
3305
|
+
},
|
|
3306
|
+
"new_password": {
|
|
3307
|
+
"type": "string",
|
|
3308
|
+
"minLength": 8,
|
|
3309
|
+
"maxLength": 128,
|
|
3310
|
+
"writeOnly": true
|
|
3311
|
+
},
|
|
3312
|
+
"code": {
|
|
3313
|
+
"type": "string",
|
|
3314
|
+
"maxLength": 128
|
|
1543
3315
|
}
|
|
1544
3316
|
}
|
|
1545
3317
|
},
|
|
1546
|
-
"
|
|
3318
|
+
"EmailResetAccepted": {
|
|
1547
3319
|
"type": "object",
|
|
1548
3320
|
"required": [
|
|
1549
|
-
"
|
|
3321
|
+
"message"
|
|
1550
3322
|
],
|
|
1551
3323
|
"properties": {
|
|
1552
|
-
"
|
|
1553
|
-
"type": "string"
|
|
1554
|
-
"minLength": 1,
|
|
1555
|
-
"maxLength": 4096
|
|
3324
|
+
"message": {
|
|
3325
|
+
"type": "string"
|
|
1556
3326
|
}
|
|
1557
3327
|
}
|
|
1558
3328
|
},
|
|
1559
|
-
"
|
|
3329
|
+
"CallConfig": {
|
|
1560
3330
|
"type": "object",
|
|
1561
3331
|
"required": [
|
|
1562
|
-
"
|
|
3332
|
+
"enabled",
|
|
3333
|
+
"max_participants",
|
|
3334
|
+
"ring_timeout_seconds"
|
|
1563
3335
|
],
|
|
1564
3336
|
"properties": {
|
|
1565
|
-
"
|
|
1566
|
-
"type": "
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
"
|
|
1570
|
-
"
|
|
1571
|
-
|
|
1572
|
-
|
|
3337
|
+
"enabled": {
|
|
3338
|
+
"type": "boolean"
|
|
3339
|
+
},
|
|
3340
|
+
"max_participants": {
|
|
3341
|
+
"type": "integer",
|
|
3342
|
+
"minimum": 2,
|
|
3343
|
+
"description": "Most sessions joined to one call at the same time."
|
|
3344
|
+
},
|
|
3345
|
+
"ring_timeout_seconds": {
|
|
3346
|
+
"type": "integer",
|
|
3347
|
+
"minimum": 1,
|
|
3348
|
+
"description": "How long an invitation rings before it counts as missed."
|
|
1573
3349
|
}
|
|
1574
3350
|
}
|
|
1575
3351
|
},
|
|
1576
|
-
"
|
|
3352
|
+
"CallIdentityRequest": {
|
|
1577
3353
|
"type": "object",
|
|
1578
3354
|
"required": [
|
|
1579
|
-
"
|
|
3355
|
+
"public_key"
|
|
1580
3356
|
],
|
|
1581
3357
|
"properties": {
|
|
1582
|
-
"
|
|
1583
|
-
"
|
|
1584
|
-
"$ref": "#/$defs/Id"
|
|
3358
|
+
"public_key": {
|
|
3359
|
+
"$ref": "#/$defs/CallIdentityKey"
|
|
1585
3360
|
}
|
|
1586
3361
|
}
|
|
1587
3362
|
},
|
|
1588
|
-
"
|
|
3363
|
+
"CallIdentityKey": {
|
|
3364
|
+
"type": "string",
|
|
3365
|
+
"description": "P-256 public key as an uncompressed point (65 bytes, first byte `0x04`), base64url without padding.\n",
|
|
3366
|
+
"minLength": 87,
|
|
3367
|
+
"maxLength": 87,
|
|
3368
|
+
"pattern": "^[A-Za-z0-9_-]+$"
|
|
3369
|
+
},
|
|
3370
|
+
"CallState": {
|
|
1589
3371
|
"type": "string",
|
|
3372
|
+
"description": "`ringing` until someone answers, `active` while people are in it, `ended` afterwards.",
|
|
1590
3373
|
"enum": [
|
|
1591
|
-
"
|
|
1592
|
-
"
|
|
3374
|
+
"ringing",
|
|
3375
|
+
"active",
|
|
3376
|
+
"ended"
|
|
1593
3377
|
]
|
|
1594
3378
|
},
|
|
1595
|
-
"
|
|
3379
|
+
"CallEndReason": {
|
|
1596
3380
|
"type": "string",
|
|
3381
|
+
"description": "Why the call ended: `completed` (people talked), `missed` (nobody answered in time), `declined` (the peer of a\ndirect call declined), `cancelled` (the caller hung up before an answer), `failed` (the media service lost\nthe call).\n",
|
|
1597
3382
|
"enum": [
|
|
1598
|
-
"
|
|
1599
|
-
"
|
|
1600
|
-
"
|
|
3383
|
+
"completed",
|
|
3384
|
+
"missed",
|
|
3385
|
+
"declined",
|
|
3386
|
+
"cancelled",
|
|
3387
|
+
"failed"
|
|
1601
3388
|
]
|
|
1602
3389
|
},
|
|
1603
|
-
"
|
|
3390
|
+
"CallParticipantState": {
|
|
3391
|
+
"type": "string",
|
|
3392
|
+
"description": "`left` and `declined` can become `joined` again in a group call.",
|
|
3393
|
+
"enum": [
|
|
3394
|
+
"ringing",
|
|
3395
|
+
"joined",
|
|
3396
|
+
"declined",
|
|
3397
|
+
"missed",
|
|
3398
|
+
"left"
|
|
3399
|
+
]
|
|
3400
|
+
},
|
|
3401
|
+
"CallParticipant": {
|
|
3402
|
+
"type": "object",
|
|
3403
|
+
"required": [
|
|
3404
|
+
"user_id",
|
|
3405
|
+
"state",
|
|
3406
|
+
"session_id",
|
|
3407
|
+
"identity_key",
|
|
3408
|
+
"joined_at"
|
|
3409
|
+
],
|
|
3410
|
+
"properties": {
|
|
3411
|
+
"user_id": {
|
|
3412
|
+
"$ref": "#/$defs/Id"
|
|
3413
|
+
},
|
|
3414
|
+
"state": {
|
|
3415
|
+
"$ref": "#/$defs/CallParticipantState"
|
|
3416
|
+
},
|
|
3417
|
+
"session_id": {
|
|
3418
|
+
"description": "The session that joined; `null` unless `state` is `joined`.",
|
|
3419
|
+
"oneOf": [
|
|
3420
|
+
{
|
|
3421
|
+
"type": "string",
|
|
3422
|
+
"format": "uuid"
|
|
3423
|
+
},
|
|
3424
|
+
{
|
|
3425
|
+
"type": "null"
|
|
3426
|
+
}
|
|
3427
|
+
]
|
|
3428
|
+
},
|
|
3429
|
+
"identity_key": {
|
|
3430
|
+
"description": "Call identity of the joined session; `null` unless `state` is `joined`.",
|
|
3431
|
+
"oneOf": [
|
|
3432
|
+
{
|
|
3433
|
+
"$ref": "#/$defs/CallIdentityKey"
|
|
3434
|
+
},
|
|
3435
|
+
{
|
|
3436
|
+
"type": "null"
|
|
3437
|
+
}
|
|
3438
|
+
]
|
|
3439
|
+
},
|
|
3440
|
+
"joined_at": {
|
|
3441
|
+
"description": "When the participant last joined; `null` if never.",
|
|
3442
|
+
"oneOf": [
|
|
3443
|
+
{
|
|
3444
|
+
"$ref": "#/$defs/Timestamp"
|
|
3445
|
+
},
|
|
3446
|
+
{
|
|
3447
|
+
"type": "null"
|
|
3448
|
+
}
|
|
3449
|
+
]
|
|
3450
|
+
}
|
|
3451
|
+
}
|
|
3452
|
+
},
|
|
3453
|
+
"Call": {
|
|
1604
3454
|
"type": "object",
|
|
1605
3455
|
"required": [
|
|
1606
3456
|
"id",
|
|
1607
|
-
"
|
|
1608
|
-
"
|
|
1609
|
-
"
|
|
1610
|
-
"
|
|
1611
|
-
"
|
|
1612
|
-
"
|
|
1613
|
-
"
|
|
1614
|
-
"
|
|
3457
|
+
"chat_id",
|
|
3458
|
+
"kind",
|
|
3459
|
+
"state",
|
|
3460
|
+
"end_reason",
|
|
3461
|
+
"initiator_id",
|
|
3462
|
+
"created_at",
|
|
3463
|
+
"started_at",
|
|
3464
|
+
"ended_at",
|
|
3465
|
+
"ring_expires_at",
|
|
3466
|
+
"epoch",
|
|
3467
|
+
"version",
|
|
3468
|
+
"max_participants",
|
|
3469
|
+
"participants"
|
|
1615
3470
|
],
|
|
1616
3471
|
"properties": {
|
|
1617
3472
|
"id": {
|
|
1618
3473
|
"$ref": "#/$defs/Id"
|
|
1619
3474
|
},
|
|
1620
|
-
"
|
|
1621
|
-
"$ref": "#/$defs/
|
|
3475
|
+
"chat_id": {
|
|
3476
|
+
"$ref": "#/$defs/Id"
|
|
1622
3477
|
},
|
|
1623
|
-
"
|
|
3478
|
+
"kind": {
|
|
1624
3479
|
"type": "string",
|
|
1625
|
-
"
|
|
1626
|
-
|
|
1627
|
-
|
|
1628
|
-
"type": [
|
|
1629
|
-
"string",
|
|
1630
|
-
"null"
|
|
3480
|
+
"enum": [
|
|
3481
|
+
"direct",
|
|
3482
|
+
"group"
|
|
1631
3483
|
]
|
|
1632
3484
|
},
|
|
1633
|
-
"
|
|
1634
|
-
"
|
|
3485
|
+
"state": {
|
|
3486
|
+
"$ref": "#/$defs/CallState"
|
|
3487
|
+
},
|
|
3488
|
+
"end_reason": {
|
|
1635
3489
|
"oneOf": [
|
|
1636
3490
|
{
|
|
1637
|
-
"$ref": "#/$defs/
|
|
3491
|
+
"$ref": "#/$defs/CallEndReason"
|
|
1638
3492
|
},
|
|
1639
3493
|
{
|
|
1640
3494
|
"type": "null"
|
|
1641
3495
|
}
|
|
1642
3496
|
]
|
|
1643
3497
|
},
|
|
1644
|
-
"
|
|
1645
|
-
"
|
|
3498
|
+
"initiator_id": {
|
|
3499
|
+
"$ref": "#/$defs/Id"
|
|
1646
3500
|
},
|
|
1647
|
-
"
|
|
1648
|
-
"
|
|
1649
|
-
"minimum": 0
|
|
3501
|
+
"created_at": {
|
|
3502
|
+
"$ref": "#/$defs/Timestamp"
|
|
1650
3503
|
},
|
|
1651
|
-
"
|
|
3504
|
+
"started_at": {
|
|
3505
|
+
"description": "First answer; `null` while nobody answered.",
|
|
1652
3506
|
"oneOf": [
|
|
1653
3507
|
{
|
|
1654
|
-
"$ref": "#/$defs/
|
|
3508
|
+
"$ref": "#/$defs/Timestamp"
|
|
1655
3509
|
},
|
|
1656
3510
|
{
|
|
1657
3511
|
"type": "null"
|
|
1658
3512
|
}
|
|
1659
3513
|
]
|
|
1660
3514
|
},
|
|
1661
|
-
"
|
|
1662
|
-
"description": "Only for groups.",
|
|
3515
|
+
"ended_at": {
|
|
1663
3516
|
"oneOf": [
|
|
1664
3517
|
{
|
|
1665
|
-
"$ref": "#/$defs/
|
|
3518
|
+
"$ref": "#/$defs/Timestamp"
|
|
1666
3519
|
},
|
|
1667
3520
|
{
|
|
1668
3521
|
"type": "null"
|
|
1669
3522
|
}
|
|
1670
3523
|
]
|
|
1671
3524
|
},
|
|
1672
|
-
"
|
|
3525
|
+
"ring_expires_at": {
|
|
3526
|
+
"description": "When ringing invitations of this call turn into `missed`.",
|
|
1673
3527
|
"$ref": "#/$defs/Timestamp"
|
|
3528
|
+
},
|
|
3529
|
+
"epoch": {
|
|
3530
|
+
"type": "integer",
|
|
3531
|
+
"minimum": 0,
|
|
3532
|
+
"description": "Key epoch; increases whenever the set of joined sessions or their identity keys change."
|
|
3533
|
+
},
|
|
3534
|
+
"version": {
|
|
3535
|
+
"type": "integer",
|
|
3536
|
+
"minimum": 1,
|
|
3537
|
+
"description": "Increases with every change of the call; ignore events with a lower version than one already seen."
|
|
3538
|
+
},
|
|
3539
|
+
"max_participants": {
|
|
3540
|
+
"type": "integer",
|
|
3541
|
+
"minimum": 2
|
|
3542
|
+
},
|
|
3543
|
+
"participants": {
|
|
3544
|
+
"type": "array",
|
|
3545
|
+
"description": "Everyone invited or joined, the initiator first.",
|
|
3546
|
+
"items": {
|
|
3547
|
+
"$ref": "#/$defs/CallParticipant"
|
|
3548
|
+
}
|
|
1674
3549
|
}
|
|
1675
3550
|
}
|
|
1676
3551
|
},
|
|
1677
|
-
"
|
|
3552
|
+
"CallList": {
|
|
1678
3553
|
"type": "object",
|
|
1679
3554
|
"required": [
|
|
1680
|
-
"items"
|
|
1681
|
-
"next_cursor"
|
|
3555
|
+
"items"
|
|
1682
3556
|
],
|
|
1683
3557
|
"properties": {
|
|
1684
3558
|
"items": {
|
|
1685
3559
|
"type": "array",
|
|
1686
3560
|
"items": {
|
|
1687
|
-
"$ref": "#/$defs/
|
|
3561
|
+
"$ref": "#/$defs/Call"
|
|
1688
3562
|
}
|
|
1689
|
-
},
|
|
1690
|
-
"next_cursor": {
|
|
1691
|
-
"$ref": "#/$defs/Cursor"
|
|
1692
3563
|
}
|
|
1693
3564
|
}
|
|
1694
3565
|
},
|
|
1695
|
-
"
|
|
3566
|
+
"StartCallRequest": {
|
|
1696
3567
|
"type": "object",
|
|
1697
3568
|
"required": [
|
|
1698
|
-
"
|
|
3569
|
+
"client_request_id"
|
|
1699
3570
|
],
|
|
1700
3571
|
"properties": {
|
|
1701
|
-
"
|
|
1702
|
-
"
|
|
1703
|
-
|
|
1704
|
-
|
|
1705
|
-
"type": [
|
|
1706
|
-
"string",
|
|
1707
|
-
"null"
|
|
1708
|
-
],
|
|
1709
|
-
"maxLength": 4096
|
|
3572
|
+
"client_request_id": {
|
|
3573
|
+
"type": "string",
|
|
3574
|
+
"format": "uuid",
|
|
3575
|
+
"description": "Idempotency key chosen by the client."
|
|
1710
3576
|
}
|
|
1711
3577
|
}
|
|
1712
3578
|
},
|
|
1713
|
-
"
|
|
3579
|
+
"JoinCallRequest": {
|
|
1714
3580
|
"type": "object",
|
|
1715
|
-
"required": [
|
|
1716
|
-
"user",
|
|
1717
|
-
"role",
|
|
1718
|
-
"joined_at"
|
|
1719
|
-
],
|
|
1720
3581
|
"properties": {
|
|
1721
|
-
"
|
|
1722
|
-
"
|
|
1723
|
-
|
|
1724
|
-
|
|
1725
|
-
"$ref": "#/$defs/GroupRole"
|
|
1726
|
-
},
|
|
1727
|
-
"joined_at": {
|
|
1728
|
-
"$ref": "#/$defs/Timestamp"
|
|
3582
|
+
"takeover": {
|
|
3583
|
+
"type": "boolean",
|
|
3584
|
+
"default": false,
|
|
3585
|
+
"description": "Move the user's participation from another session to this one."
|
|
1729
3586
|
}
|
|
1730
3587
|
}
|
|
1731
3588
|
},
|
|
1732
|
-
"
|
|
3589
|
+
"CallGrant": {
|
|
1733
3590
|
"type": "object",
|
|
1734
3591
|
"required": [
|
|
1735
|
-
"
|
|
1736
|
-
"
|
|
1737
|
-
"
|
|
1738
|
-
"
|
|
1739
|
-
"owner_id",
|
|
1740
|
-
"my_role",
|
|
1741
|
-
"members",
|
|
1742
|
-
"created_at"
|
|
3592
|
+
"url",
|
|
3593
|
+
"token",
|
|
3594
|
+
"identity",
|
|
3595
|
+
"expires_at"
|
|
1743
3596
|
],
|
|
1744
3597
|
"properties": {
|
|
1745
|
-
"
|
|
1746
|
-
"$ref": "#/$defs/Id"
|
|
1747
|
-
},
|
|
1748
|
-
"name": {
|
|
3598
|
+
"url": {
|
|
1749
3599
|
"type": "string",
|
|
1750
|
-
"
|
|
1751
|
-
"maxLength": 64
|
|
1752
|
-
},
|
|
1753
|
-
"description": {
|
|
1754
|
-
"type": [
|
|
1755
|
-
"string",
|
|
1756
|
-
"null"
|
|
1757
|
-
],
|
|
1758
|
-
"maxLength": 500
|
|
1759
|
-
},
|
|
1760
|
-
"avatar_url": {
|
|
1761
|
-
"type": [
|
|
1762
|
-
"string",
|
|
1763
|
-
"null"
|
|
1764
|
-
]
|
|
3600
|
+
"description": "WebSocket URL of the media server (`wss://`)."
|
|
1765
3601
|
},
|
|
1766
|
-
"
|
|
1767
|
-
"
|
|
1768
|
-
|
|
1769
|
-
"my_role": {
|
|
1770
|
-
"$ref": "#/$defs/GroupRole"
|
|
3602
|
+
"token": {
|
|
3603
|
+
"type": "string",
|
|
3604
|
+
"description": "Media access token for this call and session only; microphone audio only."
|
|
1771
3605
|
},
|
|
1772
|
-
"
|
|
1773
|
-
"type": "
|
|
1774
|
-
"
|
|
1775
|
-
"$ref": "#/$defs/GroupMember"
|
|
1776
|
-
}
|
|
3606
|
+
"identity": {
|
|
3607
|
+
"type": "string",
|
|
3608
|
+
"description": "The participant identity inside the media room (`<user_id>:<session_id>`)."
|
|
1777
3609
|
},
|
|
1778
|
-
"
|
|
3610
|
+
"expires_at": {
|
|
1779
3611
|
"$ref": "#/$defs/Timestamp"
|
|
1780
3612
|
}
|
|
1781
3613
|
}
|
|
1782
3614
|
},
|
|
1783
|
-
"
|
|
3615
|
+
"CallJoin": {
|
|
1784
3616
|
"type": "object",
|
|
1785
3617
|
"required": [
|
|
1786
|
-
"
|
|
1787
|
-
"
|
|
3618
|
+
"call",
|
|
3619
|
+
"grant"
|
|
1788
3620
|
],
|
|
1789
3621
|
"properties": {
|
|
1790
|
-
"
|
|
1791
|
-
"
|
|
1792
|
-
"minLength": 1,
|
|
1793
|
-
"maxLength": 64
|
|
1794
|
-
},
|
|
1795
|
-
"description": {
|
|
1796
|
-
"type": [
|
|
1797
|
-
"string",
|
|
1798
|
-
"null"
|
|
1799
|
-
],
|
|
1800
|
-
"maxLength": 500
|
|
3622
|
+
"call": {
|
|
3623
|
+
"$ref": "#/$defs/Call"
|
|
1801
3624
|
},
|
|
1802
|
-
"
|
|
1803
|
-
"
|
|
1804
|
-
"maxItems": 200,
|
|
1805
|
-
"uniqueItems": true,
|
|
1806
|
-
"items": {
|
|
1807
|
-
"$ref": "#/$defs/Id"
|
|
1808
|
-
}
|
|
3625
|
+
"grant": {
|
|
3626
|
+
"$ref": "#/$defs/CallGrant"
|
|
1809
3627
|
}
|
|
1810
3628
|
}
|
|
1811
3629
|
},
|
|
1812
|
-
"
|
|
3630
|
+
"CallKeyEnvelope": {
|
|
1813
3631
|
"type": "object",
|
|
1814
|
-
"
|
|
3632
|
+
"description": "An HPKE Auth-mode envelope carrying one sender key (see `docs/calls-e2ee.md`).",
|
|
3633
|
+
"required": [
|
|
3634
|
+
"epoch",
|
|
3635
|
+
"sender_user_id",
|
|
3636
|
+
"sender_session_id",
|
|
3637
|
+
"recipient_session_id",
|
|
3638
|
+
"enc",
|
|
3639
|
+
"ciphertext"
|
|
3640
|
+
],
|
|
1815
3641
|
"properties": {
|
|
1816
|
-
"
|
|
3642
|
+
"epoch": {
|
|
3643
|
+
"type": "integer",
|
|
3644
|
+
"minimum": 0
|
|
3645
|
+
},
|
|
3646
|
+
"sender_user_id": {
|
|
3647
|
+
"$ref": "#/$defs/Id"
|
|
3648
|
+
},
|
|
3649
|
+
"sender_session_id": {
|
|
1817
3650
|
"type": "string",
|
|
1818
|
-
"
|
|
1819
|
-
"maxLength": 64
|
|
3651
|
+
"format": "uuid"
|
|
1820
3652
|
},
|
|
1821
|
-
"
|
|
1822
|
-
"type":
|
|
1823
|
-
|
|
1824
|
-
|
|
1825
|
-
|
|
1826
|
-
"
|
|
3653
|
+
"recipient_session_id": {
|
|
3654
|
+
"type": "string",
|
|
3655
|
+
"format": "uuid"
|
|
3656
|
+
},
|
|
3657
|
+
"enc": {
|
|
3658
|
+
"type": "string",
|
|
3659
|
+
"description": "HPKE encapsulated key, base64url without padding.",
|
|
3660
|
+
"maxLength": 128,
|
|
3661
|
+
"pattern": "^[A-Za-z0-9_-]+$"
|
|
3662
|
+
},
|
|
3663
|
+
"ciphertext": {
|
|
3664
|
+
"type": "string",
|
|
3665
|
+
"description": "Sealed sender key, base64url without padding.",
|
|
3666
|
+
"maxLength": 256,
|
|
3667
|
+
"pattern": "^[A-Za-z0-9_-]+$"
|
|
1827
3668
|
}
|
|
1828
3669
|
}
|
|
1829
3670
|
},
|
|
1830
|
-
"
|
|
3671
|
+
"CallKeyEnvelopeList": {
|
|
1831
3672
|
"type": "object",
|
|
1832
3673
|
"required": [
|
|
1833
|
-
"
|
|
3674
|
+
"call_id",
|
|
3675
|
+
"epoch",
|
|
3676
|
+
"items"
|
|
1834
3677
|
],
|
|
1835
3678
|
"properties": {
|
|
1836
|
-
"
|
|
3679
|
+
"call_id": {
|
|
1837
3680
|
"$ref": "#/$defs/Id"
|
|
3681
|
+
},
|
|
3682
|
+
"epoch": {
|
|
3683
|
+
"type": "integer",
|
|
3684
|
+
"minimum": 0
|
|
3685
|
+
},
|
|
3686
|
+
"items": {
|
|
3687
|
+
"type": "array",
|
|
3688
|
+
"items": {
|
|
3689
|
+
"$ref": "#/$defs/CallKeyEnvelope"
|
|
3690
|
+
}
|
|
1838
3691
|
}
|
|
1839
3692
|
}
|
|
1840
3693
|
},
|
|
1841
|
-
"
|
|
3694
|
+
"SendCallKeysRequest": {
|
|
1842
3695
|
"type": "object",
|
|
1843
3696
|
"required": [
|
|
1844
|
-
"
|
|
3697
|
+
"epoch",
|
|
3698
|
+
"envelopes"
|
|
1845
3699
|
],
|
|
1846
3700
|
"properties": {
|
|
1847
|
-
"
|
|
1848
|
-
"type": "
|
|
1849
|
-
"
|
|
1850
|
-
|
|
1851
|
-
|
|
1852
|
-
|
|
3701
|
+
"epoch": {
|
|
3702
|
+
"type": "integer",
|
|
3703
|
+
"minimum": 0
|
|
3704
|
+
},
|
|
3705
|
+
"envelopes": {
|
|
3706
|
+
"type": "array",
|
|
3707
|
+
"minItems": 1,
|
|
3708
|
+
"maxItems": 64,
|
|
3709
|
+
"items": {
|
|
3710
|
+
"$ref": "#/$defs/OutgoingCallKeyEnvelope"
|
|
3711
|
+
}
|
|
1853
3712
|
}
|
|
1854
3713
|
}
|
|
1855
3714
|
},
|
|
1856
|
-
"
|
|
3715
|
+
"OutgoingCallKeyEnvelope": {
|
|
1857
3716
|
"type": "object",
|
|
1858
3717
|
"required": [
|
|
1859
|
-
"
|
|
3718
|
+
"recipient_session_id",
|
|
3719
|
+
"enc",
|
|
3720
|
+
"ciphertext"
|
|
1860
3721
|
],
|
|
1861
3722
|
"properties": {
|
|
1862
|
-
"
|
|
1863
|
-
"
|
|
3723
|
+
"recipient_session_id": {
|
|
3724
|
+
"type": "string",
|
|
3725
|
+
"format": "uuid"
|
|
3726
|
+
},
|
|
3727
|
+
"enc": {
|
|
3728
|
+
"type": "string",
|
|
3729
|
+
"maxLength": 128,
|
|
3730
|
+
"pattern": "^[A-Za-z0-9_-]+$"
|
|
3731
|
+
},
|
|
3732
|
+
"ciphertext": {
|
|
3733
|
+
"type": "string",
|
|
3734
|
+
"maxLength": 256,
|
|
3735
|
+
"pattern": "^[A-Za-z0-9_-]+$"
|
|
1864
3736
|
}
|
|
1865
3737
|
}
|
|
1866
3738
|
},
|
|
1867
|
-
"
|
|
1868
|
-
"type": "string",
|
|
1869
|
-
"enum": [
|
|
1870
|
-
"direct_message",
|
|
1871
|
-
"group_invite"
|
|
1872
|
-
]
|
|
1873
|
-
},
|
|
1874
|
-
"ApprovalRequestStatus": {
|
|
1875
|
-
"type": "string",
|
|
1876
|
-
"enum": [
|
|
1877
|
-
"pending",
|
|
1878
|
-
"approved",
|
|
1879
|
-
"rejected"
|
|
1880
|
-
]
|
|
1881
|
-
},
|
|
1882
|
-
"ApprovalRequest": {
|
|
3739
|
+
"CallSummary": {
|
|
1883
3740
|
"type": "object",
|
|
3741
|
+
"description": "The call a `call` system message records.",
|
|
1884
3742
|
"required": [
|
|
1885
|
-
"
|
|
1886
|
-
"
|
|
1887
|
-
"
|
|
1888
|
-
"
|
|
1889
|
-
"created_at"
|
|
3743
|
+
"call_id",
|
|
3744
|
+
"kind",
|
|
3745
|
+
"outcome",
|
|
3746
|
+
"duration_seconds"
|
|
1890
3747
|
],
|
|
1891
3748
|
"properties": {
|
|
1892
|
-
"
|
|
3749
|
+
"call_id": {
|
|
1893
3750
|
"$ref": "#/$defs/Id"
|
|
1894
3751
|
},
|
|
1895
|
-
"
|
|
1896
|
-
"
|
|
1897
|
-
|
|
1898
|
-
|
|
1899
|
-
|
|
1900
|
-
|
|
1901
|
-
"requester": {
|
|
1902
|
-
"$ref": "#/$defs/User"
|
|
1903
|
-
},
|
|
1904
|
-
"group_name": {
|
|
1905
|
-
"type": [
|
|
1906
|
-
"string",
|
|
1907
|
-
"null"
|
|
1908
|
-
],
|
|
1909
|
-
"description": "Only for `group_invite`"
|
|
3752
|
+
"kind": {
|
|
3753
|
+
"type": "string",
|
|
3754
|
+
"enum": [
|
|
3755
|
+
"direct",
|
|
3756
|
+
"group"
|
|
3757
|
+
]
|
|
1910
3758
|
},
|
|
1911
|
-
"
|
|
1912
|
-
"
|
|
1913
|
-
"string",
|
|
1914
|
-
"null"
|
|
1915
|
-
],
|
|
1916
|
-
"description": "First message of a direct-message request"
|
|
3759
|
+
"outcome": {
|
|
3760
|
+
"$ref": "#/$defs/CallEndReason"
|
|
1917
3761
|
},
|
|
1918
|
-
"
|
|
1919
|
-
"
|
|
3762
|
+
"duration_seconds": {
|
|
3763
|
+
"description": "From the first answer to the end; `null` if nobody answered.",
|
|
3764
|
+
"oneOf": [
|
|
3765
|
+
{
|
|
3766
|
+
"type": "integer",
|
|
3767
|
+
"minimum": 0
|
|
3768
|
+
},
|
|
3769
|
+
{
|
|
3770
|
+
"type": "null"
|
|
3771
|
+
}
|
|
3772
|
+
]
|
|
1920
3773
|
}
|
|
1921
3774
|
}
|
|
1922
3775
|
},
|
|
@@ -1965,7 +3818,7 @@
|
|
|
1965
3818
|
},
|
|
1966
3819
|
"ClientEditEvent": {
|
|
1967
3820
|
"title": "ClientEditEvent",
|
|
1968
|
-
"description": "Edit your own text message.",
|
|
3821
|
+
"description": "Edit your own text message or the caption of your file. An empty content removes a file's caption.",
|
|
1969
3822
|
"type": "object",
|
|
1970
3823
|
"properties": {
|
|
1971
3824
|
"type": {
|
|
@@ -1985,7 +3838,6 @@
|
|
|
1985
3838
|
},
|
|
1986
3839
|
"content": {
|
|
1987
3840
|
"type": "string",
|
|
1988
|
-
"minLength": 1,
|
|
1989
3841
|
"maxLength": 4096
|
|
1990
3842
|
}
|
|
1991
3843
|
},
|
|
@@ -2253,7 +4105,7 @@
|
|
|
2253
4105
|
},
|
|
2254
4106
|
"ClientTypingEvent": {
|
|
2255
4107
|
"title": "ClientTypingEvent",
|
|
2256
|
-
"description": "Tell the chat that you are (not) typing. Not acknowledged, so it carries no `client_temp_id`.",
|
|
4108
|
+
"description": "Tell the chat that you are (not) typing or recording a voice message. Not acknowledged, so it carries no `client_temp_id`. Send `is_typing: true` again every few seconds while it lasts and `false` when it ends; receivers hide it when it is not repeated. Dropped when your `typing_indicators_enabled` privacy setting is off.",
|
|
2257
4109
|
"type": "object",
|
|
2258
4110
|
"properties": {
|
|
2259
4111
|
"type": {
|
|
@@ -2267,6 +4119,15 @@
|
|
|
2267
4119
|
"properties": {
|
|
2268
4120
|
"is_typing": {
|
|
2269
4121
|
"type": "boolean"
|
|
4122
|
+
},
|
|
4123
|
+
"action": {
|
|
4124
|
+
"description": "What you are doing. Without it, `typing`.",
|
|
4125
|
+
"type": "string",
|
|
4126
|
+
"enum": [
|
|
4127
|
+
"typing",
|
|
4128
|
+
"recording_voice"
|
|
4129
|
+
],
|
|
4130
|
+
"default": "typing"
|
|
2270
4131
|
}
|
|
2271
4132
|
},
|
|
2272
4133
|
"required": [
|
|
@@ -2381,6 +4242,64 @@
|
|
|
2381
4242
|
"data"
|
|
2382
4243
|
]
|
|
2383
4244
|
},
|
|
4245
|
+
"ServerCallKeysEvent": {
|
|
4246
|
+
"title": "ServerCallKeysEvent",
|
|
4247
|
+
"description": "Sealed sender keys for this session (see docs/calls-e2ee.md). Sent only to the recipient session.",
|
|
4248
|
+
"type": "object",
|
|
4249
|
+
"properties": {
|
|
4250
|
+
"type": {
|
|
4251
|
+
"const": "call_keys"
|
|
4252
|
+
},
|
|
4253
|
+
"event_id": {
|
|
4254
|
+
"$ref": "#/$defs/Id"
|
|
4255
|
+
},
|
|
4256
|
+
"chat_id": {
|
|
4257
|
+
"$ref": "#/$defs/Id"
|
|
4258
|
+
},
|
|
4259
|
+
"data": {
|
|
4260
|
+
"$ref": "#/$defs/CallKeyEnvelopeList"
|
|
4261
|
+
}
|
|
4262
|
+
},
|
|
4263
|
+
"required": [
|
|
4264
|
+
"type",
|
|
4265
|
+
"event_id",
|
|
4266
|
+
"chat_id",
|
|
4267
|
+
"data"
|
|
4268
|
+
]
|
|
4269
|
+
},
|
|
4270
|
+
"ServerCallUpdatedEvent": {
|
|
4271
|
+
"title": "ServerCallUpdatedEvent",
|
|
4272
|
+
"description": "A call of the chat started, rang, changed participants or epoch, or ended. Carries the whole call; keep the one with the highest `version`. Sent to every member of the chat.",
|
|
4273
|
+
"type": "object",
|
|
4274
|
+
"properties": {
|
|
4275
|
+
"type": {
|
|
4276
|
+
"const": "call_updated"
|
|
4277
|
+
},
|
|
4278
|
+
"event_id": {
|
|
4279
|
+
"$ref": "#/$defs/Id"
|
|
4280
|
+
},
|
|
4281
|
+
"chat_id": {
|
|
4282
|
+
"$ref": "#/$defs/Id"
|
|
4283
|
+
},
|
|
4284
|
+
"data": {
|
|
4285
|
+
"type": "object",
|
|
4286
|
+
"properties": {
|
|
4287
|
+
"call": {
|
|
4288
|
+
"$ref": "#/$defs/Call"
|
|
4289
|
+
}
|
|
4290
|
+
},
|
|
4291
|
+
"required": [
|
|
4292
|
+
"call"
|
|
4293
|
+
]
|
|
4294
|
+
}
|
|
4295
|
+
},
|
|
4296
|
+
"required": [
|
|
4297
|
+
"type",
|
|
4298
|
+
"event_id",
|
|
4299
|
+
"chat_id",
|
|
4300
|
+
"data"
|
|
4301
|
+
]
|
|
4302
|
+
},
|
|
2384
4303
|
"ServerChatCreatedEvent": {
|
|
2385
4304
|
"title": "ServerChatCreatedEvent",
|
|
2386
4305
|
"description": "A chat was created with you.",
|
|
@@ -2897,6 +4816,136 @@
|
|
|
2897
4816
|
"data"
|
|
2898
4817
|
]
|
|
2899
4818
|
},
|
|
4819
|
+
"ServerRecoveryRequestEvent": {
|
|
4820
|
+
"title": "ServerRecoveryRequestEvent",
|
|
4821
|
+
"type": "object",
|
|
4822
|
+
"required": [
|
|
4823
|
+
"type",
|
|
4824
|
+
"event_id",
|
|
4825
|
+
"chat_id",
|
|
4826
|
+
"data"
|
|
4827
|
+
],
|
|
4828
|
+
"additionalProperties": false,
|
|
4829
|
+
"properties": {
|
|
4830
|
+
"type": {
|
|
4831
|
+
"const": "recovery_request"
|
|
4832
|
+
},
|
|
4833
|
+
"event_id": {
|
|
4834
|
+
"type": "string",
|
|
4835
|
+
"pattern": "^[0-9]+$"
|
|
4836
|
+
},
|
|
4837
|
+
"chat_id": {
|
|
4838
|
+
"type": "null"
|
|
4839
|
+
},
|
|
4840
|
+
"data": {
|
|
4841
|
+
"type": "object",
|
|
4842
|
+
"required": [
|
|
4843
|
+
"request_id",
|
|
4844
|
+
"user_agent",
|
|
4845
|
+
"location",
|
|
4846
|
+
"choices",
|
|
4847
|
+
"expires_at"
|
|
4848
|
+
],
|
|
4849
|
+
"properties": {
|
|
4850
|
+
"request_id": {
|
|
4851
|
+
"description": "Approval handle for POST /auth/recovery-requests/{requestId}/approve and /deny. It is not the requester's capability.",
|
|
4852
|
+
"type": "string",
|
|
4853
|
+
"minLength": 32,
|
|
4854
|
+
"maxLength": 128,
|
|
4855
|
+
"pattern": "^[A-Za-z0-9_-]+$"
|
|
4856
|
+
},
|
|
4857
|
+
"user_agent": {
|
|
4858
|
+
"type": "string"
|
|
4859
|
+
},
|
|
4860
|
+
"location": {
|
|
4861
|
+
"oneOf": [
|
|
4862
|
+
{
|
|
4863
|
+
"$ref": "#/$defs/Location"
|
|
4864
|
+
},
|
|
4865
|
+
{
|
|
4866
|
+
"type": "null"
|
|
4867
|
+
}
|
|
4868
|
+
]
|
|
4869
|
+
},
|
|
4870
|
+
"choices": {
|
|
4871
|
+
"type": "array",
|
|
4872
|
+
"minItems": 3,
|
|
4873
|
+
"maxItems": 3,
|
|
4874
|
+
"uniqueItems": true,
|
|
4875
|
+
"items": {
|
|
4876
|
+
"type": "integer",
|
|
4877
|
+
"minimum": 10,
|
|
4878
|
+
"maximum": 99
|
|
4879
|
+
}
|
|
4880
|
+
},
|
|
4881
|
+
"expires_at": {
|
|
4882
|
+
"type": "string",
|
|
4883
|
+
"format": "date-time"
|
|
4884
|
+
}
|
|
4885
|
+
}
|
|
4886
|
+
}
|
|
4887
|
+
}
|
|
4888
|
+
},
|
|
4889
|
+
"ServerSecurityAlertEvent": {
|
|
4890
|
+
"title": "ServerSecurityAlertEvent",
|
|
4891
|
+
"type": "object",
|
|
4892
|
+
"required": [
|
|
4893
|
+
"type",
|
|
4894
|
+
"event_id",
|
|
4895
|
+
"chat_id",
|
|
4896
|
+
"data"
|
|
4897
|
+
],
|
|
4898
|
+
"properties": {
|
|
4899
|
+
"type": {
|
|
4900
|
+
"const": "security_alert"
|
|
4901
|
+
},
|
|
4902
|
+
"event_id": {
|
|
4903
|
+
"$ref": "#/$defs/Id"
|
|
4904
|
+
},
|
|
4905
|
+
"chat_id": {
|
|
4906
|
+
"type": "null"
|
|
4907
|
+
},
|
|
4908
|
+
"data": {
|
|
4909
|
+
"type": "object",
|
|
4910
|
+
"required": [
|
|
4911
|
+
"type"
|
|
4912
|
+
],
|
|
4913
|
+
"properties": {
|
|
4914
|
+
"type": {
|
|
4915
|
+
"type": "string",
|
|
4916
|
+
"enum": [
|
|
4917
|
+
"password_changed",
|
|
4918
|
+
"recovery_key_changed",
|
|
4919
|
+
"2fa_enabled",
|
|
4920
|
+
"2fa_disabled",
|
|
4921
|
+
"passkey_added",
|
|
4922
|
+
"passkey_removed",
|
|
4923
|
+
"recovery_email_changed",
|
|
4924
|
+
"recovery_email_removed",
|
|
4925
|
+
"passkey_counter_warning",
|
|
4926
|
+
"login",
|
|
4927
|
+
"login_2fa",
|
|
4928
|
+
"passkey_login",
|
|
4929
|
+
"qr_login_approved"
|
|
4930
|
+
]
|
|
4931
|
+
},
|
|
4932
|
+
"user_agent": {
|
|
4933
|
+
"type": "string",
|
|
4934
|
+
"maxLength": 512
|
|
4935
|
+
},
|
|
4936
|
+
"created_at": {
|
|
4937
|
+
"type": "string",
|
|
4938
|
+
"format": "date-time"
|
|
4939
|
+
},
|
|
4940
|
+
"session_id": {
|
|
4941
|
+
"description": "The session that made the change, when a signed-in session made it. Clients skip alerts for their own session.",
|
|
4942
|
+
"type": "string",
|
|
4943
|
+
"format": "uuid"
|
|
4944
|
+
}
|
|
4945
|
+
}
|
|
4946
|
+
}
|
|
4947
|
+
}
|
|
4948
|
+
},
|
|
2900
4949
|
"ServerSecurityNoticeEvent": {
|
|
2901
4950
|
"title": "ServerSecurityNoticeEvent",
|
|
2902
4951
|
"type": "object",
|
|
@@ -2931,7 +4980,7 @@
|
|
|
2931
4980
|
},
|
|
2932
4981
|
"ServerTypingEvent": {
|
|
2933
4982
|
"title": "ServerTypingEvent",
|
|
2934
|
-
"description": "A user started or stopped typing.",
|
|
4983
|
+
"description": "A user started or stopped typing or recording a voice message. Hide it after about 6 seconds without a repeat: the sender may disconnect before it sends `false`.",
|
|
2935
4984
|
"type": "object",
|
|
2936
4985
|
"properties": {
|
|
2937
4986
|
"type": {
|
|
@@ -2951,11 +5000,20 @@
|
|
|
2951
5000
|
},
|
|
2952
5001
|
"is_typing": {
|
|
2953
5002
|
"type": "boolean"
|
|
5003
|
+
},
|
|
5004
|
+
"action": {
|
|
5005
|
+
"description": "What the user is doing. New values may be added: show an unknown one like `typing`.",
|
|
5006
|
+
"type": "string",
|
|
5007
|
+
"enum": [
|
|
5008
|
+
"typing",
|
|
5009
|
+
"recording_voice"
|
|
5010
|
+
]
|
|
2954
5011
|
}
|
|
2955
5012
|
},
|
|
2956
5013
|
"required": [
|
|
2957
5014
|
"user_id",
|
|
2958
|
-
"is_typing"
|
|
5015
|
+
"is_typing",
|
|
5016
|
+
"action"
|
|
2959
5017
|
]
|
|
2960
5018
|
}
|
|
2961
5019
|
},
|
|
@@ -3006,6 +5064,12 @@
|
|
|
3006
5064
|
{
|
|
3007
5065
|
"$ref": "#/$defs/ServerApprovalRequestCreatedEvent"
|
|
3008
5066
|
},
|
|
5067
|
+
{
|
|
5068
|
+
"$ref": "#/$defs/ServerCallKeysEvent"
|
|
5069
|
+
},
|
|
5070
|
+
{
|
|
5071
|
+
"$ref": "#/$defs/ServerCallUpdatedEvent"
|
|
5072
|
+
},
|
|
3009
5073
|
{
|
|
3010
5074
|
"$ref": "#/$defs/ServerChatCreatedEvent"
|
|
3011
5075
|
},
|
|
@@ -3048,6 +5112,12 @@
|
|
|
3048
5112
|
{
|
|
3049
5113
|
"$ref": "#/$defs/ServerReadEvent"
|
|
3050
5114
|
},
|
|
5115
|
+
{
|
|
5116
|
+
"$ref": "#/$defs/ServerRecoveryRequestEvent"
|
|
5117
|
+
},
|
|
5118
|
+
{
|
|
5119
|
+
"$ref": "#/$defs/ServerSecurityAlertEvent"
|
|
5120
|
+
},
|
|
3051
5121
|
{
|
|
3052
5122
|
"$ref": "#/$defs/ServerSecurityNoticeEvent"
|
|
3053
5123
|
},
|