2021-05-10 14:54:17 +02:00
|
|
|
schema {
|
|
|
|
query: Query
|
|
|
|
}
|
|
|
|
|
|
|
|
type Query {
|
|
|
|
users: [User!]!
|
|
|
|
}
|
|
|
|
|
|
|
|
type User {
|
|
|
|
id: ID!
|
|
|
|
userName: String!
|
|
|
|
displayName: String
|
|
|
|
activated: Boolean!
|
|
|
|
created: DateTimeUtc!
|
|
|
|
lastOnline: DateTimeUtc
|
|
|
|
preferences: UserPreferences!
|
|
|
|
}
|
|
|
|
|
|
|
|
# All account preferences for a single user
|
|
|
|
type UserPreferences {
|
2021-06-07 17:59:03 +02:00
|
|
|
privacyPreferences: PrivacyPreferences!
|
|
|
|
notificationPreferences: NotificationPreferences!
|
|
|
|
securityPreferences: SecurityPreferences!
|
2021-05-10 15:18:30 +02:00
|
|
|
# TODO: external servers
|
2021-06-07 17:59:03 +02:00
|
|
|
externalServersPreferences: ExternalServersPreferences!
|
2021-05-10 14:54:17 +02:00
|
|
|
}
|
|
|
|
|
2021-06-07 17:59:03 +02:00
|
|
|
type PrivacyPreferences {
|
2021-05-10 14:54:17 +02:00
|
|
|
# Discovery on other servers
|
|
|
|
discovery: RestrictionPolicy!
|
|
|
|
discoveryUserLimit: [String!]
|
|
|
|
discoveryServerLimit: [Url!]
|
|
|
|
|
|
|
|
# Last seen online
|
|
|
|
lastSeen: RestrictionPolicy!
|
|
|
|
lastSeenUserLimit: [String!]
|
|
|
|
lastSeenServerLimit: [Url!]
|
|
|
|
# For enabled users/servers: Only give vague indications
|
|
|
|
# e.g. recently, a long time ago
|
|
|
|
lastSeenCourse: Boolean!
|
|
|
|
|
|
|
|
# Describing informational text regarding the user
|
|
|
|
info: RestrictionPolicy!
|
|
|
|
infoUserLimit: [String!]
|
|
|
|
infoServerLimit: [Url!]
|
|
|
|
}
|
|
|
|
|
2021-06-07 17:59:03 +02:00
|
|
|
type NotificationPreferences {
|
2021-05-10 14:54:17 +02:00
|
|
|
lockDetails: Boolean!
|
|
|
|
doNotDisturb: Boolean!
|
|
|
|
}
|
|
|
|
|
2021-06-07 17:59:03 +02:00
|
|
|
type SecurityPreferences {
|
2021-05-10 15:05:16 +02:00
|
|
|
# One-purpose-passwords
|
|
|
|
accountTokens: [ID!]!
|
|
|
|
|
|
|
|
# The account's password hash
|
|
|
|
passwordHash: String!
|
|
|
|
}
|
|
|
|
|
2021-06-07 17:59:03 +02:00
|
|
|
type ExternalServersPreferences {
|
|
|
|
privacyPreference: PrivacyPreferences
|
2021-05-10 15:18:30 +02:00
|
|
|
externalServers: RestrictionPolicy!
|
|
|
|
externalServersLimit: [Url!]
|
|
|
|
}
|
|
|
|
|
2021-05-10 14:54:17 +02:00
|
|
|
# Everyone = Including all = Excluding none
|
|
|
|
# None = Including none = Excluding all
|
|
|
|
enum RestrictionPolicy {
|
|
|
|
Everyone
|
|
|
|
Excluding
|
|
|
|
Including
|
|
|
|
None
|
|
|
|
}
|