2020-11-06 13:31:28 +00:00
|
|
|
# source: http://localhost:4000/graphql
|
|
|
|
# timestamp: Thu May 07 2020 16:24:38 GMT-0400 (Amazon Standard Time)
|
|
|
|
|
|
|
|
directive @auth(roles: [String!]) on FIELD_DEFINITION
|
|
|
|
|
2022-06-14 13:26:01 +00:00
|
|
|
directive @cacheControl(
|
|
|
|
maxAge: Int
|
|
|
|
scope: CacheControlScope
|
|
|
|
) on FIELD_DEFINITION | OBJECT | INTERFACE
|
2020-11-06 13:31:28 +00:00
|
|
|
|
|
|
|
type AuthPayload {
|
|
|
|
user: User!
|
|
|
|
token: String!
|
|
|
|
expiresIn: String!
|
|
|
|
}
|
|
|
|
|
|
|
|
enum CacheControlScope {
|
|
|
|
PUBLIC
|
|
|
|
PRIVATE
|
|
|
|
}
|
|
|
|
|
|
|
|
input CreateResetTokenInput {
|
|
|
|
username: String!
|
|
|
|
}
|
|
|
|
|
|
|
|
type Group {
|
|
|
|
cn: String!
|
|
|
|
dn: String!
|
|
|
|
name: String
|
|
|
|
members: [User!]!
|
|
|
|
}
|
|
|
|
|
|
|
|
input GroupWhereInput {
|
|
|
|
cn: String
|
|
|
|
dn: String
|
|
|
|
name: String
|
|
|
|
}
|
|
|
|
|
|
|
|
input LoginInput {
|
|
|
|
username: String!
|
|
|
|
password: String!
|
|
|
|
}
|
|
|
|
|
|
|
|
type Mutation {
|
|
|
|
login(data: LoginInput!): AuthPayload!
|
|
|
|
updatePassword(data: UpdatePasswordInput!): AuthPayload!
|
|
|
|
replacePassword(data: ReplacePasswordInput!): String!
|
|
|
|
createResetToken(data: CreateResetTokenInput!): ResetToken!
|
|
|
|
useResetToken(data: UseResetTokenInput!): Boolean!
|
|
|
|
importUsers: String!
|
|
|
|
}
|
|
|
|
|
|
|
|
type Query {
|
2022-06-14 13:26:01 +00:00
|
|
|
"""
|
|
|
|
Returns only a few fields of User
|
|
|
|
"""
|
2020-11-06 13:31:28 +00:00
|
|
|
basicUser(sAMAccountName: String!): User!
|
|
|
|
me: User!
|
2022-06-14 13:26:01 +00:00
|
|
|
users(
|
|
|
|
where: UserWhereInput!
|
|
|
|
limit: Int = 15
|
|
|
|
onlyStudents: Boolean = false
|
|
|
|
): [User!]
|
2020-11-06 13:31:28 +00:00
|
|
|
user(sAMAccountName: String!): User!
|
|
|
|
groups(where: GroupWhereInput!, limit: Int = 10): [Group!]!
|
|
|
|
stats: Stats!
|
2022-06-14 13:26:01 +00:00
|
|
|
wifiDevices(
|
|
|
|
search: String = ""
|
|
|
|
identifiedOnly: Boolean = true
|
|
|
|
): [WifiDevice]!
|
2020-11-06 13:31:28 +00:00
|
|
|
userPresence(search: String): [UserPresence!]
|
|
|
|
}
|
|
|
|
|
|
|
|
input ReplacePasswordInput {
|
|
|
|
username: String!
|
|
|
|
newPassword: String!
|
|
|
|
}
|
|
|
|
|
|
|
|
type ResetToken {
|
|
|
|
id: ID!
|
|
|
|
user: User!
|
|
|
|
creator: User!
|
|
|
|
token: String!
|
|
|
|
expiration: String!
|
|
|
|
createdAt: String!
|
|
|
|
updatedAt: String!
|
|
|
|
}
|
|
|
|
|
|
|
|
type Stats {
|
|
|
|
tokenCountTotal: Int!
|
|
|
|
tokenCountUsed: Int!
|
|
|
|
tokenCountExpired: Int!
|
|
|
|
tokenCountNotUsed: Int!
|
|
|
|
}
|
|
|
|
|
|
|
|
enum Status {
|
|
|
|
ONLINE
|
|
|
|
OFFLINE
|
|
|
|
}
|
|
|
|
|
|
|
|
input UpdatePasswordInput {
|
|
|
|
oldPassword: String!
|
|
|
|
newPassword: String!
|
|
|
|
}
|
|
|
|
|
2022-06-14 13:26:01 +00:00
|
|
|
"""
|
|
|
|
The `Upload` scalar type represents a file upload.
|
|
|
|
"""
|
2020-11-06 13:31:28 +00:00
|
|
|
scalar Upload
|
|
|
|
|
2022-06-14 13:26:01 +00:00
|
|
|
"""
|
|
|
|
A mix between the database User and the Active Directory User
|
|
|
|
"""
|
2020-11-06 13:31:28 +00:00
|
|
|
type User {
|
|
|
|
id: ID
|
|
|
|
wifiDevices: [WifiDevice!]
|
|
|
|
lastLogin: String
|
|
|
|
lastLoginPrior: String
|
|
|
|
roles: [String!]
|
|
|
|
firstName: String
|
|
|
|
groups: [Group!]
|
|
|
|
isSuperAdmin: Boolean!
|
|
|
|
isTokenCreator: Boolean!
|
|
|
|
isServant: Boolean!
|
|
|
|
isStudent: Boolean!
|
|
|
|
isWatcher: Boolean!
|
|
|
|
createdAt: String!
|
|
|
|
updatedAt: String!
|
|
|
|
accountExpires: String
|
|
|
|
badPasswordTime: String
|
|
|
|
badPwdCount: String
|
|
|
|
cn: String
|
|
|
|
department: String
|
|
|
|
description: String
|
|
|
|
displayName: String
|
|
|
|
distinguishedName: String
|
|
|
|
dn: String
|
|
|
|
extensionAttribute1: String
|
|
|
|
extensionAttribute10: String
|
|
|
|
extensionAttribute2: String
|
|
|
|
extensionAttribute6: String
|
|
|
|
extensionAttribute7: String
|
|
|
|
givenName: String
|
|
|
|
homeDirectory: String
|
|
|
|
homeDrive: String
|
|
|
|
lastLogon: String
|
|
|
|
lastLogonTimestamp: String
|
|
|
|
lockoutTime: String
|
|
|
|
logonCount: String
|
|
|
|
mail: String
|
|
|
|
name: String
|
|
|
|
objectCategory: String
|
|
|
|
objectGUID: String
|
|
|
|
objectSid: String
|
|
|
|
primaryGroupID: String
|
|
|
|
pwdLastSet: String
|
|
|
|
sAMAccountName: String!
|
|
|
|
sAMAccountType: String
|
|
|
|
sn: String
|
|
|
|
thumbnailPhoto: String
|
|
|
|
title: String
|
|
|
|
userAccountControl: String
|
|
|
|
userPrincipalName: String
|
|
|
|
whenChanged: String
|
|
|
|
whenCreated: String
|
|
|
|
}
|
|
|
|
|
|
|
|
input UseResetTokenInput {
|
|
|
|
token: String!
|
|
|
|
newPassword: String!
|
|
|
|
}
|
|
|
|
|
|
|
|
type UserPresence {
|
|
|
|
user: User!
|
|
|
|
wifiDevices: [WifiDevice!]!
|
|
|
|
}
|
|
|
|
|
|
|
|
input UserWhereInput {
|
|
|
|
cn: String
|
|
|
|
displayName: String
|
|
|
|
sAMAccountName: String
|
|
|
|
}
|
|
|
|
|
|
|
|
type WifiDevice {
|
|
|
|
user: User
|
|
|
|
id: String
|
|
|
|
oui: String
|
|
|
|
mac: String
|
|
|
|
hostname: String
|
|
|
|
firstSeen: String
|
|
|
|
lastSeen: String
|
|
|
|
essid: String
|
|
|
|
ip: String
|
2022-06-14 13:26:01 +00:00
|
|
|
uptime: Int
|
2020-11-06 13:31:28 +00:00
|
|
|
apName: String
|
|
|
|
status: Status
|
|
|
|
}
|