forked from team113/messenger
-
Notifications
You must be signed in to change notification settings - Fork 0
/
schema.graphql
9604 lines (7200 loc) · 250 KB
/
schema.graphql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
# Copyright © 2022-2024 IT ENGINEERING MANAGEMENT INC,
# <https://github.com/team113>
#
# This program is free software: you can redistribute it and/or modify it under
# the terms of the GNU Affero General Public License v3.0 as published by the
# Free Software Foundation, either version 3 of the License, or (at your
# option) any later version.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License v3.0 for
# more details.
#
# You should have received a copy of the GNU Affero General Public License v3.0
# along with this program. If not, see
# <https://www.gnu.org/licenses/agpl-3.0.html>.
directive @specifiedBy(url: String!) on SCALAR
"""
Type of a `Session`'s access token.
Its values are always considered to be non-empty and represent a
[valid Base64 string][1].
[1]: https://base64.guru/learn/base64-characters
"""
scalar AccessToken
"""Error of performing `Mutation.addChatMember`."""
type AddChatMemberError {
"""Code indicating why this error has happened."""
code: AddChatMemberErrorCode!
}
"""Possible error codes of performing `Mutation.addChatMember`."""
enum AddChatMemberErrorCode {
"""
Authenticated `MyUser` is blocked by the `User` he tries to add to the `Chat`.
Status code: 403 Forbidden.
"""
BLOCKED
"""
`Chat` is not a group, so cannot accept new members.
Status code: 403 Forbidden.
"""
NOT_GROUP
"""
`Chat` with the provided ID doesn't exist.
Status code: 404 Not Found.
"""
UNKNOWN_CHAT
"""
`User` with the provided ID doesn't exist.
Status code: 404 Not Found.
"""
UNKNOWN_USER
}
"""Result of performing `Mutation.addChatMember`."""
union AddChatMemberResult = AddChatMemberError | ChatEventsVersioned
"""Error of performing `Mutation.addUserEmail`."""
type AddUserEmailError {
"""Code indicating why this error has happened."""
code: AddUserEmailErrorCode!
}
"""Possible error codes of performing `Mutation.addUserEmail`."""
enum AddUserEmailErrorCode {
"""
Authenticated `MyUser` has its unconfirmed email address already set.
Status code: 409 Conflict.
"""
BUSY
"""
Authenticated `MyUser` has reached maximum allowed number of email addresses.
Status code: 403 Forbidden.
"""
TOO_MANY
}
"""Result of performing `Mutation.addUserEmail`."""
union AddUserEmailResult = AddUserEmailError | MyUserEventsVersioned
"""Error of performing `Mutation.addUserPhone`."""
type AddUserPhoneError {
"""Code indicating why this error has happened."""
code: AddUserPhoneErrorCode!
}
"""Possible error codes of performing `Mutation.addUserPhone`."""
enum AddUserPhoneErrorCode {
"""
Authenticated `MyUser` has its unconfirmed phone number already set.
Status code: 409 Conflict.
"""
BUSY
"""
Authenticated `MyUser` has reached maximum allowed number of phone numbers.
Status code: 403 Forbidden.
"""
TOO_MANY
}
"""Result of performing `Mutation.addUserPhone`."""
union AddUserPhoneResult = AddUserPhoneError | MyUserEventsVersioned
"""Angle of rotating an image."""
enum Angle {
"""0 degrees."""
DEG0
"""180 degrees"""
DEG180
"""270 degrees."""
DEG270
"""90 degrees."""
DEG90
}
"""
Attachment of a `ChatItem`.
`Mutation.uploadAttachment` expects to find a `filename` in a
[Content-Disposition][1] header.
Field `original` will return path to the file named `orig`. To download this
file with the original name, set the [`download`][2] attribute on `<a>` HTML
element to the value of the `filename` field.
[1]: https://mdn.io/Web/HTTP/Headers/Content-Disposition#directives
[2]: https://mdn.io/Web/HTML/Element/A#attributes
"""
interface Attachment {
"""Uploaded `File`'s name."""
filename: String!
"""Unique ID of this `Attachment`."""
id: AttachmentId!
"""Original `File` representing this `Attachment`."""
original: File!
}
"""Type of an `Attachment`'s ID."""
scalar AttachmentId
"""
[Connection] with `BlocklistRecord`s.
[Connection]: https://tinyurl.com/gql-relay#sec-Connection-Types
"""
type BlocklistConnection {
"""
List of `BlocklistRecord` [Edges] in this [Connection].
[Connection]: https://tinyurl.com/gql-relay#sec-Connection-Types
[Edges]: https://tinyurl.com/gql-relay#sel-FAFFFBEAAAACBFpwI
"""
edges: [BlocklistEdge!]!
"""
List of `BlocklistRecord`s in this [Connection].
[Connection]: https://tinyurl.com/gql-relay#sec-Connection-Types
"""
nodes: [BlocklistRecord!]!
"""
[PageInfo] of this [Connection].
[Connection]: https://tinyurl.com/gql-relay#sec-Connection-Types
[PageInfo]: https://tinyurl.com/gql-relay#sec-undefined.PageInfo
"""
pageInfo: PageInfo!
"""Total count of `BlocklistRecord`s."""
totalCount: Int!
}
"""Cursor of `BlocklistRecord`s."""
scalar BlocklistCursor
"""
[Edge] with a `BlocklistRecord`.
[Edge]: https://tinyurl.com/gql-relay#sec-Edge-Types
"""
type BlocklistEdge {
"""
[Cursor] of this [Edge].
[Cursor]: https://tinyurl.com/gql-relay#sec-Cursor
[Edge]: https://tinyurl.com/gql-relay#sec-Edge-Types
"""
cursor: BlocklistCursor!
"""
`BlocklistRecord` [Node] at the end of this [Edge].
[Edge]: https://tinyurl.com/gql-relay#sec-Edge-Types
[Node]: https://tinyurl.com/gql-relay#sec-Node
"""
node: BlocklistRecord!
}
"""Event of a `User` being added or removed to/from `Query.blocklist`."""
interface BlocklistEvent {
"""`DateTime` when this `BlocklistEvent` happened."""
at: DateTime!
"""`User` this `BlocklistEvent` is about."""
user: User!
}
"""`BlocklistEvent`s along with the corresponding `MyUserVersion`."""
type BlocklistEventsVersioned {
"""
Actual state of the `MyUser.blocklist` after this `BlocklistEvent`
has been emitted. Alias of `MyUser.blocklist`.
## Sorting
Returned `User`s are sorted primarily by their blocking `DateTime`, and
secondary by their IDs (if the blocking `DateTime` is the same), in
descending order.
## Pagination
It's allowed to specify both `first` and `last` counts at the same time,
provided that `after` and `before` cursors are equal. In such case the
returned page will include the `BlocklistRecord` pointed by the cursor
and the requested count of `BlocklistRecord`s preceding and following
it.
If it's desired to receive the `BlocklistRecord`, pointed by the cursor,
without querying in both directions, one can specify `first` or `last`
count as `0`.
If no arguments are provided, then `first` parameter will be considered
as `50`.
"""
blocklist(
"""
Cursor indicating the `BlocklistEdge` position to return next `BlocklistRecord`s after.
"""
after: BlocklistCursor
"""
Cursor indicating the `BlocklistEdge` position to return prior `BlocklistRecord`s before.
"""
before: BlocklistCursor
"""Number of next `BlocklistRecord`s to return."""
first: Int
"""Number of prior `BlocklistRecord`s to return."""
last: Int
): BlocklistConnection!
"""`BlocklistEvent`s themselves."""
events: [BlocklistEvent!]!
"""
Version of the `MyUser`'s state updated by these `BlocklistEvent`s.
It increases monotonically, so may be used (and is intended to) for
tracking state's actuality.
"""
ver: MyUserVersion!
}
"""Reason of blocking a `User` by the authenticated `MyUser`."""
scalar BlocklistReason
"""`User`'s record in a `Query.blocklist` of the authenticated `MyUser`."""
type BlocklistRecord {
"""`DateTime` when the `User` was blocked."""
at: DateTime!
"""Reason of why the `User` was blocked."""
reason: BlocklistReason
"""Blocked `User`."""
user: User!
}
"""Error of performing `Mutation.blockUser`."""
type BlockUserError {
"""Code indicating why this error has happened."""
code: BlockUserErrorCode!
}
"""Possible error codes of performing `Mutation.blockUser`."""
enum BlockUserErrorCode {
"""
`User` with the provided ID doesn't exist.
Status code: 404 Not Found.
"""
UNKNOWN_USER
}
"""Result of performing `Mutation.blockUser`."""
union BlockUserResult = BlockUserError | BlocklistEventsVersioned
"""Changed `Attachment`s of a `ChatMessage`."""
type ChangedChatMessageAttachments {
"""
New `Attachment`s of the `ChatMessage`.
Empty list means that the previous `Attachment`s were deleted.
## Sorting
Returned `Attachment`s are sorted in the same order as were provided to
the `Mutation.editChatMessage` by the `ChatMessage`'s author.
"""
changed: [Attachment!]!
}
"""Changed replied `ChatItem`s of a `ChatMessage`."""
type ChangedChatMessageReplies {
"""
New `ChatItemQuote`s of the `ChatMessage`.
Empty list means that the previous `ChatItemQuote`s were deleted.
## Sorting
Returned `ChatItemQuote`s are sorted in the same order as were provided
to the `Mutation.editChatMessage` by the `ChatMessage`'s author.
"""
changed: [ChatItemQuote!]!
}
"""Changed `ChatMessageText` of a `ChatMessage`."""
type ChangedChatMessageText {
"""
Changed `ChatMessageText`.
`null` means that the previous `ChatMessageText` was deleted.
"""
changed: ChatMessageText
}
"""`Chat` is a conversation between `User`s."""
type Chat {
"""Avatar of this `Chat`."""
avatar: ChatAvatar
"""`DateTime` when this `Chat` was created."""
createdAt: DateTime!
"""`ChatDirectLink` to this `Chat`."""
directLink: ChatDirectLink
"""
Position of this `Chat` in the favorites list of the authenticated
`MyUser`.
"""
favoritePosition: ChatFavoritePosition
"""Unique ID of this `Chat`."""
id: ChatId!
"""Indicator whether this `Chat` is hidden by the authenticated `MyUser`."""
isHidden: Boolean!
"""`ChatItem` of this `Chat` by its ID."""
item(id: ChatItemId!): ChatItemsEdge
"""
`ChatItem`s of this `Chat` ordered by their posting time.
## Sorting
Returned `ChatItem`s are sorted primarily by their posting `DateTime`,
and secondary by their IDs (if the posting `DateTime` is the same), in
descending order.
## Pagination
It's allowed to specify both `first` and `last` counts at the same time,
provided that `after` and `before` cursors are equal. In such case the
returned page will include the `ChatItem` pointed by the cursor and the
requested count of `ChatItem`s preceding and following it.
If it's desired to receive the `ChatItem`, pointed by the cursor,
without querying in both directions, one can specify `first` or `last`
count as `0`.
If no arguments are provided, then `first` parameter will be considered
as `50`.
"""
items(
"""
Cursor indicating the `ChatItemsEdge` position to return next `ChatItem`s after.
"""
after: ChatItemsCursor
"""
Cursor indicating the `ChatItemsEdge` position to return prior `ChatItem`s before.
"""
before: ChatItemsCursor
"""Number of next `ChatItem`s to return."""
first: Int
"""Number of prior `ChatItem`s to return."""
last: Int
"""
Indicator whether to filter out all the `ChatItem`s without attachments.
"""
onlyAttachments: Boolean = false
): ChatItemsConnection!
"""Kind of this `Chat`."""
kind: ChatKind!
"""
`DateTime` until which the posted `ChatItem`s were delivered to
`ChatMember`s, excluding the authenticated `MyUser`.
Can be used to determine whether the last `ChatItem` posted by the
authenticated `MyUser` was delivered to other `ChatMember`s by checking
it was posted not later than this `DateTime`.
Points to [UNIX epoch][0] if `ChatItem`s have been never delivered
before.
[0]: https://en.wikipedia.org/wiki/Unix_time
"""
lastDelivery: DateTime!
"""
Last `ChatItem` posted in this `Chat`.
`null` if there are no visible `ChatItem`s for the authenticated
`MyUser` in this `Chat`.
"""
lastItem: ChatItemsEdge
"""
Last `ChatItem` read by the authenticated `MyUser` in this `Chat`.
`null` if there are no visible `ChatItem`s for the authenticated
`MyUser` in this `Chat`, or it hasn't been read yet.
"""
lastReadItem: ChatItemsEdge
"""
List of this `Chat`'s members which have read it, along with the reading
`DateTime`s.
Limited with up to 10 `LastChatRead`s.
"""
lastReads: [LastChatRead!]!
"""
`ChatMember`s of this `Chat`.
## Sorting
Returned `ChatMember`s are sorted primarily by their joining `DateTime`,
and secondary by their IDs (if the joining `DateTime` is the same), in
ascending order.
## Pagination
It's allowed to specify both `first` and `last` counts at the same time,
provided that `after` and `before` cursors are equal. In such case the
returned page will include the `ChatMember` pointed by the cursor and
the requested count of `ChatMember`s preceding and following it.
If it's desired to receive the `ChatMember`, pointed by the cursor,
without querying in both directions, one can specify `first` or `last`
count as `0`.
If no arguments are provided, then `first` parameter will be considered
as `50`.
"""
members(
"""
Cursor indicating the `ChatMembersEdge` position to return next `ChatMember`s after.
"""
after: ChatMembersCursor
"""
Cursor indicating the `ChatMembersEdge` position to return prior `ChatMember`s before.
"""
before: ChatMembersCursor
"""Number of next `ChatMember`s to return."""
first: Int
"""Number of prior `ChatMember`s to return."""
last: Int
"""
ID of the `ChatItem` that should be read by returned `ChatMember`s.
`null` means omitting filtering by this criteria.
"""
readItem: ChatItemId
): ChatMembersConnection!
"""
Mute condition of this `Chat` for the authenticated `MyUser`.
Muted `Chat` implies that its events don't produce sounds and
notifications on a client side. This, however, has nothing to do with a
server and is the responsibility to be satisfied by a client side.
Server side may try to optimize this in some cases (like omit sending
notifications), but a client side should not rely on any such behaviour
and should implement best-effort muting by itself.
Note, that `Chat.muted` doesn't correlate with `MyUser.muted`. Muted
`Chat` of unmuted `MyUser` (and unmuted `Chat` of muted `MyUser`) should
not produce any sounds.
"""
muted: MuteDuration
"""
Name of this `Chat`.
Only `Chat`-group can have a `name`.
"""
name: ChatName
"""Current ongoing `ChatCall` of this `Chat`, if any."""
ongoingCall: ChatCall
"""
Count of `ChatItem`s visible to the authenticated `MyUser` in this
`Chat` (it doesn't include deleted or hidden `ChatItem`s).
"""
totalCount: Int!
"""
Count of `ChatItem`s unread by the authenticated `MyUser` in this
`Chat`.
"""
unreadCount: Int!
"""
`DateTime` when the last `ChatItem` was posted.
The main difference from `Chat.lastItem.at` query is that this field is
guaranteed to be monotonic. It's used for ordering `Chat`s by their
recent updates in `Subscription.recentChatsTopEvents`.
Only the following `ChatEvent` updates this field:
- `EventChatItemPosted`.
"""
updatedAt: DateTime!
"""
Version of this `Chat`'s state.
It increases monotonically, so may be used (and is intended to) for
tracking state's actuality.
"""
ver: ChatVersion!
}
"""Avatar of a `Chat`."""
type ChatAvatar {
"""
`big` view `ImageFile` of this `ChatAvatar`, square-cropped to its
minimum dimension (either width or height), and scaled to
`250px`x`250px`.
"""
big: ImageFile!
"""
`CropArea` applied to the `original` `ImageFile` for creating this
`ChatAvatar`.
"""
crop: CropArea
"""
Full-sized `ImageFile` representing this `ChatAvatar`, keeping the
`original` dimensions.
"""
full: ImageFile!
"""
`medium` view `ImageFile` of this `ChatAvatar`, square-cropped to its
minimum dimension (either width or height), and scaled to
`100px`x`100px`.
"""
medium: ImageFile!
"""Original `ImageFile` representing this `ChatAvatar`."""
original: ImageFile!
"""
`small` view `ImageFile` of this `ChatAvatar`, square-cropped to its
minimum dimension (either width or height), and scaled to `46px`x`46px`.
"""
small: ImageFile!
}
"""Call in a `Chat`."""
type ChatCall implements ChatItem {
"""`DateTime` when this `ChatCall` was started."""
at: DateTime!
"""
`User` who started this `ChatCall`.
Note, that this `User` may not be a member of this `ChatCall` at the
moment.
"""
author: User!
"""ID of the `Chat` where this `ChatCall` is organized."""
chatId: ChatId!
"""
`DateTime` when the actual conversation in this `ChatCall` was started
(after ringing had been finished).
"""
conversationStartedAt: DateTime
"""
`ChatMember`s being dialed by this `ChatCall` at the moment.
Unanswered `ChatCall`s (neither accepted, nor declined) are considered
incoming (unless the dialing timeout passes) and should be present in
results of `Query.incomingChatCalls` and
`Subscription.incomingChatCallsTopEvents`. Although all 3 methods are
suitable for notifying about incoming calls, this field contains the
most recent and accurate information, as other methods may introduce a
delay.
To understand whether the authenticated `MyUser` is dialed by this
`ChatCall` at the moment, check whether the `ChatCall.dialed.members`
contain him or the `ChatCall.dialed.answeredMembers` do not while the
`ChatCall.dialed` is not `null`.
"""
dialed: ChatMembersDialed
"""`DateTime` when this `ChatCall` was finished (if it was)."""
finishedAt: DateTime
"""Reason of why this `ChatCall` was finished (if it was)."""
finishReason: ChatCallFinishReason
"""Unique ID of this `ChatCall`."""
id: ChatItemId!
"""
Link for joining this `ChatCall`'s room on [Medea] media server.
Should be used in conjunction with `ChatCallCredentials` (generated for
`Mutation.startChatCall` or `Mutation.joinChatCall`) to properly
authenticate on [Medea] media server.
If `null` then `ChatCall`'s room on [Medea] media server isn't ready yet
to be joined, and `EventChatCallRoomReady` should be awaited via
`Subscription.chatCallEvents` before doing so.
Bound to a concrete device of the authenticated `MyUser`, and so, is
`null` in any operations where a concrete `ChatCallDeviceId` is unknown.
This means that every device of the authenticated `MyUser` must obtain
its own `ChatCallRoomJoinLink` via separate
`Subscription.chatCallEvents`.
[Medea]: https://github.com/instrumetisto/medea
"""
joinLink: ChatCallRoomJoinLink
"""
`ChatCallMember`s of this `ChatCall`.
New `ChatCallMember`s always join a `ChatCall` with a lowered hand.
## Sorting
Returned `ChatCallMember`s are sorted primarily by their joining
`DateTime`, and secondary by their IDs (if the joining `DateTime` is the
same), in ascending order.
"""
members: [ChatCallMember!]!
"""
Version of this `ChatCall`'s state.
It increases monotonically, so may be used (and is intended to) for
tracking state's actuality.
"""
ver: ChatItemVersion!
"""Indicator whether this `ChatCall` is intended to start with video."""
withVideo: Boolean!
}
"""
Type of `MyUser`'s `ChatCall` credentials.
Intended to be generated on a client side. Generate a new value for each new
`ChatCall`.
Its values are always considered to be non-empty, and meet the following
requirements:
- not start or end with space-like characters;
- be at least 1 and maximum 250 characters long.
"""
scalar ChatCallCredentials
"""Type of a `ChatCallMember`'s device ID."""
scalar ChatCallDeviceId
"""Events happening in a `ChatCall`."""
interface ChatCallEvent {
"""`DateTime` when this `ChatCallEvent` happened."""
at: DateTime!
"""ID of the `ChatCall` this `ChatCallEvent` is related to."""
callId: ChatItemId!
"""ID of the `Chat` this `ChatCallEvent` is happened in."""
chatId: ChatId!
}
"""Events emitted by `Subscription.chatCallEvents`."""
union ChatCallEvents = ChatCall | ChatCallEventsVersioned | SubscriptionInitialized
"""`ChatCallEvent`s along with the corresponding `ChatItemVersion`."""
type ChatCallEventsVersioned {
"""`ChatCallEvent`s themselves."""
events: [ChatCallEvent!]!
"""
Version of the `ChatCall`'s state updated by these `ChatCallEvent`s.
It increases monotonically, so may be used (and is intended to) for
tracking state's actuality.
"""
ver: ChatItemVersion!
}
"""Reason of why a `ChatCall` was finished."""
enum ChatCallFinishReason {
"""Server decided to finish a `ChatCall` due its inner processes."""
SERVER_DECISION
"""The last member of a `ChatCall` left."""
MEMBER_LEFT
"""The last member of a `ChatCall` lost connection."""
MEMBER_LOST_CONNECTION
"""
`ChatCall` was moved from its `Chat`-dialog to a newly created
`Chat`-group.
"""
MOVED
"""`Chat`-dialog `ChatCall` was declined by the responder."""
DECLINED
"""
`Chat`-dialog `ChatCall` was dropped (canceled by the caller before
being responded).
"""
DROPPED
"""
`Chat`-dialog responder didn't manage to answer a `ChatCall` in the
given ringing time.
"""
UNANSWERED
}
"""Member of a `ChatCall`."""
type ChatCallMember {
"""Indicator whether this `ChatCallMember` raised a hand."""
handRaised: Boolean!
"""`DateTime` when this `ChatCallMember` joined the `ChatCall`."""
joinedAt: DateTime!
"""`User` representing this `ChatCallMember`."""
user: User!
}
"""`ChatItemQuote` of a `ChatCall`."""
type ChatCallQuote implements ChatItemQuote {
"""`DateTime` when the quoted `ChatCall` was started."""
at: DateTime!
"""`User` who started the quoted `ChatCall`."""
author: User!
"""
Quoted `ChatCall`.
`null` if the quoted `ChatCall` was deleted or is unavailable for the
authenticated `MyUser`.
"""
original: ChatItemsEdge
}
"""
Link for joining the room of a `ChatCall` on a media server.
Always bound to a concrete device of the authenticated `MyUser`.
This means that every device of the authenticated `MyUser` must obtain its
own `ChatCallRoomJoinLink` via separate `Subscription.chatCallEvents`.
This link requires addition authentication via `token` query parameter with
the value of `ChatCallCredentials` that has been provided to
`Mutation.startChatCall` or `Mutation.joinChatCall`.
"""
scalar ChatCallRoomJoinLink
"""
Record in an address book of the authenticated `MyUser`.
It may be linked with some real `User`s, but also may not.
"""
type ChatContact {
"""
List of `UserEmail`s provided by this `ChatContact`.
Guaranteed to have no duplicates.
"""
emails: [ChatContactEmail!]!
"""
Position of this `ChatContact` in the favorites list of the
authenticated `MyUser`.
"""
favoritePosition: ChatContactFavoritePosition
"""
`Chat`-groups linked to this `ChatContact`.
Guaranteed to have no duplicates.
"""
groups: [Chat!]!
"""Unique ID of this `ChatContact`."""
id: ChatContactId!
"""
Custom `UserName` of this `ChatContact` given by the authenticated
`MyUser`.
"""
name: UserName!
"""
List of `UserPhone`s provided by this `ChatContact`.
Guaranteed to have no duplicates.
"""
phones: [ChatContactPhone!]!
"""
`User`s linked to this `ChatContact`.
Guaranteed to have no duplicates.
"""
users: [User!]!
"""
Version of this `ChatContact`'s state.
It increases monotonically, so may be used (and is intended to) for
tracking state's actuality.
"""
ver: ChatContactVersion!
}
"""Email address provided by a `ChatContact`."""
type ChatContactEmail {
"""`UserEmail` of this `ChatContactEmail`."""
email: UserEmail!
"""`User` behind this `ChatContactEmail`, if any."""
user: User
}
"""Events happening in a `ChatContact`."""
interface ChatContactEvent {
"""`DateTime` when this `ChatContactEvent` happened."""
at: DateTime!
"""ID of the `ChatContact` this `ChatContactEvent` is related to."""
contactId: ChatContactId!
}
"""
`ChatContactEvent`s along with the corresponding `ChatContactVersion`.
and `ChatContactsListVersion`.
"""
type ChatContactEventsVersioned {
"""`ChatContactEvent`s themselves."""
events: [ChatContactEvent!]!
"""
Version of the `ChatContact`s list updated by these `ChatContactEvent`s.
It increases monotonically, so may be used (and is intended to) for
tracking list state's actuality.
Also, intended to be used in `Subscription.chatContactsEvents`.
"""
listVer: ChatContactsListVersion!
"""
Version of the `ChatContact` state updated by these `ChatContactEvent`s.
It increases monotonically, so may be used (and is intended to) for
tracking concrete `ChatContact` state's actuality.
If the `events` contain `ChatContactEvent`s related to different
`ChatContact`s, then this version is applicable for all of them.
"""
ver: ChatContactVersion!
}
"""
Position of a `ChatContact` in a `MyUser`'s favorites list.
Its values are always considered to be finite positive [`Float` values][1].
[1]: https://spec.graphql.org/June2018#sec-Float-Value
"""
scalar ChatContactFavoritePosition
"""Type of a `ChatContact`'s ID."""
scalar ChatContactId
"""Phone number provided by a `ChatContact`."""
type ChatContactPhone {
"""`UserPhone` of this `ChatContactPhone`."""
phone: UserPhone!
"""`User` behind this `ChatContactPhone`, if any."""
user: User
}
"""
Input type representing a record of a `ChatContact`.
Exactly one field should be set.
"""
input ChatContactRecord {
"""`UserEmail` record."""
email: UserEmail
"""`Chat`-group record."""
groupId: ChatId
"""`UserPhone` record."""
phone: UserPhone
"""`User` record."""
userId: UserId
}
"""
[Connection] with `ChatContact`s.
[Connection]: https://tinyurl.com/gql-relay#sec-Connection-Types
"""
type ChatContactsConnection {
"""
List of `ChatContact` [Edges] in this [Connection].
[Connection]: https://tinyurl.com/gql-relay#sec-Connection-Types
[Edges]: https://tinyurl.com/gql-relay#sel-FAFFFBEAAAACBFpwI
"""
edges: [ChatContactsEdge!]!
"""
List of `ChatContact`s in this [Connection].
[Connection]: https://tinyurl.com/gql-relay#sec-Connection-Types
"""