forked from irodionsoul/mobilizon
-
Notifications
You must be signed in to change notification settings - Fork 0
/
schema.graphql
4104 lines (2983 loc) · 80.9 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
"Represents a schema"
schema {
query: RootQueryType
mutation: RootMutationType
subscription: RootSubscriptionType
}
"A JWT and the associated user ID"
type Login {
"A JWT Token for this session"
accessToken: String!
"A JWT Token to refresh the access token"
refreshToken: String!
"The user associated to this session"
user: User!
}
"Instance anonymous participation configuration"
type AnonymousParticipation {
"Whether anonymous participations are allowed"
allowed: Boolean
"The ways to validate anonymous participations"
validation: AnonymousParticipationValidation
}
"Available sort directions"
enum SortDirection {
"Ascending order"
ASC
"Descending order"
DESC
}
"Token"
type RefreshedToken {
"Generated access token"
accessToken: String!
"Generated refreshed token"
refreshToken: String!
}
"Represents an application"
type Application implements Actor {
"Internal ID for this application"
id: ID
"The ActivityPub actor's URL"
url: String
"The type of Actor (Person, Group,…)"
type: ActorType
"The actor's displayed name"
name: String
"The actor's domain if (null if it's this instance)"
domain: String
"If the actor is from this instance"
local: Boolean
"The actor's summary"
summary: String
"The actor's preferred username"
preferredUsername: String
"Whether the actors manually approves followers"
manuallyApprovesFollowers: Boolean
"If the actor is suspended"
suspended: Boolean
"The actor's avatar media"
avatar: Media
"The actor's banner media"
banner: Media
"Number of followers for this actor"
followersCount: Int
"Number of actors following this actor"
followingCount: Int
"The total size of the media from this actor"
mediaSize: Int
}
"Instance anonymous event creation configuration"
type AnonymousEventCreation {
"Whether anonymous event creation is enabled"
allowed: Boolean
"The methods to validate events created anonymously"
validation: AnonymousEventCreationValidation
}
"The list of values the for pending notification settings"
enum NotificationPendingEnum {
"None. The notification won't be sent."
NONE
"Direct. The notification will be sent right away each time."
DIRECT
"One hour. Notifications will be sent at most each hour"
ONE_HOUR
"One day. Notifications will be sent at most each day"
ONE_DAY
"One Week. Notifications will be sent at most each week"
ONE_WEEK
}
"The possible values for a participant role"
enum ParticipantRoleEnum {
"The participant has not been approved"
NOT_APPROVED
"The participant has not confirmed their participation"
NOT_CONFIRMED
"The participant is a regular participant"
PARTICIPANT
"The participant is an event moderator"
MODERATOR
"The participant is an event administrator"
ADMINISTRATOR
"The participant is an event creator"
CREATOR
"The participant has been rejected from this event"
REJECTED
}
"Available event sort fields"
enum EventOrderBy {
"Sort by the date the event starts"
BEGINS_ON
"Sort by the date the event was created"
INSERTED_AT
"Sort by the date the event was updated"
UPDATED_AT
}
"A config object"
type Config {
"The instance's name"
name: String
"The instance's short description"
description: String
"The instance's long description"
longDescription: String
"The instance's slogan"
slogan: String
"The instance's logo"
instanceLogo: Media
"The default picture"
defaultPicture: Media
"The instance's primary color"
primaryColor: String
"The instance's secondary color"
secondaryColor: String
"The instance's contact details"
contact: String
"The instance's admins languages"
languages: [String]
"The instance list of event categories possibilities"
eventCategories: [EventCategoryOption]
"Whether the registrations are opened"
registrationsOpen: Boolean
"Whether the registration are on an allowlist"
registrationsAllowlist: Boolean
"Whether the demo mode is enabled"
demoMode: Boolean
"Whether the long events mode is enabled"
longEvents: Boolean
"The country code from the IP"
countryCode: String
"The IP's location"
location: Lonlat
"The instance's geocoding settings"
geocoding: Geocoding
"The instance's maps settings"
maps: Maps
"The instance's anonymous action settings"
anonymous: Anonymous
"The instance's enabled resource providers"
resourceProviders: [ResourceProvider]
"The configuration for upload limits"
uploadLimits: UploadLimits
"The instance's available timezones"
timezones: [String]
"The instance's features"
features: Features
"The instance's restrictions"
restrictions: Restrictions
"The instance's version"
version: String
"Whether this instance is federation"
federating: Boolean
"The instance's terms"
terms(
"The user's locale. The terms will be translated in their language, if available."
locale: String
): Terms
"The instance's privacy policy"
privacy(
"The user's locale. The privacy policy will be translated in their language, if available."
locale: String
): Privacy
"The instance's rules"
rules: String
"The instance auth methods"
auth: Auth
"The instance's feed settings"
instanceFeeds: InstanceFeeds
"Web Push settings for the instance"
webPush: WebPush
"The instance list of export formats"
exportFormats: ExportFormats
"Configuration for diverse analytics services"
analytics: [Analytics]
}
"A tag"
type Tag {
"The tag's ID"
id: ID
"The tags's slug"
slug: String
"The tag's title"
title: String
"Related tags to this tag"
related: [Tag]
}
"Instance map routing configuration"
type Routing {
"The instance's routing type"
type: RoutingType
}
"Language information"
type Language {
"The iso-639-3 language code"
code: String
"The language name"
name: String
}
"The list of roles an user can have"
enum UserRole {
"Administrator role"
ADMINISTRATOR
"Moderator role"
MODERATOR
"User role"
USER
}
"""
A list of possible values for the type option to search an address.
Results may vary depending on the geocoding provider.
"""
enum AddressSearchType {
"Administrative results (cities, regions,...)"
ADMINISTRATIVE
}
"A todo list"
type TodoList {
"The todo list's ID"
id: ID
"The todo list's title"
title: String
"The actor that owns this todo list"
actor: Actor
"The todo-list's todos"
todos(
"The page in the paginated todos list"
page: Int
"The limit of todos per page"
limit: Int
): PaginatedTodoList
}
"Represents a participant to an event"
type Participant {
"The participation ID"
id: ID
"The event which the actor participates in"
event: Event
"The actor that participates to the event"
actor: Actor
"The role of this actor at this event"
role: ParticipantRoleEnum
"The metadata associated to this participant"
metadata: ParticipantMetadata
"The datetime this participant was created"
insertedAt: DateTime
}
"The list of sortable fields for an user list"
enum SortableUserField {
"The user's ID"
ID
}
interface ActivityObject {
id: ID
}
"A paginated list of activity items"
type PaginatedActivityList {
"A list of activities"
elements: [Activity]
"The total number of elements in the list"
total: Int
}
"""
The `UUID` scalar type represents UUID4 compliant string data, represented as UTF-8
character sequences. The UUID4 type is most often used to represent unique
human-readable ID strings.
"""
scalar UUID
"A paginated list of instances"
type PaginatedInstanceList {
"A list of instances"
elements: [Instance]
"The total number of instances in the list"
total: Int
}
"A paginated list of discussions"
type PaginatedDiscussionList {
"A list of discussion"
elements: [Discussion]
"The total number of discussions in the list"
total: Int
}
"The set of parameters needed to input a location"
input LocationInput {
"The range in kilometers the user wants to see events"
range: Int
"A geohash representing the user's preferred location"
geohash: String
"A string describing the user's preferred location"
name: String
}
"The objects that can be in an action log"
interface ActionLogObject {
"Internal ID for this object"
id: ID
}
"Represents an uploaded file."
scalar Upload
"A paginated list of posts"
type PaginatedPostList {
"A list of posts"
elements: [Post]
"The total number of posts in the list"
total: Int
}
"A comment"
type Comment implements ActivityObject & ActionLogObject {
"Internal ID for this comment"
id: ID
"An UUID for this comment"
uuid: UUID
"Comment URL"
url: String
"Whether this comment is local or not"
local: Boolean
"The visibility for the comment"
visibility: CommentVisibility
"The comment body"
text: String
"The comment's primary language"
primaryLanguage: String
"A list of replies to the comment"
replies: [Comment]
"The number of total known replies to this comment"
totalReplies: Int
"The comment this comment directly replies to"
inReplyToComment: Comment
"The eventual event this comment is under"
event: Event
"The original comment that started the thread this comment is in"
originComment: Comment
"The thread languages"
threadLanguages: [String]!
"The comment's author"
actor: Person
"When was the comment inserted in database"
insertedAt: DateTime
"When was the comment updated"
updatedAt: DateTime
"When was the comment deleted"
deletedAt: DateTime
"When was the comment published"
publishedAt: DateTime
"Whether this comment needs to be announced to participants"
isAnnouncement: Boolean!
"The comment language"
language: String
}
"An attached media or a link to a media"
input MediaInput {
"A full media attached"
media: MediaInputObject
"The ID of an existing media"
mediaId: ID
}
"Instance anonymous reports"
type AnonymousReports {
"Whether anonymous reports are allowed"
allowed: Boolean
}
"Search events result"
type Events {
"Total elements"
total: Int!
"Event elements"
elements: [Event]!
}
"Instance maps configuration"
type Maps {
"The instance's maps tiles configuration"
tiles: Tiles
"The instance's maps routing configuration"
routing: Routing
}
"Search groups result"
type Groups {
"Total elements"
total: Int!
"Group elements"
elements: [Group]!
}
"The list of possible statuses for a report object"
enum ReportStatus {
"The report has been opened"
OPEN
"The report has been closed"
CLOSED
"The report has been marked as resolved"
RESOLVED
}
enum ActivityAuthor {
"Activities created by the current actor"
SELF
"Activities created by others"
BY
}
"The metadata associated to the resource"
type ResourceMetadata {
"The type of the resource"
type: String
"The resource's metadata title"
title: String
"The resource's metadata description"
description: String
"The resource's metadata image"
imageRemoteUrl: String
"The resource's metadata image width"
width: Int
"The resource's metadata image height"
height: Int
"The resource's author name"
authorName: String
"The resource's author URL"
authorUrl: String
"The resource's provider name"
providerName: String
"The resource's provider URL"
providerUrl: String
"The resource's author name"
html: String
"The resource's favicon URL"
faviconUrl: String
}
"Metadata about a participant"
type ParticipantMetadata {
"The eventual token to leave an event when user is anonymous"
cancellationToken: String
"The eventual message the participant left"
message: String
"The participant's locale"
locale: String
}
"A media"
type Media {
"The media's ID"
id: ID
"The media's alternative text"
alt: String
"The media's name"
name: String
"The media's full URL"
url: String
"The media's detected content type"
contentType: String
"The media's size"
size: Int
"The media's metadata"
metadata: MediaMetadata
}
"Instance anonymous participation with validation by captcha configuration"
type AnonymousParticipationValidationCaptcha {
"Whether anonymous participation validation by captcha is enabled"
enabled: Boolean
}
"Instance anonymous event creation captcha validation configuration"
type AnonymousEventCreationValidationCaptcha {
"Whether anonymous event creation with validation by captcha is enabled"
enabled: Boolean
}
"A todo"
type Todo {
"The todo's ID"
id: ID
"The todo's title"
title: String
"The todo's status"
status: Boolean
"The todo's due date"
dueDate: DateTime
"The todo's creator"
creator: Actor
"The todo list this todo is attached to"
todoList: TodoList
"The todos's assigned person"
assignedTo: Actor
}
"Root subscription"
type RootSubscriptionType {
"Notify when a person's participation's status changed for an event"
eventPersonParticipationChanged("The person's ID" personId: ID!): Person
"Notify when a person's membership's status changed for a group"
groupMembershipChanged(
"The person's ID"
personId: ID!
"The group's federated username"
group: String!
): Person
"Notify when a discussion changed"
discussionCommentChanged("The discussion's slug" slug: String!): Discussion
}
"Event categories list configuration"
type EventCategoryOption {
"The ID of the event category"
id: String
"The translated name of the event category"
label: String
}
type AnalyticsConfiguration {
"The key for the analytics configuration element"
key: String
"The value for the analytics configuration element"
value: String
"The analytics configuration type"
type: AnalyticsConfigurationType
}
"Represents a deleted feed_token"
type DeletedFeedToken {
"The user that owned the deleted feed token"
user: DeletedObject
"The actor that owned the deleted feed token"
actor: DeletedObject
}
"Instance anonymous participation validation configuration"
type AnonymousParticipationValidation {
"The policy to validate anonymous participations by email"
email: AnonymousParticipationValidationEmail
"The policy to validate anonymous participations by captcha"
captcha: AnonymousParticipationValidationCaptcha
}
type Location {
"The range in kilometers the user wants to see events"
range: Int
"A geohash representing the user's preferred location"
geohash: String
"A string describing the user's preferred location"
name: String
}
enum ExportFormatEnum {
"CSV format"
CSV
"PDF format"
PDF
"ODS format"
ODS
}
"The list of visibility options for a comment"
enum CommentVisibility {
"Publicly listed and federated. Can be shared."
PUBLIC
"Visible only to people with the link - or invited"
UNLISTED
"Visible only to people members of the group or followers of the person"
PRIVATE
"Visible only after a moderator accepted"
MODERATED
"visible only to people invited"
INVITE
}
"The list of visibility options for an event"
enum EventVisibility {
"Publicly listed and federated. Can be shared."
PUBLIC
"Visible only to people with the link - or invited"
UNLISTED
"Visible only after a moderator accepted"
RESTRICTED
"Visible only to people members of the group or followers of the person"
PRIVATE
}
"The instance's auth configuration"
type Auth {
"Whether or not LDAP auth is enabled"
ldap: Boolean
"List of oauth providers"
oauthProviders: [OauthProvider]
}
"An action log"
type ActionLog {
"Internal ID for this comment"
id: ID
"The actor that acted"
actor: Actor
"The object that was acted upon"
object: ActionLogObject
"The action that was done"
action: ActionLogAction
"The time when the action was performed"
insertedAt: DateTime
}
"The acceptable values for the instance's terms type"
enum InstanceTermsType {
"An URL. Users will be redirected to this URL."
URL
"Terms will be set to Mobilizon's default terms"
DEFAULT
"Custom terms text"
CUSTOM
}
"A entity that can be interacted with from a remote instance"
interface Interactable {
"A public URL for the entity"
url: String
}
enum EventType {
"The event will happen in person. It can also be livestreamed, but has a physical address"
IN_PERSON
"The event will only happen online. It has no physical address"
ONLINE
}
enum EventMetadataType {
"A string"
STRING
"An integer"
INTEGER
"A boolean"
BOOLEAN
}
enum RoutingType {
"Redirect to openstreetmap.org's direction endpoint"
OPENSTREETMAP
"Redirect to Google Maps's direction endpoint"
GOOGLE_MAPS
}
"A struct containing the id of the deleted object"
type DeletedObject {
id: ID
}
"A follow group event"
type FollowedGroupEvent {
user: User
profile: Person
group: Group
event: Event
}
"A paginated list of comments"
type PaginatedCommentList {
"A list of comments"
elements: [Comment]
"The total number of comments in the list"
total: Int
}
"A paginated list of members"
type PaginatedMemberList {
"A list of members"
elements: [Member]
"The total number of elements in the list"
total: Int
}
"A post"
type Post implements ActivityObject {
"The post's ID"
id: ID
"The post's title"
title: String
"The post's slug"
slug: String
"The post's body, as HTML"
body: String
"The post's URL"
url: String
"Whether the post is a draft"
draft: Boolean
"The post's author"
author: Actor
"The post's group"
attributedTo: Actor
"The post's visibility"
visibility: PostVisibility
"When the post was published"
publishAt: DateTime
"The post's creation date"
insertedAt: DateTime
"The post's last update date"
updatedAt: DateTime
"The post language"
language: String
"The post's tags"
tags: [Tag]
"The posts's media"
picture: Media
}
"A paginated list of action logs"
type PaginatedActionLogList {
"A list of action logs"
elements: [ActionLog]
"The total number of action logs in the list"
total: Int
}
"A paginated list of events"
type PaginatedEventList {
"A list of events"
elements: [Event]
"The total number of events in the list"
total: Int
}
"Represents a deleted participant"
type DeletedParticipant {
"The participant ID"
id: ID
"The participant's event"
event: DeletedObject
"The participant's actor"
actor: DeletedObject
}
"A paginated list of follower objects"
type PaginatedFollowerList {
"A list of followers"
elements: [Follower]
"The total number of elements in the list"
total: Int
}
type Analytics {
"ID of the analytics service"
id: String
"Whether the service is activated or not"
enabled: Boolean
"A list of key-values configuration"
configuration: [AnalyticsConfiguration]
}
enum InstancesSortFields {
EVENT_COUNT
PERSON_COUNT
GROUP_COUNT
FOLLOWERS_COUNT
FOLLOWINGS_COUNT
REPORTS_COUNT
MEDIA_SIZE
}
"The list of possible options for the event's status"
enum EventStatus {
"The event is tentative"