2023-01-20 09:20:06 +02:00
|
|
|
scalar Base64
|
|
|
|
|
|
|
|
scalar Date
|
|
|
|
|
|
|
|
scalar Email
|
|
|
|
|
|
|
|
scalar KeyID
|
|
|
|
|
2023-04-10 11:37:43 +03:00
|
|
|
scalar PhoneNumber
|
|
|
|
|
2023-01-20 09:20:06 +02:00
|
|
|
scalar Time
|
|
|
|
|
|
|
|
scalar TokenID
|
|
|
|
|
|
|
|
scalar UserID
|
|
|
|
|
|
|
|
enum Unit {
|
|
|
|
Unit
|
|
|
|
Unit2
|
|
|
|
}
|
|
|
|
|
|
|
|
type PGPKey {
|
|
|
|
id: KeyID!
|
|
|
|
pgpKeyData: Base64!
|
|
|
|
expires: Time
|
|
|
|
uploaded: Time!
|
|
|
|
comment: String!
|
|
|
|
}
|
|
|
|
|
|
|
|
type Token {
|
|
|
|
id: TokenID!
|
|
|
|
name: String
|
|
|
|
tokenData: String!
|
|
|
|
comment: String!
|
|
|
|
issued: Time!
|
|
|
|
expires: Time
|
|
|
|
permissions: String!
|
|
|
|
}
|
|
|
|
|
|
|
|
type User {
|
|
|
|
id: UserID!
|
|
|
|
email: Email
|
|
|
|
pendingEmail: Email
|
|
|
|
name: String!
|
|
|
|
nickname: String!
|
2023-04-10 11:37:43 +03:00
|
|
|
phoneNumber: PhoneNumber!
|
2023-01-20 09:20:06 +02:00
|
|
|
birthdate: Date!
|
|
|
|
homeplace: String!
|
|
|
|
registered: Time!
|
|
|
|
accepted: Time
|
|
|
|
permissions: String!
|
|
|
|
isMember: Boolean!
|
|
|
|
application: String!
|
2023-10-19 09:40:23 +03:00
|
|
|
tokens: [Token!]!
|
|
|
|
keys: [PGPKey!]!
|
|
|
|
primaryKey: PGPKey
|
2023-01-20 09:20:06 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
type Query {
|
|
|
|
users: [User!]!
|
|
|
|
user(id: UserID): User
|
|
|
|
applications: [User!]!
|
|
|
|
permissions: String!
|
|
|
|
}
|
|
|
|
|
|
|
|
type Mutation {
|
2023-04-10 11:37:43 +03:00
|
|
|
apply(email: Email!, phoneNumber: PhoneNumber!, password: String!, name: String!, nickname: String, birthdate: Date!, homeplace: String!, application: String!): User!
|
2023-01-20 09:20:06 +02:00
|
|
|
verifyEmail(secret: String!): Unit!
|
|
|
|
resendVerificationEmail(user: UserID): Unit!
|
2023-10-31 09:27:27 +02:00
|
|
|
update(email: Email, phoneNumber: PhoneNumber, password: String, name: String, nickname: String, homeplace: String, application: String, user: UserID): User!
|
2023-01-20 09:20:06 +02:00
|
|
|
newToken(comment: String, name: String, permissions: String): Token!
|
|
|
|
newKey(comment: String, keyData: Base64!, expires: Time): PGPKey!
|
|
|
|
accept(user: UserID!): Unit!
|
|
|
|
reject(user: UserID!): Unit!
|
|
|
|
}
|