You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

72 lines
2.3 KiB

5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
  1. # ===============================================
  2. # SYSTEM
  3. # ===============================================
  4. extend type Query {
  5. system: SystemQuery
  6. }
  7. extend type Mutation {
  8. system: SystemMutation
  9. }
  10. # -----------------------------------------------
  11. # QUERIES
  12. # -----------------------------------------------
  13. type SystemQuery {
  14. flags: [SystemFlag] @auth(requires: ["manage:system"])
  15. info: SystemInfo
  16. }
  17. # -----------------------------------------------
  18. # MUTATIONS
  19. # -----------------------------------------------
  20. type SystemMutation {
  21. updateFlags(
  22. flags: [SystemFlagInput]!
  23. ): DefaultResponse @auth(requires: ["manage:system"])
  24. resetTelemetryClientId: DefaultResponse @auth(requires: ["manage:system"])
  25. setTelemetry(
  26. enabled: Boolean!
  27. ): DefaultResponse @auth(requires: ["manage:system"])
  28. }
  29. # -----------------------------------------------
  30. # TYPES
  31. # -----------------------------------------------
  32. type SystemFlag {
  33. key: String!
  34. value: Boolean!
  35. }
  36. input SystemFlagInput {
  37. key: String!
  38. value: Boolean!
  39. }
  40. type SystemInfo {
  41. configFile: String @auth(requires: ["manage:system"])
  42. cpuCores: Int @auth(requires: ["manage:system"])
  43. currentVersion: String @auth(requires: ["manage:system"])
  44. dbHost: String @auth(requires: ["manage:system"])
  45. dbType: String @auth(requires: ["manage:system"])
  46. dbVersion: String @auth(requires: ["manage:system"])
  47. groupsTotal: Int @auth(requires: ["manage:system", "manage:navigation", "manage:groups", "write:groups", "manage:users", "write:users"])
  48. hostname: String @auth(requires: ["manage:system"])
  49. latestVersion: String @auth(requires: ["manage:system"])
  50. latestVersionReleaseDate: Date @auth(requires: ["manage:system"])
  51. nodeVersion: String @auth(requires: ["manage:system"])
  52. operatingSystem: String @auth(requires: ["manage:system"])
  53. pagesTotal: Int @auth(requires: ["manage:system", "manage:navigation", "manage:pages", "delete:pages"])
  54. platform: String @auth(requires: ["manage:system"])
  55. ramTotal: String @auth(requires: ["manage:system"])
  56. telemetry: Boolean @auth(requires: ["manage:system"])
  57. telemetryClientId: String @auth(requires: ["manage:system"])
  58. usersTotal: Int @auth(requires: ["manage:system", "manage:navigation", "manage:groups", "write:groups", "manage:users", "write:users"])
  59. workingDirectory: String @auth(requires: ["manage:system"])
  60. }