type RegisterResponse { accessToken: String! refreshToken: String! } enum WorkerKind { COMPLETION CHAT } type Mutation { resetRegistrationToken: String! register(email: String!, password1: String!, password2: String!, invitationCode: String): RegisterResponse! tokenAuth(email: String!, password: String!): TokenAuthResponse! verifyToken(token: String!): VerifyTokenResponse! refreshToken(refreshToken: String!): RefreshTokenResponse! createInvitation(email: String!): Int! deleteInvitation(id: Int!): Int! } "DateTime" scalar DateTimeUtc type VerifyTokenResponse { claims: JWTPayload! } type JWTPayload { "Expiration time (as UTC timestamp)" exp: Float! "Issued at (as UTC timestamp)" iat: Float! "User email address" sub: String! "Whether the user is admin." isAdmin: Boolean! } type Query { workers: [Worker!]! registrationToken: String! isAdminInitialized: Boolean! invitations: [Invitation!]! me: User! } type Invitation { id: Int! email: String! code: String! createdAt: String! } type User { email: String! isAdmin: Boolean! authToken: String! } type Worker { kind: WorkerKind! name: String! addr: String! device: String! arch: String! cpuInfo: String! cpuCount: Int! cudaDevices: [String!]! } type TokenAuthResponse { accessToken: String! refreshToken: String! } type RefreshTokenResponse { accessToken: String! refreshToken: String! refreshExpiresAt: DateTimeUtc! } schema { query: Query mutation: Mutation }