2021-05-10 14:54:17 +02:00
|
|
|
schema {
|
|
|
|
query: Query
|
|
|
|
}
|
|
|
|
|
|
|
|
type Query {
|
|
|
|
users: [User!]!
|
|
|
|
}
|
|
|
|
|
|
|
|
# Hopefully provided by juniper and chrono
|
|
|
|
scalar DateTimeUtc
|
|
|
|
# else it's probably DateTime
|
|
|
|
# scalar DateTime
|
|
|
|
|
|
|
|
# Provided by juniper and url
|
|
|
|
scalar Url
|
|
|
|
|
|
|
|
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 {
|
|
|
|
privacyPreference: PrivacyPreference!
|
|
|
|
notificationPreference: NotificationPreference!
|
2021-05-10 15:05:16 +02:00
|
|
|
securityPreference: SecurityPreference!
|
2021-05-10 15:18:30 +02:00
|
|
|
# TODO: external servers
|
|
|
|
externalServersPreference: ExternalServersPreference!
|
2021-05-10 14:54:17 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
type PrivacyPreference {
|
|
|
|
# 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!]
|
|
|
|
}
|
|
|
|
|
|
|
|
type NotificationPreference {
|
|
|
|
lockDetails: Boolean!
|
|
|
|
doNotDisturb: Boolean!
|
|
|
|
}
|
|
|
|
|
2021-05-10 15:05:16 +02:00
|
|
|
type SecurityPreference {
|
|
|
|
# One-purpose-passwords
|
|
|
|
accountTokens: [ID!]!
|
|
|
|
|
|
|
|
# The account's password hash
|
|
|
|
passwordHash: String!
|
|
|
|
}
|
|
|
|
|
2021-05-10 15:18:30 +02:00
|
|
|
type ExternalServersPreference {
|
|
|
|
privacyPreference: PrivacyPreference
|
|
|
|
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
|
|
|
|
}
|