104 lines
2.1 KiB
JavaScript
Raw Normal View History

import gql from 'graphql-tag'
export default {
AUTHENTICATION: {
QUERY_PROVIDERS: gql`
query {
authentication {
providers {
isEnabled
key
props
title
useForm
config {
key
value
}
}
}
}
`,
QUERY_LOGIN_PROVIDERS: gql`
query {
authentication {
providers(
filter: "isEnabled eq true",
orderBy: "title ASC"
) {
key
title
useForm
icon
}
}
}
`,
MUTATION_LOGIN: gql`
mutation($username: String!, $password: String!, $provider: String!) {
authentication {
login(username: $username, password: $password, provider: $provider) {
operation {
succeeded
code
slug
message
}
tfaRequired
tfaLoginToken
}
}
}
`,
MUTATION_LOGINTFA: gql`
mutation($loginToken: String!, $securityCode: String!) {
authentication {
loginTFA(loginToken: $loginToken, securityCode: $securityCode) {
operation {
succeeded
code
slug
message
}
}
}
2018-01-09 20:41:53 -05:00
}
`
},
2018-03-18 00:34:32 -04:00
SYSTEM: {
QUERY_INFO: gql`
query {
system {
info {
currentVersion
latestVersion
latestVersionReleaseDate
operatingSystem
hostname
cpuCores
ramTotal
workingDirectory
nodeVersion
redisVersion
redisUsedRAM
redisTotalRAM
redisHost
postgreVersion
postgreHost
}
}
}
`
},
TRANSLATIONS: {
QUERY_NAMESPACE: gql`
query($locale: String!, $namespace: String!) {
translations(locale:$locale, namespace:$namespace) {
key
value
}
2018-01-09 20:41:53 -05:00
}
`
}
}