You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
mobilizon.chapril.org-mobil.../js/schema.graphql

3292 lines
65 KiB

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
"List of followings"
following: [Follower]
"List of followers"
followers: [Follower]
"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
}
"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
}
"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 contact details"
contact: String
"The instance's admins languages"
languages: [String]
"Whether the registrations are opened"
registrationsOpen: Boolean
"Whether the registration are on an allowlist"
registrationsAllowlist: Boolean
"Whether the demo mode is enabled"
demoMode: 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 instance's available timezones"
timezones: [String]
"The instance's features"
features: Features
"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
}
"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 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: 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
}
"""
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 discussions"
type PaginatedDiscussionList {
"A list of discussion"
elements: [Discussion]
"The total number of discussions in the list"
total: Int
}
"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 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
}
"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
}
"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
}
"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!): Person
"Notify when a discussion changed"
discussionCommentChanged("The discussion's slug" slug: String!): Discussion
}
"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
}
"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 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 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 {
"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's tags"
tags: [Tag]
"The posts's media"
picture: Media
}
"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
}
"The list of possible options for the event's status"
enum EventStatus {
"The event is tentative"
TENTATIVE
"The event is confirmed"
CONFIRMED
"The event is cancelled"
CANCELLED
}
"A statistics object"
type Statistics {
"The number of local users"
numberOfUsers: Int
"The total number of events"
numberOfEvents: Int
"The number of local events"
numberOfLocalEvents: Int
"The total number of comments"
numberOfComments: Int
"The number of local events"
numberOfLocalComments: Int
"The total number of groups"
numberOfGroups: Int
"The number of local groups"
numberOfLocalGroups: Int
"The number of this instance's followers"
numberOfInstanceFollowers: Int
"The number of instances this instance follows"
numberOfInstanceFollowings: Int
}
"Search persons result"
type Persons {
"Total elements"
total: Int!
"Person elements"
elements: [Person]!
}
"An oAuth Provider"
type OauthProvider {
"The provider ID"
id: String
"The label for the auth provider"
label: String
}
"An ActivityPub actor"
interface Actor {
"Internal ID for this actor"
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
"List of followings"
following: [Follower]
"List of followers"
followers: [Follower]
"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 validation configuration"
type AnonymousEventCreationValidation {
"The policy to validate anonymous event creations by email"
email: AnonymousEventCreationValidationEmail
"The policy to validate anonymous event creations by captcha"
captcha: AnonymousEventCreationValidationCaptcha
}
"The list of possible options for the event's status"
enum EventCommentModeration {
"Anyone can comment under the event"
ALLOW_ALL
"Every comment has to be moderated by the admin"
MODERATED
"No one can comment except for the admin"
CLOSED
}
"Represents a person identity"
type Person implements ActionLogObject & Actor {
"Internal ID for this person"
id: ID
"The user this actor is associated to"
user: User
"The list of groups this person is member of"
memberOf: [Member]
"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
"List of followings"
following: [Follower]
"List of followers"
followers: [Follower]
"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
"A list of the feed tokens for this person"
feedTokens: [FeedToken]
"A list of the events this actor has organized"
organizedEvents(
"The page in the paginated event list"
page: Int
"The limit of events per page"
limit: Int
): PaginatedEventList
"The list of events this person goes to"
participations(
eventId: ID
"The page in the paginated participation list"
page: Int
"The limit of participations per page"
limit: Int
): PaginatedParticipantList
"The list of group this person is member of"
memberships: PaginatedMemberList
}
"Root Mutation"
type RootMutationType {
"Create an user"
createUser(
"The new user's email"
email: String!
"The new user's password"
password: String!
"The new user's locale"
locale: String
): User
"Validate an user after registration"
validateUser(
"The token that will be used to validate the user"
token: String!
): Login
"Resend registration confirmation token"
resendConfirmationEmail(
"The email used to register"
email: String!
"The user's locale"
locale: String
): String
"Send a link through email to reset user password"
sendResetPassword(
"The user's email"
email: String!
"The user's locale"
locale: String
): String
"Reset user password"
resetPassword(
"The user's token that will be used to reset the password"
token: String!
"The new password"
password: String!
"The user's locale"
locale: String
): Login
"Login an user"
login(
"The user's email"
email: String!
"The user's password"
password: String!
): Login
"Refresh a token"
refreshToken("A refresh token" refreshToken: String!): RefreshedToken
"Change default actor for user"
changeDefaultActor(
"The actor preferred_username"
preferredUsername: String!
): User
"Change an user password"
changePassword(
"The user's current password"
oldPassword: String!
"The user's new password"
newPassword: String!
): User
"Change an user email"
changeEmail(
"The user's new email"
email: String!
"The user's current password"
password: String!
): User
"Validate an user email"
validateEmail(
"The token that will be used to validate the email change"
token: String!
): User
"Delete an account"
deleteAccount(
"The user's password"
password: String
"The user's ID"
userId: ID
): DeletedObject
"Set user settings"
setUserSettings(
"The timezone for this user"
timezone: String
"Whether this user will receive an email at the start of the day of an event."
notificationOnDay: Boolean
"Whether this user will receive an weekly event recap"
notificationEachWeek: Boolean
"Whether this user will receive a notification right before event"
notificationBeforeEvent: Boolean
"When does the user receives a notification about new pending participations"
notificationPendingParticipation: NotificationPendingEnum
"When does the user receives a notification about a new pending membership in one of the group they're admin for"
notificationPendingMembership: NotificationPendingEnum
): UserSettings
"Update the user's locale"
updateLocale("The user's new locale" locale: String): User
"Create a new person for user"
createPerson(
"The username for the profile"
preferredUsername: String!
"The displayed name for the new profile"
name: String
"The summary for the new profile"
summary: String
"The avatar for the profile, either as an object or directly the ID of an existing media"
avatar: MediaInput
"The banner for the profile, either as an object or directly the ID of an existing media"
banner: MediaInput
): Person
"Update an identity"
updatePerson(
"The person's ID"
id: ID!
"The displayed name for this profile"
name: String
"The summary for this profile"
summary: String
"The avatar for the profile, either as an object or directly the ID of an existing media"
avatar: MediaInput
"The banner for the profile, either as an object or directly the ID of an existing media"
banner: MediaInput
): Person
"Delete an identity"
deletePerson("The person's ID" id: ID!): Person
"Register a first profile on registration"
registerPerson(
"The username for the profile"
preferredUsername: String!
"The displayed name for the new profile"
name: String
"The summary for the new profile"
summary: String
"The email from the user previously created"
email: String!
"The avatar for the profile, either as an object or directly the ID of an existing media"
avatar: MediaInput
"The banner for the profile, either as an object or directly the ID of an existing media"
banner: MediaInput
): Person
"Create a group"
createGroup(