@myronsi/messenger-api 2.0.0-alpha.1.next.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.
@@ -0,0 +1,2739 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$defs": {
4
+ "Id": {
5
+ "type": "string",
6
+ "pattern": "^[0-9]{1,19}$",
7
+ "description": "Decimal ID as a string (Snowflake IDs exceed 2^53).",
8
+ "examples": [
9
+ "7217400317439950848"
10
+ ]
11
+ },
12
+ "Cursor": {
13
+ "type": [
14
+ "string",
15
+ "null"
16
+ ],
17
+ "maxLength": 256,
18
+ "description": "Opaque cursor; `null` when there are no more results."
19
+ },
20
+ "Timestamp": {
21
+ "type": "string",
22
+ "format": "date-time"
23
+ },
24
+ "Username": {
25
+ "type": "string",
26
+ "pattern": "^[A-Za-z0-9_]{3,32}$"
27
+ },
28
+ "ClientTempId": {
29
+ "type": "string",
30
+ "minLength": 1,
31
+ "maxLength": 64,
32
+ "description": "Client-generated ID that makes sending idempotent and ties acks and errors to the send."
33
+ },
34
+ "ErrorCode": {
35
+ "type": "string",
36
+ "description": "Stable machine-readable error code. New codes can appear in MINOR versions; unknown\ncodes must be treated like `internal_error`.\n",
37
+ "enum": [
38
+ "invalid_request",
39
+ "validation_failed",
40
+ "unauthenticated",
41
+ "invalid_credentials",
42
+ "two_factor_required",
43
+ "invalid_two_factor_code",
44
+ "token_expired",
45
+ "forbidden",
46
+ "not_found",
47
+ "conflict",
48
+ "already_exists",
49
+ "payload_too_large",
50
+ "unsupported_media_type",
51
+ "rate_limited",
52
+ "client_outdated",
53
+ "invalid_client_version",
54
+ "blocked_by_user",
55
+ "approval_required",
56
+ "internal_error"
57
+ ]
58
+ },
59
+ "Problem": {
60
+ "type": "object",
61
+ "description": "RFC 9457 problem details. `426 Upgrade Required` (`client_outdated`) uses the same format.",
62
+ "required": [
63
+ "type",
64
+ "title",
65
+ "status",
66
+ "code"
67
+ ],
68
+ "properties": {
69
+ "type": {
70
+ "type": "string",
71
+ "description": "URI reference identifying the problem type (`about:blank` when `code` says it all).",
72
+ "default": "about:blank"
73
+ },
74
+ "title": {
75
+ "type": "string"
76
+ },
77
+ "status": {
78
+ "type": "integer",
79
+ "minimum": 400,
80
+ "maximum": 599
81
+ },
82
+ "detail": {
83
+ "type": "string"
84
+ },
85
+ "instance": {
86
+ "type": "string"
87
+ },
88
+ "code": {
89
+ "$ref": "#/$defs/ErrorCode"
90
+ },
91
+ "errors": {
92
+ "type": "array",
93
+ "description": "Field errors for `validation_failed`.",
94
+ "items": {
95
+ "type": "object",
96
+ "required": [
97
+ "field",
98
+ "message"
99
+ ],
100
+ "properties": {
101
+ "field": {
102
+ "type": "string",
103
+ "description": "JSON pointer into the request body, or the parameter name."
104
+ },
105
+ "message": {
106
+ "type": "string"
107
+ }
108
+ }
109
+ }
110
+ },
111
+ "min_client_api_version": {
112
+ "type": "string",
113
+ "description": "Present when `code` is `client_outdated`."
114
+ },
115
+ "api_version": {
116
+ "type": "string",
117
+ "description": "Present when `code` is `client_outdated`."
118
+ }
119
+ },
120
+ "additionalProperties": true
121
+ },
122
+ "Meta": {
123
+ "type": "object",
124
+ "required": [
125
+ "backend_version",
126
+ "commit",
127
+ "api_version",
128
+ "min_client_api_version"
129
+ ],
130
+ "properties": {
131
+ "backend_version": {
132
+ "type": "string",
133
+ "examples": [
134
+ "1.0.3"
135
+ ]
136
+ },
137
+ "commit": {
138
+ "type": "string",
139
+ "examples": [
140
+ "abc1234"
141
+ ]
142
+ },
143
+ "api_version": {
144
+ "type": "string",
145
+ "examples": [
146
+ "2.0.0"
147
+ ]
148
+ },
149
+ "min_client_api_version": {
150
+ "type": "string",
151
+ "examples": [
152
+ "2.0.0"
153
+ ]
154
+ }
155
+ }
156
+ },
157
+ "RegisterRequest": {
158
+ "type": "object",
159
+ "required": [
160
+ "username",
161
+ "display_name",
162
+ "password"
163
+ ],
164
+ "properties": {
165
+ "username": {
166
+ "$ref": "#/$defs/Username"
167
+ },
168
+ "display_name": {
169
+ "type": "string",
170
+ "minLength": 1,
171
+ "maxLength": 64
172
+ },
173
+ "password": {
174
+ "type": "string",
175
+ "minLength": 8,
176
+ "maxLength": 128,
177
+ "writeOnly": true
178
+ },
179
+ "bio": {
180
+ "type": [
181
+ "string",
182
+ "null"
183
+ ],
184
+ "maxLength": 500
185
+ }
186
+ }
187
+ },
188
+ "LoginRequest": {
189
+ "type": "object",
190
+ "required": [
191
+ "username",
192
+ "password"
193
+ ],
194
+ "properties": {
195
+ "username": {
196
+ "$ref": "#/$defs/Username"
197
+ },
198
+ "password": {
199
+ "type": "string",
200
+ "maxLength": 128,
201
+ "writeOnly": true
202
+ }
203
+ }
204
+ },
205
+ "TwoFactorLoginRequest": {
206
+ "type": "object",
207
+ "required": [
208
+ "login_challenge",
209
+ "code"
210
+ ],
211
+ "properties": {
212
+ "login_challenge": {
213
+ "type": "string"
214
+ },
215
+ "code": {
216
+ "type": "string",
217
+ "pattern": "^[0-9]{6}$"
218
+ }
219
+ }
220
+ },
221
+ "TokenResponse": {
222
+ "type": "object",
223
+ "required": [
224
+ "access_token",
225
+ "token_type",
226
+ "expires_in"
227
+ ],
228
+ "properties": {
229
+ "access_token": {
230
+ "type": "string"
231
+ },
232
+ "token_type": {
233
+ "type": "string",
234
+ "const": "Bearer"
235
+ },
236
+ "expires_in": {
237
+ "type": "integer",
238
+ "minimum": 1,
239
+ "description": "Seconds until the access token expires"
240
+ }
241
+ }
242
+ },
243
+ "RegisterResponse": {
244
+ "allOf": [
245
+ {
246
+ "$ref": "#/$defs/TokenResponse"
247
+ },
248
+ {
249
+ "type": "object",
250
+ "description": "Recovery parts of the temporary recovery flow (redesigned in release 1.1).",
251
+ "properties": {
252
+ "device_part": {
253
+ "type": "string"
254
+ },
255
+ "qr_part": {
256
+ "type": "string"
257
+ }
258
+ }
259
+ }
260
+ ]
261
+ },
262
+ "TwoFactorChallenge": {
263
+ "type": "object",
264
+ "required": [
265
+ "two_factor_required",
266
+ "login_challenge"
267
+ ],
268
+ "properties": {
269
+ "two_factor_required": {
270
+ "type": "boolean",
271
+ "const": true
272
+ },
273
+ "login_challenge": {
274
+ "type": "string"
275
+ }
276
+ }
277
+ },
278
+ "LoginResponse": {
279
+ "oneOf": [
280
+ {
281
+ "$ref": "#/$defs/TokenResponse"
282
+ },
283
+ {
284
+ "$ref": "#/$defs/TwoFactorChallenge"
285
+ }
286
+ ]
287
+ },
288
+ "RecoveryRequest": {
289
+ "type": "object",
290
+ "required": [
291
+ "username"
292
+ ],
293
+ "properties": {
294
+ "username": {
295
+ "$ref": "#/$defs/Username"
296
+ },
297
+ "device_part": {
298
+ "type": "string"
299
+ },
300
+ "qr_part": {
301
+ "type": "string"
302
+ }
303
+ }
304
+ },
305
+ "RecoveryResponse": {
306
+ "type": "object",
307
+ "required": [
308
+ "recovery_token"
309
+ ],
310
+ "properties": {
311
+ "recovery_token": {
312
+ "type": "string"
313
+ }
314
+ }
315
+ },
316
+ "ResetPasswordRequest": {
317
+ "type": "object",
318
+ "required": [
319
+ "recovery_token",
320
+ "new_password"
321
+ ],
322
+ "properties": {
323
+ "recovery_token": {
324
+ "type": "string"
325
+ },
326
+ "new_password": {
327
+ "type": "string",
328
+ "minLength": 8,
329
+ "maxLength": 128,
330
+ "writeOnly": true
331
+ }
332
+ }
333
+ },
334
+ "WebSocketTicket": {
335
+ "type": "object",
336
+ "required": [
337
+ "ticket",
338
+ "expires_in"
339
+ ],
340
+ "properties": {
341
+ "ticket": {
342
+ "type": "string"
343
+ },
344
+ "expires_in": {
345
+ "type": "integer",
346
+ "minimum": 1,
347
+ "description": "Seconds the ticket stays valid"
348
+ }
349
+ }
350
+ },
351
+ "PasswordConfirmation": {
352
+ "type": "object",
353
+ "required": [
354
+ "password"
355
+ ],
356
+ "properties": {
357
+ "password": {
358
+ "type": "string",
359
+ "maxLength": 128,
360
+ "writeOnly": true
361
+ }
362
+ }
363
+ },
364
+ "ChangePasswordRequest": {
365
+ "type": "object",
366
+ "required": [
367
+ "current_password",
368
+ "new_password"
369
+ ],
370
+ "properties": {
371
+ "current_password": {
372
+ "type": "string",
373
+ "maxLength": 128,
374
+ "writeOnly": true
375
+ },
376
+ "new_password": {
377
+ "type": "string",
378
+ "minLength": 8,
379
+ "maxLength": 128,
380
+ "writeOnly": true
381
+ }
382
+ }
383
+ },
384
+ "UpdateMeRequest": {
385
+ "type": "object",
386
+ "minProperties": 1,
387
+ "properties": {
388
+ "display_name": {
389
+ "type": "string",
390
+ "minLength": 1,
391
+ "maxLength": 64
392
+ },
393
+ "bio": {
394
+ "type": [
395
+ "string",
396
+ "null"
397
+ ],
398
+ "maxLength": 500
399
+ }
400
+ }
401
+ },
402
+ "SetAvatarRequest": {
403
+ "type": "object",
404
+ "required": [
405
+ "attachment_id"
406
+ ],
407
+ "properties": {
408
+ "attachment_id": {
409
+ "$ref": "#/$defs/Id"
410
+ }
411
+ }
412
+ },
413
+ "SecuritySettings": {
414
+ "type": "object",
415
+ "required": [
416
+ "session_duration_days",
417
+ "two_factor_enabled"
418
+ ],
419
+ "properties": {
420
+ "session_duration_days": {
421
+ "type": "integer",
422
+ "minimum": 1,
423
+ "maximum": 365
424
+ },
425
+ "two_factor_enabled": {
426
+ "type": "boolean"
427
+ }
428
+ }
429
+ },
430
+ "UpdateSecuritySettingsRequest": {
431
+ "type": "object",
432
+ "required": [
433
+ "session_duration_days"
434
+ ],
435
+ "properties": {
436
+ "session_duration_days": {
437
+ "type": "integer",
438
+ "minimum": 1,
439
+ "maximum": 365
440
+ }
441
+ }
442
+ },
443
+ "Session": {
444
+ "type": "object",
445
+ "required": [
446
+ "id",
447
+ "created_at",
448
+ "last_used_at",
449
+ "is_current"
450
+ ],
451
+ "properties": {
452
+ "id": {
453
+ "$ref": "#/$defs/Id"
454
+ },
455
+ "device": {
456
+ "type": [
457
+ "string",
458
+ "null"
459
+ ],
460
+ "description": "Sanitised user agent"
461
+ },
462
+ "created_at": {
463
+ "$ref": "#/$defs/Timestamp"
464
+ },
465
+ "last_used_at": {
466
+ "$ref": "#/$defs/Timestamp"
467
+ },
468
+ "expires_at": {
469
+ "$ref": "#/$defs/Timestamp"
470
+ },
471
+ "is_current": {
472
+ "type": "boolean"
473
+ }
474
+ }
475
+ },
476
+ "TwoFactorSetup": {
477
+ "type": "object",
478
+ "required": [
479
+ "secret",
480
+ "otpauth_uri"
481
+ ],
482
+ "properties": {
483
+ "secret": {
484
+ "type": "string"
485
+ },
486
+ "otpauth_uri": {
487
+ "type": "string"
488
+ }
489
+ }
490
+ },
491
+ "TwoFactorCode": {
492
+ "type": "object",
493
+ "required": [
494
+ "code"
495
+ ],
496
+ "properties": {
497
+ "code": {
498
+ "type": "string",
499
+ "pattern": "^[0-9]{6}$"
500
+ }
501
+ }
502
+ },
503
+ "DisableTwoFactorRequest": {
504
+ "type": "object",
505
+ "required": [
506
+ "password",
507
+ "code"
508
+ ],
509
+ "properties": {
510
+ "password": {
511
+ "type": "string",
512
+ "maxLength": 128,
513
+ "writeOnly": true
514
+ },
515
+ "code": {
516
+ "type": "string",
517
+ "pattern": "^[0-9]{6}$"
518
+ }
519
+ }
520
+ },
521
+ "Visibility": {
522
+ "type": "string",
523
+ "description": "Who may see the item. `*_except` scopes use the exception lists.",
524
+ "enum": [
525
+ "everyone",
526
+ "contacts",
527
+ "everyone_except",
528
+ "nobody_except",
529
+ "nobody"
530
+ ]
531
+ },
532
+ "DirectMessagePolicy": {
533
+ "type": "string",
534
+ "enum": [
535
+ "everyone",
536
+ "shared_chats",
537
+ "wait_approval"
538
+ ]
539
+ },
540
+ "GroupInvitePolicy": {
541
+ "type": "string",
542
+ "enum": [
543
+ "everyone",
544
+ "contacts",
545
+ "everyone_except",
546
+ "nobody_except",
547
+ "nobody",
548
+ "wait_approval"
549
+ ]
550
+ },
551
+ "SearchVisibility": {
552
+ "type": "string",
553
+ "enum": [
554
+ "everyone",
555
+ "nobody"
556
+ ]
557
+ },
558
+ "PrivacyExceptions": {
559
+ "type": "object",
560
+ "description": "User IDs per setting; `allow` applies to `nobody_except`, `deny` to `everyone_except`.",
561
+ "additionalProperties": {
562
+ "type": "object",
563
+ "required": [
564
+ "allow",
565
+ "deny"
566
+ ],
567
+ "properties": {
568
+ "allow": {
569
+ "type": "array",
570
+ "items": {
571
+ "$ref": "#/$defs/Id"
572
+ }
573
+ },
574
+ "deny": {
575
+ "type": "array",
576
+ "items": {
577
+ "$ref": "#/$defs/Id"
578
+ }
579
+ }
580
+ }
581
+ }
582
+ },
583
+ "PrivacySettings": {
584
+ "type": "object",
585
+ "required": [
586
+ "avatar_visibility",
587
+ "profile_visibility",
588
+ "presence_visibility",
589
+ "read_receipts_enabled",
590
+ "direct_messages",
591
+ "group_invites",
592
+ "search_visibility",
593
+ "exceptions"
594
+ ],
595
+ "properties": {
596
+ "avatar_visibility": {
597
+ "$ref": "#/$defs/Visibility"
598
+ },
599
+ "profile_visibility": {
600
+ "$ref": "#/$defs/Visibility"
601
+ },
602
+ "presence_visibility": {
603
+ "$ref": "#/$defs/Visibility"
604
+ },
605
+ "read_receipts_enabled": {
606
+ "type": "boolean"
607
+ },
608
+ "direct_messages": {
609
+ "$ref": "#/$defs/DirectMessagePolicy"
610
+ },
611
+ "group_invites": {
612
+ "$ref": "#/$defs/GroupInvitePolicy"
613
+ },
614
+ "search_visibility": {
615
+ "$ref": "#/$defs/SearchVisibility"
616
+ },
617
+ "exceptions": {
618
+ "$ref": "#/$defs/PrivacyExceptions"
619
+ }
620
+ }
621
+ },
622
+ "UpdatePrivacySettingsRequest": {
623
+ "type": "object",
624
+ "minProperties": 1,
625
+ "properties": {
626
+ "avatar_visibility": {
627
+ "$ref": "#/$defs/Visibility"
628
+ },
629
+ "profile_visibility": {
630
+ "$ref": "#/$defs/Visibility"
631
+ },
632
+ "presence_visibility": {
633
+ "$ref": "#/$defs/Visibility"
634
+ },
635
+ "read_receipts_enabled": {
636
+ "type": "boolean"
637
+ },
638
+ "direct_messages": {
639
+ "$ref": "#/$defs/DirectMessagePolicy"
640
+ },
641
+ "group_invites": {
642
+ "$ref": "#/$defs/GroupInvitePolicy"
643
+ },
644
+ "search_visibility": {
645
+ "$ref": "#/$defs/SearchVisibility"
646
+ }
647
+ }
648
+ },
649
+ "PrivacyExceptionsRequest": {
650
+ "type": "object",
651
+ "required": [
652
+ "user_ids"
653
+ ],
654
+ "properties": {
655
+ "user_ids": {
656
+ "type": "array",
657
+ "maxItems": 500,
658
+ "items": {
659
+ "$ref": "#/$defs/Id"
660
+ }
661
+ }
662
+ }
663
+ },
664
+ "User": {
665
+ "type": "object",
666
+ "description": "A user as visible to the requesting user; hidden fields are `null`.",
667
+ "required": [
668
+ "id",
669
+ "username",
670
+ "display_name",
671
+ "avatar_url",
672
+ "bio",
673
+ "is_online",
674
+ "last_seen",
675
+ "is_deleted"
676
+ ],
677
+ "properties": {
678
+ "id": {
679
+ "$ref": "#/$defs/Id"
680
+ },
681
+ "username": {
682
+ "$ref": "#/$defs/Username"
683
+ },
684
+ "display_name": {
685
+ "type": "string"
686
+ },
687
+ "contact_name": {
688
+ "type": [
689
+ "string",
690
+ "null"
691
+ ],
692
+ "description": "The requesting user's own name for this user, if set."
693
+ },
694
+ "avatar_url": {
695
+ "type": [
696
+ "string",
697
+ "null"
698
+ ],
699
+ "description": "Path of the avatar, always same-origin (`/api/v2/users/{id}/avatar`)."
700
+ },
701
+ "bio": {
702
+ "type": [
703
+ "string",
704
+ "null"
705
+ ]
706
+ },
707
+ "is_online": {
708
+ "type": "boolean"
709
+ },
710
+ "last_seen": {
711
+ "oneOf": [
712
+ {
713
+ "$ref": "#/$defs/Timestamp"
714
+ },
715
+ {
716
+ "type": "null"
717
+ }
718
+ ]
719
+ },
720
+ "is_deleted": {
721
+ "type": "boolean"
722
+ }
723
+ }
724
+ },
725
+ "Me": {
726
+ "allOf": [
727
+ {
728
+ "$ref": "#/$defs/User"
729
+ },
730
+ {
731
+ "type": "object",
732
+ "required": [
733
+ "created_at"
734
+ ],
735
+ "properties": {
736
+ "created_at": {
737
+ "$ref": "#/$defs/Timestamp"
738
+ }
739
+ }
740
+ }
741
+ ]
742
+ },
743
+ "UserPage": {
744
+ "type": "object",
745
+ "required": [
746
+ "items",
747
+ "next_cursor"
748
+ ],
749
+ "properties": {
750
+ "items": {
751
+ "type": "array",
752
+ "items": {
753
+ "$ref": "#/$defs/User"
754
+ }
755
+ },
756
+ "next_cursor": {
757
+ "$ref": "#/$defs/Cursor"
758
+ }
759
+ }
760
+ },
761
+ "AvatarVersion": {
762
+ "type": "object",
763
+ "required": [
764
+ "id",
765
+ "url",
766
+ "created_at"
767
+ ],
768
+ "properties": {
769
+ "id": {
770
+ "$ref": "#/$defs/Id"
771
+ },
772
+ "url": {
773
+ "type": "string"
774
+ },
775
+ "created_at": {
776
+ "$ref": "#/$defs/Timestamp"
777
+ }
778
+ }
779
+ },
780
+ "ContactNameRequest": {
781
+ "type": "object",
782
+ "required": [
783
+ "contact_name"
784
+ ],
785
+ "properties": {
786
+ "contact_name": {
787
+ "type": "string",
788
+ "minLength": 1,
789
+ "maxLength": 64
790
+ }
791
+ }
792
+ },
793
+ "AttachmentKind": {
794
+ "type": "string",
795
+ "enum": [
796
+ "image",
797
+ "audio",
798
+ "voice",
799
+ "video",
800
+ "file"
801
+ ]
802
+ },
803
+ "UploadPurpose": {
804
+ "type": "string",
805
+ "enum": [
806
+ "message",
807
+ "avatar"
808
+ ]
809
+ },
810
+ "UploadAttachmentRequest": {
811
+ "type": "object",
812
+ "required": [
813
+ "file",
814
+ "purpose"
815
+ ],
816
+ "properties": {
817
+ "file": {
818
+ "type": "string",
819
+ "format": "binary"
820
+ },
821
+ "purpose": {
822
+ "$ref": "#/$defs/UploadPurpose"
823
+ },
824
+ "kind": {
825
+ "$ref": "#/$defs/AttachmentKind"
826
+ },
827
+ "duration_ms": {
828
+ "type": "integer",
829
+ "minimum": 0,
830
+ "description": "Length of a voice message"
831
+ },
832
+ "waveform": {
833
+ "type": "array",
834
+ "description": "Amplitude samples (0-255) of a voice message",
835
+ "maxItems": 128,
836
+ "items": {
837
+ "type": "integer",
838
+ "minimum": 0,
839
+ "maximum": 255
840
+ }
841
+ }
842
+ }
843
+ },
844
+ "Attachment": {
845
+ "type": "object",
846
+ "required": [
847
+ "id",
848
+ "kind",
849
+ "filename",
850
+ "content_type",
851
+ "size",
852
+ "url"
853
+ ],
854
+ "properties": {
855
+ "id": {
856
+ "$ref": "#/$defs/Id"
857
+ },
858
+ "kind": {
859
+ "$ref": "#/$defs/AttachmentKind"
860
+ },
861
+ "filename": {
862
+ "type": "string"
863
+ },
864
+ "content_type": {
865
+ "type": "string",
866
+ "description": "Detected by the server"
867
+ },
868
+ "size": {
869
+ "type": "integer",
870
+ "minimum": 0,
871
+ "description": "Bytes"
872
+ },
873
+ "url": {
874
+ "type": "string",
875
+ "description": "Same-origin path (`/api/v2/attachments/{id}/content`) set by the server.",
876
+ "readOnly": true
877
+ },
878
+ "width": {
879
+ "type": [
880
+ "integer",
881
+ "null"
882
+ ],
883
+ "minimum": 1
884
+ },
885
+ "height": {
886
+ "type": [
887
+ "integer",
888
+ "null"
889
+ ],
890
+ "minimum": 1
891
+ },
892
+ "thumbnail_url": {
893
+ "type": [
894
+ "string",
895
+ "null"
896
+ ],
897
+ "readOnly": true
898
+ },
899
+ "duration_ms": {
900
+ "type": [
901
+ "integer",
902
+ "null"
903
+ ],
904
+ "minimum": 0
905
+ },
906
+ "waveform": {
907
+ "type": [
908
+ "array",
909
+ "null"
910
+ ],
911
+ "items": {
912
+ "type": "integer",
913
+ "minimum": 0,
914
+ "maximum": 255
915
+ }
916
+ }
917
+ }
918
+ },
919
+ "MediaKind": {
920
+ "type": "string",
921
+ "enum": [
922
+ "image",
923
+ "audio"
924
+ ]
925
+ },
926
+ "MessageType": {
927
+ "type": "string",
928
+ "enum": [
929
+ "text",
930
+ "file",
931
+ "voice",
932
+ "system"
933
+ ]
934
+ },
935
+ "Reaction": {
936
+ "type": "object",
937
+ "required": [
938
+ "emoji",
939
+ "user_id"
940
+ ],
941
+ "properties": {
942
+ "emoji": {
943
+ "type": "string",
944
+ "minLength": 1,
945
+ "maxLength": 32
946
+ },
947
+ "user_id": {
948
+ "$ref": "#/$defs/Id"
949
+ }
950
+ }
951
+ },
952
+ "ReadReceipt": {
953
+ "type": "object",
954
+ "required": [
955
+ "user_id",
956
+ "read_at"
957
+ ],
958
+ "properties": {
959
+ "user_id": {
960
+ "$ref": "#/$defs/Id"
961
+ },
962
+ "read_at": {
963
+ "$ref": "#/$defs/Timestamp"
964
+ }
965
+ }
966
+ },
967
+ "ForwardedFrom": {
968
+ "type": "object",
969
+ "required": [
970
+ "message_id",
971
+ "sender_id",
972
+ "sender_name"
973
+ ],
974
+ "properties": {
975
+ "message_id": {
976
+ "$ref": "#/$defs/Id"
977
+ },
978
+ "sender_id": {
979
+ "oneOf": [
980
+ {
981
+ "$ref": "#/$defs/Id"
982
+ },
983
+ {
984
+ "type": "null"
985
+ }
986
+ ]
987
+ },
988
+ "sender_name": {
989
+ "type": "string"
990
+ }
991
+ }
992
+ },
993
+ "Message": {
994
+ "type": "object",
995
+ "required": [
996
+ "id",
997
+ "chat_id",
998
+ "type",
999
+ "sender",
1000
+ "content",
1001
+ "attachment",
1002
+ "reply_to",
1003
+ "forwarded_from",
1004
+ "reactions",
1005
+ "read_by",
1006
+ "created_at",
1007
+ "edited_at",
1008
+ "is_deleted"
1009
+ ],
1010
+ "properties": {
1011
+ "id": {
1012
+ "$ref": "#/$defs/Id"
1013
+ },
1014
+ "chat_id": {
1015
+ "$ref": "#/$defs/Id"
1016
+ },
1017
+ "type": {
1018
+ "$ref": "#/$defs/MessageType"
1019
+ },
1020
+ "sender": {
1021
+ "description": "`null` for system messages.",
1022
+ "oneOf": [
1023
+ {
1024
+ "$ref": "#/$defs/User"
1025
+ },
1026
+ {
1027
+ "type": "null"
1028
+ }
1029
+ ]
1030
+ },
1031
+ "content": {
1032
+ "type": [
1033
+ "string",
1034
+ "null"
1035
+ ],
1036
+ "maxLength": 4096,
1037
+ "description": "Text, or the caption of a file; `null` when deleted."
1038
+ },
1039
+ "attachment": {
1040
+ "oneOf": [
1041
+ {
1042
+ "$ref": "#/$defs/Attachment"
1043
+ },
1044
+ {
1045
+ "type": "null"
1046
+ }
1047
+ ]
1048
+ },
1049
+ "reply_to": {
1050
+ "oneOf": [
1051
+ {
1052
+ "$ref": "#/$defs/Id"
1053
+ },
1054
+ {
1055
+ "type": "null"
1056
+ }
1057
+ ]
1058
+ },
1059
+ "forwarded_from": {
1060
+ "oneOf": [
1061
+ {
1062
+ "$ref": "#/$defs/ForwardedFrom"
1063
+ },
1064
+ {
1065
+ "type": "null"
1066
+ }
1067
+ ]
1068
+ },
1069
+ "reactions": {
1070
+ "type": "array",
1071
+ "items": {
1072
+ "$ref": "#/$defs/Reaction"
1073
+ }
1074
+ },
1075
+ "read_by": {
1076
+ "type": "array",
1077
+ "items": {
1078
+ "$ref": "#/$defs/ReadReceipt"
1079
+ }
1080
+ },
1081
+ "created_at": {
1082
+ "$ref": "#/$defs/Timestamp"
1083
+ },
1084
+ "edited_at": {
1085
+ "oneOf": [
1086
+ {
1087
+ "$ref": "#/$defs/Timestamp"
1088
+ },
1089
+ {
1090
+ "type": "null"
1091
+ }
1092
+ ]
1093
+ },
1094
+ "is_deleted": {
1095
+ "type": "boolean"
1096
+ },
1097
+ "client_temp_id": {
1098
+ "$ref": "#/$defs/ClientTempId"
1099
+ }
1100
+ }
1101
+ },
1102
+ "MessagePage": {
1103
+ "type": "object",
1104
+ "required": [
1105
+ "items",
1106
+ "next_cursor",
1107
+ "prev_cursor"
1108
+ ],
1109
+ "properties": {
1110
+ "items": {
1111
+ "type": "array",
1112
+ "description": "Oldest to newest",
1113
+ "items": {
1114
+ "$ref": "#/$defs/Message"
1115
+ }
1116
+ },
1117
+ "next_cursor": {
1118
+ "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",
1119
+ "oneOf": [
1120
+ {
1121
+ "$ref": "#/$defs/Id"
1122
+ },
1123
+ {
1124
+ "type": "null"
1125
+ }
1126
+ ]
1127
+ },
1128
+ "prev_cursor": {
1129
+ "description": "The opposite direction (`after` for the default request, `before` for an `after` request).",
1130
+ "oneOf": [
1131
+ {
1132
+ "$ref": "#/$defs/Id"
1133
+ },
1134
+ {
1135
+ "type": "null"
1136
+ }
1137
+ ]
1138
+ }
1139
+ }
1140
+ },
1141
+ "SearchHit": {
1142
+ "type": "object",
1143
+ "required": [
1144
+ "message"
1145
+ ],
1146
+ "properties": {
1147
+ "message": {
1148
+ "$ref": "#/$defs/Message"
1149
+ },
1150
+ "highlight": {
1151
+ "type": [
1152
+ "string",
1153
+ "null"
1154
+ ],
1155
+ "description": "Plain-text excerpt; never HTML."
1156
+ }
1157
+ }
1158
+ },
1159
+ "MessageSearchPage": {
1160
+ "type": "object",
1161
+ "required": [
1162
+ "items",
1163
+ "next_cursor"
1164
+ ],
1165
+ "properties": {
1166
+ "items": {
1167
+ "type": "array",
1168
+ "items": {
1169
+ "$ref": "#/$defs/SearchHit"
1170
+ }
1171
+ },
1172
+ "next_cursor": {
1173
+ "$ref": "#/$defs/Cursor"
1174
+ }
1175
+ }
1176
+ },
1177
+ "SendMessageRequest": {
1178
+ "type": "object",
1179
+ "required": [
1180
+ "client_temp_id",
1181
+ "type"
1182
+ ],
1183
+ "properties": {
1184
+ "client_temp_id": {
1185
+ "$ref": "#/$defs/ClientTempId"
1186
+ },
1187
+ "type": {
1188
+ "type": "string",
1189
+ "enum": [
1190
+ "text",
1191
+ "file",
1192
+ "voice"
1193
+ ]
1194
+ },
1195
+ "content": {
1196
+ "type": [
1197
+ "string",
1198
+ "null"
1199
+ ],
1200
+ "maxLength": 4096
1201
+ },
1202
+ "attachment_id": {
1203
+ "description": "Required and not null for `file` and `voice`; never a URL.",
1204
+ "oneOf": [
1205
+ {
1206
+ "$ref": "#/$defs/Id"
1207
+ },
1208
+ {
1209
+ "type": "null"
1210
+ }
1211
+ ]
1212
+ },
1213
+ "reply_to": {
1214
+ "oneOf": [
1215
+ {
1216
+ "$ref": "#/$defs/Id"
1217
+ },
1218
+ {
1219
+ "type": "null"
1220
+ }
1221
+ ]
1222
+ }
1223
+ },
1224
+ "if": {
1225
+ "properties": {
1226
+ "type": {
1227
+ "enum": [
1228
+ "file",
1229
+ "voice"
1230
+ ]
1231
+ }
1232
+ }
1233
+ },
1234
+ "then": {
1235
+ "required": [
1236
+ "attachment_id"
1237
+ ],
1238
+ "properties": {
1239
+ "attachment_id": {
1240
+ "$ref": "#/$defs/Id"
1241
+ }
1242
+ }
1243
+ },
1244
+ "else": {
1245
+ "required": [
1246
+ "content"
1247
+ ],
1248
+ "properties": {
1249
+ "content": {
1250
+ "type": "string",
1251
+ "minLength": 1,
1252
+ "maxLength": 4096
1253
+ },
1254
+ "attachment_id": {
1255
+ "not": {}
1256
+ }
1257
+ }
1258
+ }
1259
+ },
1260
+ "EditMessageRequest": {
1261
+ "type": "object",
1262
+ "required": [
1263
+ "content"
1264
+ ],
1265
+ "properties": {
1266
+ "content": {
1267
+ "type": "string",
1268
+ "minLength": 1,
1269
+ "maxLength": 4096
1270
+ }
1271
+ }
1272
+ },
1273
+ "ForwardMessageRequest": {
1274
+ "type": "object",
1275
+ "required": [
1276
+ "chat_ids"
1277
+ ],
1278
+ "properties": {
1279
+ "chat_ids": {
1280
+ "type": "array",
1281
+ "minItems": 1,
1282
+ "maxItems": 20,
1283
+ "uniqueItems": true,
1284
+ "items": {
1285
+ "$ref": "#/$defs/Id"
1286
+ }
1287
+ }
1288
+ }
1289
+ },
1290
+ "MarkReadRequest": {
1291
+ "type": "object",
1292
+ "required": [
1293
+ "message_id"
1294
+ ],
1295
+ "properties": {
1296
+ "message_id": {
1297
+ "description": "Everything up to and including this message is read.",
1298
+ "$ref": "#/$defs/Id"
1299
+ }
1300
+ }
1301
+ },
1302
+ "ChatType": {
1303
+ "type": "string",
1304
+ "enum": [
1305
+ "direct",
1306
+ "group"
1307
+ ]
1308
+ },
1309
+ "GroupRole": {
1310
+ "type": "string",
1311
+ "enum": [
1312
+ "owner",
1313
+ "admin",
1314
+ "member"
1315
+ ]
1316
+ },
1317
+ "Chat": {
1318
+ "type": "object",
1319
+ "required": [
1320
+ "id",
1321
+ "type",
1322
+ "name",
1323
+ "avatar_url",
1324
+ "peer",
1325
+ "is_pinned",
1326
+ "unread_count",
1327
+ "last_message",
1328
+ "created_at"
1329
+ ],
1330
+ "properties": {
1331
+ "id": {
1332
+ "$ref": "#/$defs/Id"
1333
+ },
1334
+ "type": {
1335
+ "$ref": "#/$defs/ChatType"
1336
+ },
1337
+ "name": {
1338
+ "type": "string",
1339
+ "description": "Display name of the peer or the group"
1340
+ },
1341
+ "avatar_url": {
1342
+ "type": [
1343
+ "string",
1344
+ "null"
1345
+ ]
1346
+ },
1347
+ "peer": {
1348
+ "description": "The other user of a direct chat; `null` for groups.",
1349
+ "oneOf": [
1350
+ {
1351
+ "$ref": "#/$defs/User"
1352
+ },
1353
+ {
1354
+ "type": "null"
1355
+ }
1356
+ ]
1357
+ },
1358
+ "is_pinned": {
1359
+ "type": "boolean"
1360
+ },
1361
+ "unread_count": {
1362
+ "type": "integer",
1363
+ "minimum": 0
1364
+ },
1365
+ "last_message": {
1366
+ "oneOf": [
1367
+ {
1368
+ "$ref": "#/$defs/Message"
1369
+ },
1370
+ {
1371
+ "type": "null"
1372
+ }
1373
+ ]
1374
+ },
1375
+ "my_role": {
1376
+ "description": "Only for groups.",
1377
+ "oneOf": [
1378
+ {
1379
+ "$ref": "#/$defs/GroupRole"
1380
+ },
1381
+ {
1382
+ "type": "null"
1383
+ }
1384
+ ]
1385
+ },
1386
+ "created_at": {
1387
+ "$ref": "#/$defs/Timestamp"
1388
+ }
1389
+ }
1390
+ },
1391
+ "ChatPage": {
1392
+ "type": "object",
1393
+ "required": [
1394
+ "items",
1395
+ "next_cursor"
1396
+ ],
1397
+ "properties": {
1398
+ "items": {
1399
+ "type": "array",
1400
+ "items": {
1401
+ "$ref": "#/$defs/Chat"
1402
+ }
1403
+ },
1404
+ "next_cursor": {
1405
+ "$ref": "#/$defs/Cursor"
1406
+ }
1407
+ }
1408
+ },
1409
+ "CreateChatRequest": {
1410
+ "type": "object",
1411
+ "required": [
1412
+ "user_id"
1413
+ ],
1414
+ "properties": {
1415
+ "user_id": {
1416
+ "$ref": "#/$defs/Id"
1417
+ },
1418
+ "initial_message": {
1419
+ "type": [
1420
+ "string",
1421
+ "null"
1422
+ ],
1423
+ "maxLength": 4096
1424
+ }
1425
+ }
1426
+ },
1427
+ "GroupMember": {
1428
+ "type": "object",
1429
+ "required": [
1430
+ "user",
1431
+ "role",
1432
+ "joined_at"
1433
+ ],
1434
+ "properties": {
1435
+ "user": {
1436
+ "$ref": "#/$defs/User"
1437
+ },
1438
+ "role": {
1439
+ "$ref": "#/$defs/GroupRole"
1440
+ },
1441
+ "joined_at": {
1442
+ "$ref": "#/$defs/Timestamp"
1443
+ }
1444
+ }
1445
+ },
1446
+ "Group": {
1447
+ "type": "object",
1448
+ "required": [
1449
+ "id",
1450
+ "name",
1451
+ "description",
1452
+ "avatar_url",
1453
+ "owner_id",
1454
+ "my_role",
1455
+ "members",
1456
+ "created_at"
1457
+ ],
1458
+ "properties": {
1459
+ "id": {
1460
+ "$ref": "#/$defs/Id"
1461
+ },
1462
+ "name": {
1463
+ "type": "string",
1464
+ "minLength": 1,
1465
+ "maxLength": 64
1466
+ },
1467
+ "description": {
1468
+ "type": [
1469
+ "string",
1470
+ "null"
1471
+ ],
1472
+ "maxLength": 500
1473
+ },
1474
+ "avatar_url": {
1475
+ "type": [
1476
+ "string",
1477
+ "null"
1478
+ ]
1479
+ },
1480
+ "owner_id": {
1481
+ "$ref": "#/$defs/Id"
1482
+ },
1483
+ "my_role": {
1484
+ "$ref": "#/$defs/GroupRole"
1485
+ },
1486
+ "members": {
1487
+ "type": "array",
1488
+ "items": {
1489
+ "$ref": "#/$defs/GroupMember"
1490
+ }
1491
+ },
1492
+ "created_at": {
1493
+ "$ref": "#/$defs/Timestamp"
1494
+ }
1495
+ }
1496
+ },
1497
+ "CreateGroupRequest": {
1498
+ "type": "object",
1499
+ "required": [
1500
+ "name",
1501
+ "member_ids"
1502
+ ],
1503
+ "properties": {
1504
+ "name": {
1505
+ "type": "string",
1506
+ "minLength": 1,
1507
+ "maxLength": 64
1508
+ },
1509
+ "description": {
1510
+ "type": [
1511
+ "string",
1512
+ "null"
1513
+ ],
1514
+ "maxLength": 500
1515
+ },
1516
+ "member_ids": {
1517
+ "type": "array",
1518
+ "maxItems": 200,
1519
+ "uniqueItems": true,
1520
+ "items": {
1521
+ "$ref": "#/$defs/Id"
1522
+ }
1523
+ }
1524
+ }
1525
+ },
1526
+ "UpdateGroupRequest": {
1527
+ "type": "object",
1528
+ "minProperties": 1,
1529
+ "properties": {
1530
+ "name": {
1531
+ "type": "string",
1532
+ "minLength": 1,
1533
+ "maxLength": 64
1534
+ },
1535
+ "description": {
1536
+ "type": [
1537
+ "string",
1538
+ "null"
1539
+ ],
1540
+ "maxLength": 500
1541
+ }
1542
+ }
1543
+ },
1544
+ "AddParticipantRequest": {
1545
+ "type": "object",
1546
+ "required": [
1547
+ "user_id"
1548
+ ],
1549
+ "properties": {
1550
+ "user_id": {
1551
+ "$ref": "#/$defs/Id"
1552
+ }
1553
+ }
1554
+ },
1555
+ "UpdateRoleRequest": {
1556
+ "type": "object",
1557
+ "required": [
1558
+ "role"
1559
+ ],
1560
+ "properties": {
1561
+ "role": {
1562
+ "type": "string",
1563
+ "enum": [
1564
+ "admin",
1565
+ "member"
1566
+ ]
1567
+ }
1568
+ }
1569
+ },
1570
+ "TransferOwnerRequest": {
1571
+ "type": "object",
1572
+ "required": [
1573
+ "user_id"
1574
+ ],
1575
+ "properties": {
1576
+ "user_id": {
1577
+ "$ref": "#/$defs/Id"
1578
+ }
1579
+ }
1580
+ },
1581
+ "ApprovalRequestType": {
1582
+ "type": "string",
1583
+ "enum": [
1584
+ "direct_message",
1585
+ "group_invite"
1586
+ ]
1587
+ },
1588
+ "ApprovalRequestStatus": {
1589
+ "type": "string",
1590
+ "enum": [
1591
+ "pending",
1592
+ "approved",
1593
+ "rejected"
1594
+ ]
1595
+ },
1596
+ "ApprovalRequest": {
1597
+ "type": "object",
1598
+ "required": [
1599
+ "id",
1600
+ "type",
1601
+ "status",
1602
+ "requester",
1603
+ "created_at"
1604
+ ],
1605
+ "properties": {
1606
+ "id": {
1607
+ "$ref": "#/$defs/Id"
1608
+ },
1609
+ "type": {
1610
+ "$ref": "#/$defs/ApprovalRequestType"
1611
+ },
1612
+ "status": {
1613
+ "$ref": "#/$defs/ApprovalRequestStatus"
1614
+ },
1615
+ "requester": {
1616
+ "$ref": "#/$defs/User"
1617
+ },
1618
+ "group_name": {
1619
+ "type": [
1620
+ "string",
1621
+ "null"
1622
+ ],
1623
+ "description": "Only for `group_invite`"
1624
+ },
1625
+ "preview": {
1626
+ "type": [
1627
+ "string",
1628
+ "null"
1629
+ ],
1630
+ "description": "First message of a direct-message request"
1631
+ },
1632
+ "created_at": {
1633
+ "$ref": "#/$defs/Timestamp"
1634
+ }
1635
+ }
1636
+ },
1637
+ "ClientDeleteEvent": {
1638
+ "title": "ClientDeleteEvent",
1639
+ "description": "Delete a message for yourself or for everyone.",
1640
+ "type": "object",
1641
+ "properties": {
1642
+ "type": {
1643
+ "const": "delete"
1644
+ },
1645
+ "client_temp_id": {
1646
+ "$ref": "#/$defs/ClientTempId"
1647
+ },
1648
+ "chat_id": {
1649
+ "$ref": "#/$defs/Id"
1650
+ },
1651
+ "data": {
1652
+ "type": "object",
1653
+ "properties": {
1654
+ "message_id": {
1655
+ "$ref": "#/$defs/Id"
1656
+ },
1657
+ "scope": {
1658
+ "type": "string",
1659
+ "enum": [
1660
+ "me",
1661
+ "everyone"
1662
+ ]
1663
+ }
1664
+ },
1665
+ "required": [
1666
+ "message_id",
1667
+ "scope"
1668
+ ],
1669
+ "additionalProperties": false
1670
+ }
1671
+ },
1672
+ "required": [
1673
+ "type",
1674
+ "client_temp_id",
1675
+ "chat_id",
1676
+ "data"
1677
+ ],
1678
+ "additionalProperties": false
1679
+ },
1680
+ "ClientEditEvent": {
1681
+ "title": "ClientEditEvent",
1682
+ "description": "Edit your own text message.",
1683
+ "type": "object",
1684
+ "properties": {
1685
+ "type": {
1686
+ "const": "edit"
1687
+ },
1688
+ "client_temp_id": {
1689
+ "$ref": "#/$defs/ClientTempId"
1690
+ },
1691
+ "chat_id": {
1692
+ "$ref": "#/$defs/Id"
1693
+ },
1694
+ "data": {
1695
+ "type": "object",
1696
+ "properties": {
1697
+ "message_id": {
1698
+ "$ref": "#/$defs/Id"
1699
+ },
1700
+ "content": {
1701
+ "type": "string",
1702
+ "minLength": 1,
1703
+ "maxLength": 4096
1704
+ }
1705
+ },
1706
+ "required": [
1707
+ "message_id",
1708
+ "content"
1709
+ ],
1710
+ "additionalProperties": false
1711
+ }
1712
+ },
1713
+ "required": [
1714
+ "type",
1715
+ "client_temp_id",
1716
+ "chat_id",
1717
+ "data"
1718
+ ],
1719
+ "additionalProperties": false
1720
+ },
1721
+ "ClientMessageEvent": {
1722
+ "title": "ClientMessageEvent",
1723
+ "description": "Send a message. Idempotent per `client_temp_id`; answered with `ack` or `error`.",
1724
+ "type": "object",
1725
+ "properties": {
1726
+ "type": {
1727
+ "const": "message"
1728
+ },
1729
+ "client_temp_id": {
1730
+ "$ref": "#/$defs/ClientTempId"
1731
+ },
1732
+ "chat_id": {
1733
+ "$ref": "#/$defs/Id"
1734
+ },
1735
+ "data": {
1736
+ "oneOf": [
1737
+ {
1738
+ "type": "object",
1739
+ "title": "TextMessageData",
1740
+ "properties": {
1741
+ "type": {
1742
+ "const": "text"
1743
+ },
1744
+ "content": {
1745
+ "type": "string",
1746
+ "minLength": 1,
1747
+ "maxLength": 4096
1748
+ },
1749
+ "reply_to": {
1750
+ "oneOf": [
1751
+ {
1752
+ "$ref": "#/$defs/Id"
1753
+ },
1754
+ {
1755
+ "type": "null"
1756
+ }
1757
+ ]
1758
+ }
1759
+ },
1760
+ "required": [
1761
+ "type",
1762
+ "content"
1763
+ ],
1764
+ "additionalProperties": false
1765
+ },
1766
+ {
1767
+ "type": "object",
1768
+ "title": "AttachmentMessageData",
1769
+ "description": "`file` and `voice` messages reference an uploaded attachment by ID, never by URL.",
1770
+ "properties": {
1771
+ "type": {
1772
+ "enum": [
1773
+ "file",
1774
+ "voice"
1775
+ ]
1776
+ },
1777
+ "content": {
1778
+ "type": [
1779
+ "string",
1780
+ "null"
1781
+ ],
1782
+ "maxLength": 4096,
1783
+ "description": "Optional caption"
1784
+ },
1785
+ "attachment_id": {
1786
+ "$ref": "#/$defs/Id"
1787
+ },
1788
+ "reply_to": {
1789
+ "oneOf": [
1790
+ {
1791
+ "$ref": "#/$defs/Id"
1792
+ },
1793
+ {
1794
+ "type": "null"
1795
+ }
1796
+ ]
1797
+ }
1798
+ },
1799
+ "required": [
1800
+ "type",
1801
+ "attachment_id"
1802
+ ],
1803
+ "additionalProperties": false
1804
+ }
1805
+ ]
1806
+ }
1807
+ },
1808
+ "required": [
1809
+ "type",
1810
+ "client_temp_id",
1811
+ "chat_id",
1812
+ "data"
1813
+ ],
1814
+ "additionalProperties": false
1815
+ },
1816
+ "ClientReactionAddEvent": {
1817
+ "title": "ClientReactionAddEvent",
1818
+ "description": "Add a reaction.",
1819
+ "type": "object",
1820
+ "properties": {
1821
+ "type": {
1822
+ "const": "reaction_add"
1823
+ },
1824
+ "client_temp_id": {
1825
+ "$ref": "#/$defs/ClientTempId"
1826
+ },
1827
+ "chat_id": {
1828
+ "$ref": "#/$defs/Id"
1829
+ },
1830
+ "data": {
1831
+ "type": "object",
1832
+ "properties": {
1833
+ "message_id": {
1834
+ "$ref": "#/$defs/Id"
1835
+ },
1836
+ "emoji": {
1837
+ "type": "string",
1838
+ "minLength": 1,
1839
+ "maxLength": 32
1840
+ }
1841
+ },
1842
+ "required": [
1843
+ "message_id",
1844
+ "emoji"
1845
+ ],
1846
+ "additionalProperties": false
1847
+ }
1848
+ },
1849
+ "required": [
1850
+ "type",
1851
+ "client_temp_id",
1852
+ "chat_id",
1853
+ "data"
1854
+ ],
1855
+ "additionalProperties": false
1856
+ },
1857
+ "ClientReactionRemoveEvent": {
1858
+ "title": "ClientReactionRemoveEvent",
1859
+ "description": "Remove your reaction.",
1860
+ "type": "object",
1861
+ "properties": {
1862
+ "type": {
1863
+ "const": "reaction_remove"
1864
+ },
1865
+ "client_temp_id": {
1866
+ "$ref": "#/$defs/ClientTempId"
1867
+ },
1868
+ "chat_id": {
1869
+ "$ref": "#/$defs/Id"
1870
+ },
1871
+ "data": {
1872
+ "type": "object",
1873
+ "properties": {
1874
+ "message_id": {
1875
+ "$ref": "#/$defs/Id"
1876
+ },
1877
+ "emoji": {
1878
+ "type": "string",
1879
+ "minLength": 1,
1880
+ "maxLength": 32
1881
+ }
1882
+ },
1883
+ "required": [
1884
+ "message_id",
1885
+ "emoji"
1886
+ ],
1887
+ "additionalProperties": false
1888
+ }
1889
+ },
1890
+ "required": [
1891
+ "type",
1892
+ "client_temp_id",
1893
+ "chat_id",
1894
+ "data"
1895
+ ],
1896
+ "additionalProperties": false
1897
+ },
1898
+ "ClientReadEvent": {
1899
+ "title": "ClientReadEvent",
1900
+ "description": "Mark messages as read up to and including `message_id`.",
1901
+ "type": "object",
1902
+ "properties": {
1903
+ "type": {
1904
+ "const": "read"
1905
+ },
1906
+ "client_temp_id": {
1907
+ "$ref": "#/$defs/ClientTempId"
1908
+ },
1909
+ "chat_id": {
1910
+ "$ref": "#/$defs/Id"
1911
+ },
1912
+ "data": {
1913
+ "type": "object",
1914
+ "properties": {
1915
+ "message_id": {
1916
+ "$ref": "#/$defs/Id"
1917
+ }
1918
+ },
1919
+ "required": [
1920
+ "message_id"
1921
+ ],
1922
+ "additionalProperties": false
1923
+ }
1924
+ },
1925
+ "required": [
1926
+ "type",
1927
+ "client_temp_id",
1928
+ "chat_id",
1929
+ "data"
1930
+ ],
1931
+ "additionalProperties": false
1932
+ },
1933
+ "ClientResendEvent": {
1934
+ "title": "ClientResendEvent",
1935
+ "description": "Ask the server to deliver a message again that was saved but not delivered.",
1936
+ "type": "object",
1937
+ "properties": {
1938
+ "type": {
1939
+ "const": "resend"
1940
+ },
1941
+ "client_temp_id": {
1942
+ "$ref": "#/$defs/ClientTempId"
1943
+ },
1944
+ "chat_id": {
1945
+ "$ref": "#/$defs/Id"
1946
+ },
1947
+ "data": {
1948
+ "type": "object",
1949
+ "properties": {
1950
+ "message_id": {
1951
+ "$ref": "#/$defs/Id"
1952
+ }
1953
+ },
1954
+ "required": [
1955
+ "message_id"
1956
+ ],
1957
+ "additionalProperties": false
1958
+ }
1959
+ },
1960
+ "required": [
1961
+ "type",
1962
+ "client_temp_id",
1963
+ "chat_id",
1964
+ "data"
1965
+ ],
1966
+ "additionalProperties": false
1967
+ },
1968
+ "ClientTypingEvent": {
1969
+ "title": "ClientTypingEvent",
1970
+ "description": "Tell the chat that you are (not) typing. Not acknowledged, so it carries no `client_temp_id`.",
1971
+ "type": "object",
1972
+ "properties": {
1973
+ "type": {
1974
+ "const": "typing"
1975
+ },
1976
+ "chat_id": {
1977
+ "$ref": "#/$defs/Id"
1978
+ },
1979
+ "data": {
1980
+ "type": "object",
1981
+ "properties": {
1982
+ "is_typing": {
1983
+ "type": "boolean"
1984
+ }
1985
+ },
1986
+ "required": [
1987
+ "is_typing"
1988
+ ],
1989
+ "additionalProperties": false
1990
+ }
1991
+ },
1992
+ "required": [
1993
+ "type",
1994
+ "chat_id",
1995
+ "data"
1996
+ ],
1997
+ "additionalProperties": false
1998
+ },
1999
+ "ServerAckEvent": {
2000
+ "title": "ServerAckEvent",
2001
+ "description": "The server accepted the client event with this `client_temp_id`.",
2002
+ "type": "object",
2003
+ "properties": {
2004
+ "type": {
2005
+ "const": "ack"
2006
+ },
2007
+ "event_id": {
2008
+ "$ref": "#/$defs/Id"
2009
+ },
2010
+ "chat_id": {
2011
+ "oneOf": [
2012
+ {
2013
+ "$ref": "#/$defs/Id"
2014
+ },
2015
+ {
2016
+ "type": "null"
2017
+ }
2018
+ ]
2019
+ },
2020
+ "data": {
2021
+ "description": "Result of the client event. A `message` is answered with the stored `message_id` and `created_at`; every other event with an empty object.",
2022
+ "oneOf": [
2023
+ {
2024
+ "type": "object",
2025
+ "title": "MessageAckData",
2026
+ "properties": {
2027
+ "message_id": {
2028
+ "$ref": "#/$defs/Id"
2029
+ },
2030
+ "created_at": {
2031
+ "$ref": "#/$defs/Timestamp"
2032
+ }
2033
+ },
2034
+ "required": [
2035
+ "message_id",
2036
+ "created_at"
2037
+ ]
2038
+ },
2039
+ {
2040
+ "type": "object",
2041
+ "title": "EmptyAckData",
2042
+ "properties": {
2043
+ "message_id": {
2044
+ "not": {}
2045
+ },
2046
+ "created_at": {
2047
+ "not": {}
2048
+ }
2049
+ }
2050
+ }
2051
+ ]
2052
+ },
2053
+ "client_temp_id": {
2054
+ "$ref": "#/$defs/ClientTempId"
2055
+ }
2056
+ },
2057
+ "required": [
2058
+ "type",
2059
+ "event_id",
2060
+ "chat_id",
2061
+ "data",
2062
+ "client_temp_id"
2063
+ ]
2064
+ },
2065
+ "ServerApprovalRequestCreatedEvent": {
2066
+ "title": "ServerApprovalRequestCreatedEvent",
2067
+ "description": "A new request waits in your inbox.",
2068
+ "type": "object",
2069
+ "properties": {
2070
+ "type": {
2071
+ "const": "approval_request_created"
2072
+ },
2073
+ "event_id": {
2074
+ "$ref": "#/$defs/Id"
2075
+ },
2076
+ "chat_id": {
2077
+ "type": "null"
2078
+ },
2079
+ "data": {
2080
+ "type": "object",
2081
+ "properties": {
2082
+ "request": {
2083
+ "$ref": "#/$defs/ApprovalRequest"
2084
+ }
2085
+ },
2086
+ "required": [
2087
+ "request"
2088
+ ]
2089
+ }
2090
+ },
2091
+ "required": [
2092
+ "type",
2093
+ "event_id",
2094
+ "chat_id",
2095
+ "data"
2096
+ ]
2097
+ },
2098
+ "ServerChatCreatedEvent": {
2099
+ "title": "ServerChatCreatedEvent",
2100
+ "description": "A chat was created with you.",
2101
+ "type": "object",
2102
+ "properties": {
2103
+ "type": {
2104
+ "const": "chat_created"
2105
+ },
2106
+ "event_id": {
2107
+ "$ref": "#/$defs/Id"
2108
+ },
2109
+ "chat_id": {
2110
+ "$ref": "#/$defs/Id"
2111
+ },
2112
+ "data": {
2113
+ "type": "object",
2114
+ "properties": {
2115
+ "chat": {
2116
+ "$ref": "#/$defs/Chat"
2117
+ }
2118
+ },
2119
+ "required": [
2120
+ "chat"
2121
+ ]
2122
+ }
2123
+ },
2124
+ "required": [
2125
+ "type",
2126
+ "event_id",
2127
+ "chat_id",
2128
+ "data"
2129
+ ]
2130
+ },
2131
+ "ServerChatDeletedEvent": {
2132
+ "title": "ServerChatDeletedEvent",
2133
+ "description": "A chat was deleted, or you were removed from it.",
2134
+ "type": "object",
2135
+ "properties": {
2136
+ "type": {
2137
+ "const": "chat_deleted"
2138
+ },
2139
+ "event_id": {
2140
+ "$ref": "#/$defs/Id"
2141
+ },
2142
+ "chat_id": {
2143
+ "$ref": "#/$defs/Id"
2144
+ },
2145
+ "data": {
2146
+ "type": "object",
2147
+ "properties": {},
2148
+ "required": []
2149
+ }
2150
+ },
2151
+ "required": [
2152
+ "type",
2153
+ "event_id",
2154
+ "chat_id",
2155
+ "data"
2156
+ ]
2157
+ },
2158
+ "ServerChatListUpdateEvent": {
2159
+ "title": "ServerChatListUpdateEvent",
2160
+ "description": "The chat-list entry changed (last message, unread count, pin).",
2161
+ "type": "object",
2162
+ "properties": {
2163
+ "type": {
2164
+ "const": "chat_list_update"
2165
+ },
2166
+ "event_id": {
2167
+ "$ref": "#/$defs/Id"
2168
+ },
2169
+ "chat_id": {
2170
+ "$ref": "#/$defs/Id"
2171
+ },
2172
+ "data": {
2173
+ "type": "object",
2174
+ "properties": {
2175
+ "chat": {
2176
+ "$ref": "#/$defs/Chat"
2177
+ }
2178
+ },
2179
+ "required": [
2180
+ "chat"
2181
+ ]
2182
+ }
2183
+ },
2184
+ "required": [
2185
+ "type",
2186
+ "event_id",
2187
+ "chat_id",
2188
+ "data"
2189
+ ]
2190
+ },
2191
+ "ServerDeleteEvent": {
2192
+ "title": "ServerDeleteEvent",
2193
+ "description": "A message was deleted for everyone (deleting for yourself is only sent to your other devices).",
2194
+ "type": "object",
2195
+ "properties": {
2196
+ "type": {
2197
+ "const": "delete"
2198
+ },
2199
+ "event_id": {
2200
+ "$ref": "#/$defs/Id"
2201
+ },
2202
+ "chat_id": {
2203
+ "$ref": "#/$defs/Id"
2204
+ },
2205
+ "data": {
2206
+ "type": "object",
2207
+ "properties": {
2208
+ "message_id": {
2209
+ "$ref": "#/$defs/Id"
2210
+ },
2211
+ "scope": {
2212
+ "type": "string",
2213
+ "enum": [
2214
+ "me",
2215
+ "everyone"
2216
+ ]
2217
+ }
2218
+ },
2219
+ "required": [
2220
+ "message_id",
2221
+ "scope"
2222
+ ]
2223
+ }
2224
+ },
2225
+ "required": [
2226
+ "type",
2227
+ "event_id",
2228
+ "chat_id",
2229
+ "data"
2230
+ ]
2231
+ },
2232
+ "ServerEditEvent": {
2233
+ "title": "ServerEditEvent",
2234
+ "description": "A message was edited.",
2235
+ "type": "object",
2236
+ "properties": {
2237
+ "type": {
2238
+ "const": "edit"
2239
+ },
2240
+ "event_id": {
2241
+ "$ref": "#/$defs/Id"
2242
+ },
2243
+ "chat_id": {
2244
+ "$ref": "#/$defs/Id"
2245
+ },
2246
+ "data": {
2247
+ "type": "object",
2248
+ "properties": {
2249
+ "message": {
2250
+ "$ref": "#/$defs/Message"
2251
+ }
2252
+ },
2253
+ "required": [
2254
+ "message"
2255
+ ]
2256
+ }
2257
+ },
2258
+ "required": [
2259
+ "type",
2260
+ "event_id",
2261
+ "chat_id",
2262
+ "data"
2263
+ ]
2264
+ },
2265
+ "ServerErrorEvent": {
2266
+ "title": "ServerErrorEvent",
2267
+ "description": "The server rejected the client event with this `client_temp_id`, or a connection-level error occurred.",
2268
+ "type": "object",
2269
+ "properties": {
2270
+ "type": {
2271
+ "const": "error"
2272
+ },
2273
+ "event_id": {
2274
+ "$ref": "#/$defs/Id"
2275
+ },
2276
+ "chat_id": {
2277
+ "oneOf": [
2278
+ {
2279
+ "$ref": "#/$defs/Id"
2280
+ },
2281
+ {
2282
+ "type": "null"
2283
+ }
2284
+ ]
2285
+ },
2286
+ "data": {
2287
+ "type": "object",
2288
+ "properties": {
2289
+ "code": {
2290
+ "$ref": "#/$defs/ErrorCode"
2291
+ },
2292
+ "message": {
2293
+ "type": "string"
2294
+ }
2295
+ },
2296
+ "required": [
2297
+ "code"
2298
+ ]
2299
+ },
2300
+ "client_temp_id": {
2301
+ "$ref": "#/$defs/ClientTempId"
2302
+ }
2303
+ },
2304
+ "required": [
2305
+ "type",
2306
+ "event_id",
2307
+ "chat_id",
2308
+ "data"
2309
+ ]
2310
+ },
2311
+ "ServerGroupCreatedEvent": {
2312
+ "title": "ServerGroupCreatedEvent",
2313
+ "description": "You were added to a new group.",
2314
+ "type": "object",
2315
+ "properties": {
2316
+ "type": {
2317
+ "const": "group_created"
2318
+ },
2319
+ "event_id": {
2320
+ "$ref": "#/$defs/Id"
2321
+ },
2322
+ "chat_id": {
2323
+ "$ref": "#/$defs/Id"
2324
+ },
2325
+ "data": {
2326
+ "type": "object",
2327
+ "properties": {
2328
+ "group": {
2329
+ "$ref": "#/$defs/Group"
2330
+ }
2331
+ },
2332
+ "required": [
2333
+ "group"
2334
+ ]
2335
+ }
2336
+ },
2337
+ "required": [
2338
+ "type",
2339
+ "event_id",
2340
+ "chat_id",
2341
+ "data"
2342
+ ]
2343
+ },
2344
+ "ServerGroupUpdatedEvent": {
2345
+ "title": "ServerGroupUpdatedEvent",
2346
+ "description": "Name, description, avatar, members or roles of a group changed.",
2347
+ "type": "object",
2348
+ "properties": {
2349
+ "type": {
2350
+ "const": "group_updated"
2351
+ },
2352
+ "event_id": {
2353
+ "$ref": "#/$defs/Id"
2354
+ },
2355
+ "chat_id": {
2356
+ "$ref": "#/$defs/Id"
2357
+ },
2358
+ "data": {
2359
+ "type": "object",
2360
+ "properties": {
2361
+ "group": {
2362
+ "$ref": "#/$defs/Group"
2363
+ }
2364
+ },
2365
+ "required": [
2366
+ "group"
2367
+ ]
2368
+ }
2369
+ },
2370
+ "required": [
2371
+ "type",
2372
+ "event_id",
2373
+ "chat_id",
2374
+ "data"
2375
+ ]
2376
+ },
2377
+ "ServerHelloEvent": {
2378
+ "title": "ServerHelloEvent",
2379
+ "description": "First event after connecting, so clients that reconnect after a deploy learn the current contract.",
2380
+ "type": "object",
2381
+ "properties": {
2382
+ "type": {
2383
+ "const": "hello"
2384
+ },
2385
+ "event_id": {
2386
+ "$ref": "#/$defs/Id"
2387
+ },
2388
+ "chat_id": {
2389
+ "type": "null"
2390
+ },
2391
+ "data": {
2392
+ "type": "object",
2393
+ "properties": {
2394
+ "api_version": {
2395
+ "type": "string"
2396
+ },
2397
+ "min_client_api_version": {
2398
+ "type": "string"
2399
+ },
2400
+ "user_id": {
2401
+ "$ref": "#/$defs/Id"
2402
+ }
2403
+ },
2404
+ "required": [
2405
+ "api_version",
2406
+ "min_client_api_version",
2407
+ "user_id"
2408
+ ]
2409
+ }
2410
+ },
2411
+ "required": [
2412
+ "type",
2413
+ "event_id",
2414
+ "chat_id",
2415
+ "data"
2416
+ ]
2417
+ },
2418
+ "ServerMessageEvent": {
2419
+ "title": "ServerMessageEvent",
2420
+ "description": "A new message in a chat.",
2421
+ "type": "object",
2422
+ "properties": {
2423
+ "type": {
2424
+ "const": "message"
2425
+ },
2426
+ "event_id": {
2427
+ "$ref": "#/$defs/Id"
2428
+ },
2429
+ "chat_id": {
2430
+ "$ref": "#/$defs/Id"
2431
+ },
2432
+ "data": {
2433
+ "type": "object",
2434
+ "properties": {
2435
+ "message": {
2436
+ "$ref": "#/$defs/Message"
2437
+ }
2438
+ },
2439
+ "required": [
2440
+ "message"
2441
+ ]
2442
+ }
2443
+ },
2444
+ "required": [
2445
+ "type",
2446
+ "event_id",
2447
+ "chat_id",
2448
+ "data"
2449
+ ]
2450
+ },
2451
+ "ServerPresenceEvent": {
2452
+ "title": "ServerPresenceEvent",
2453
+ "description": "A user came online or went offline, as far as their privacy settings allow.",
2454
+ "type": "object",
2455
+ "properties": {
2456
+ "type": {
2457
+ "const": "presence"
2458
+ },
2459
+ "event_id": {
2460
+ "$ref": "#/$defs/Id"
2461
+ },
2462
+ "chat_id": {
2463
+ "type": "null"
2464
+ },
2465
+ "data": {
2466
+ "type": "object",
2467
+ "properties": {
2468
+ "user_id": {
2469
+ "$ref": "#/$defs/Id"
2470
+ },
2471
+ "is_online": {
2472
+ "type": "boolean"
2473
+ },
2474
+ "last_seen": {
2475
+ "oneOf": [
2476
+ {
2477
+ "$ref": "#/$defs/Timestamp"
2478
+ },
2479
+ {
2480
+ "type": "null"
2481
+ }
2482
+ ]
2483
+ }
2484
+ },
2485
+ "required": [
2486
+ "user_id",
2487
+ "is_online",
2488
+ "last_seen"
2489
+ ]
2490
+ }
2491
+ },
2492
+ "required": [
2493
+ "type",
2494
+ "event_id",
2495
+ "chat_id",
2496
+ "data"
2497
+ ]
2498
+ },
2499
+ "ServerReactionAddEvent": {
2500
+ "title": "ServerReactionAddEvent",
2501
+ "description": "A reaction was added.",
2502
+ "type": "object",
2503
+ "properties": {
2504
+ "type": {
2505
+ "const": "reaction_add"
2506
+ },
2507
+ "event_id": {
2508
+ "$ref": "#/$defs/Id"
2509
+ },
2510
+ "chat_id": {
2511
+ "$ref": "#/$defs/Id"
2512
+ },
2513
+ "data": {
2514
+ "type": "object",
2515
+ "properties": {
2516
+ "message_id": {
2517
+ "$ref": "#/$defs/Id"
2518
+ },
2519
+ "reaction": {
2520
+ "$ref": "#/$defs/Reaction"
2521
+ }
2522
+ },
2523
+ "required": [
2524
+ "message_id",
2525
+ "reaction"
2526
+ ]
2527
+ }
2528
+ },
2529
+ "required": [
2530
+ "type",
2531
+ "event_id",
2532
+ "chat_id",
2533
+ "data"
2534
+ ]
2535
+ },
2536
+ "ServerReactionRemoveEvent": {
2537
+ "title": "ServerReactionRemoveEvent",
2538
+ "description": "A reaction was removed.",
2539
+ "type": "object",
2540
+ "properties": {
2541
+ "type": {
2542
+ "const": "reaction_remove"
2543
+ },
2544
+ "event_id": {
2545
+ "$ref": "#/$defs/Id"
2546
+ },
2547
+ "chat_id": {
2548
+ "$ref": "#/$defs/Id"
2549
+ },
2550
+ "data": {
2551
+ "type": "object",
2552
+ "properties": {
2553
+ "message_id": {
2554
+ "$ref": "#/$defs/Id"
2555
+ },
2556
+ "reaction": {
2557
+ "$ref": "#/$defs/Reaction"
2558
+ }
2559
+ },
2560
+ "required": [
2561
+ "message_id",
2562
+ "reaction"
2563
+ ]
2564
+ }
2565
+ },
2566
+ "required": [
2567
+ "type",
2568
+ "event_id",
2569
+ "chat_id",
2570
+ "data"
2571
+ ]
2572
+ },
2573
+ "ServerReadEvent": {
2574
+ "title": "ServerReadEvent",
2575
+ "description": "A user read messages up to and including `message_id` (not sent when the reader turned read receipts off).",
2576
+ "type": "object",
2577
+ "properties": {
2578
+ "type": {
2579
+ "const": "read"
2580
+ },
2581
+ "event_id": {
2582
+ "$ref": "#/$defs/Id"
2583
+ },
2584
+ "chat_id": {
2585
+ "$ref": "#/$defs/Id"
2586
+ },
2587
+ "data": {
2588
+ "type": "object",
2589
+ "properties": {
2590
+ "message_id": {
2591
+ "$ref": "#/$defs/Id"
2592
+ },
2593
+ "user_id": {
2594
+ "$ref": "#/$defs/Id"
2595
+ },
2596
+ "read_at": {
2597
+ "$ref": "#/$defs/Timestamp"
2598
+ }
2599
+ },
2600
+ "required": [
2601
+ "message_id",
2602
+ "user_id",
2603
+ "read_at"
2604
+ ]
2605
+ }
2606
+ },
2607
+ "required": [
2608
+ "type",
2609
+ "event_id",
2610
+ "chat_id",
2611
+ "data"
2612
+ ]
2613
+ },
2614
+ "ServerTypingEvent": {
2615
+ "title": "ServerTypingEvent",
2616
+ "description": "A user started or stopped typing.",
2617
+ "type": "object",
2618
+ "properties": {
2619
+ "type": {
2620
+ "const": "typing"
2621
+ },
2622
+ "event_id": {
2623
+ "$ref": "#/$defs/Id"
2624
+ },
2625
+ "chat_id": {
2626
+ "$ref": "#/$defs/Id"
2627
+ },
2628
+ "data": {
2629
+ "type": "object",
2630
+ "properties": {
2631
+ "user_id": {
2632
+ "$ref": "#/$defs/Id"
2633
+ },
2634
+ "is_typing": {
2635
+ "type": "boolean"
2636
+ }
2637
+ },
2638
+ "required": [
2639
+ "user_id",
2640
+ "is_typing"
2641
+ ]
2642
+ }
2643
+ },
2644
+ "required": [
2645
+ "type",
2646
+ "event_id",
2647
+ "chat_id",
2648
+ "data"
2649
+ ]
2650
+ },
2651
+ "ClientEvent": {
2652
+ "title": "ClientEvent",
2653
+ "description": "Every event a client may send.",
2654
+ "oneOf": [
2655
+ {
2656
+ "$ref": "#/$defs/ClientDeleteEvent"
2657
+ },
2658
+ {
2659
+ "$ref": "#/$defs/ClientEditEvent"
2660
+ },
2661
+ {
2662
+ "$ref": "#/$defs/ClientMessageEvent"
2663
+ },
2664
+ {
2665
+ "$ref": "#/$defs/ClientReactionAddEvent"
2666
+ },
2667
+ {
2668
+ "$ref": "#/$defs/ClientReactionRemoveEvent"
2669
+ },
2670
+ {
2671
+ "$ref": "#/$defs/ClientReadEvent"
2672
+ },
2673
+ {
2674
+ "$ref": "#/$defs/ClientResendEvent"
2675
+ },
2676
+ {
2677
+ "$ref": "#/$defs/ClientTypingEvent"
2678
+ }
2679
+ ]
2680
+ },
2681
+ "ServerEvent": {
2682
+ "title": "ServerEvent",
2683
+ "description": "Every event the server may send.",
2684
+ "oneOf": [
2685
+ {
2686
+ "$ref": "#/$defs/ServerAckEvent"
2687
+ },
2688
+ {
2689
+ "$ref": "#/$defs/ServerApprovalRequestCreatedEvent"
2690
+ },
2691
+ {
2692
+ "$ref": "#/$defs/ServerChatCreatedEvent"
2693
+ },
2694
+ {
2695
+ "$ref": "#/$defs/ServerChatDeletedEvent"
2696
+ },
2697
+ {
2698
+ "$ref": "#/$defs/ServerChatListUpdateEvent"
2699
+ },
2700
+ {
2701
+ "$ref": "#/$defs/ServerDeleteEvent"
2702
+ },
2703
+ {
2704
+ "$ref": "#/$defs/ServerEditEvent"
2705
+ },
2706
+ {
2707
+ "$ref": "#/$defs/ServerErrorEvent"
2708
+ },
2709
+ {
2710
+ "$ref": "#/$defs/ServerGroupCreatedEvent"
2711
+ },
2712
+ {
2713
+ "$ref": "#/$defs/ServerGroupUpdatedEvent"
2714
+ },
2715
+ {
2716
+ "$ref": "#/$defs/ServerHelloEvent"
2717
+ },
2718
+ {
2719
+ "$ref": "#/$defs/ServerMessageEvent"
2720
+ },
2721
+ {
2722
+ "$ref": "#/$defs/ServerPresenceEvent"
2723
+ },
2724
+ {
2725
+ "$ref": "#/$defs/ServerReactionAddEvent"
2726
+ },
2727
+ {
2728
+ "$ref": "#/$defs/ServerReactionRemoveEvent"
2729
+ },
2730
+ {
2731
+ "$ref": "#/$defs/ServerReadEvent"
2732
+ },
2733
+ {
2734
+ "$ref": "#/$defs/ServerTypingEvent"
2735
+ }
2736
+ ]
2737
+ }
2738
+ }
2739
+ }