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.

114 lines
3.6 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. performUpgrade: DefaultResponse @auth(requires: ["manage:system"])
  29. importUsersFromV1(
  30. mongoDbConnString: String!
  31. groupMode: SystemImportUsersGroupMode!
  32. ): SystemImportUsersResponse @auth(requires: ["manage:system"])
  33. setHTTPSRedirection(
  34. enabled: Boolean!
  35. ): DefaultResponse @auth(requires: ["manage:system"])
  36. renewHTTPSCertificate: DefaultResponse @auth(requires: ["manage:system"])
  37. }
  38. # -----------------------------------------------
  39. # TYPES
  40. # -----------------------------------------------
  41. type SystemFlag {
  42. key: String!
  43. value: Boolean!
  44. }
  45. input SystemFlagInput {
  46. key: String!
  47. value: Boolean!
  48. }
  49. type SystemInfo {
  50. configFile: String @auth(requires: ["manage:system"])
  51. cpuCores: Int @auth(requires: ["manage:system"])
  52. currentVersion: String @auth(requires: ["manage:system"])
  53. dbHost: String @auth(requires: ["manage:system"])
  54. dbType: String @auth(requires: ["manage:system"])
  55. dbVersion: String @auth(requires: ["manage:system"])
  56. groupsTotal: Int @auth(requires: ["manage:system", "manage:navigation", "manage:groups", "write:groups", "manage:users", "write:users"])
  57. hostname: String @auth(requires: ["manage:system"])
  58. httpPort: Int @auth(requires: ["manage:system"])
  59. httpRedirection: Boolean @auth(requires: ["manage:system"])
  60. httpsPort: Int @auth(requires: ["manage:system"])
  61. latestVersion: String @auth(requires: ["manage:system"])
  62. latestVersionReleaseDate: Date @auth(requires: ["manage:system"])
  63. nodeVersion: String @auth(requires: ["manage:system"])
  64. operatingSystem: String @auth(requires: ["manage:system"])
  65. pagesTotal: Int @auth(requires: ["manage:system", "manage:navigation", "manage:pages", "delete:pages"])
  66. platform: String @auth(requires: ["manage:system"])
  67. ramTotal: String @auth(requires: ["manage:system"])
  68. sslDomain: String @auth(requires: ["manage:system"])
  69. sslExpirationDate: Date @auth(requires: ["manage:system"])
  70. sslProvider: String @auth(requires: ["manage:system"])
  71. sslStatus: String @auth(requires: ["manage:system"])
  72. sslSubscriberEmail: String @auth(requires: ["manage:system"])
  73. tagsTotal: Int @auth(requires: ["manage:system", "manage:navigation", "manage:pages", "delete:pages"])
  74. telemetry: Boolean @auth(requires: ["manage:system"])
  75. telemetryClientId: String @auth(requires: ["manage:system"])
  76. upgradeCapable: Boolean @auth(requires: ["manage:system"])
  77. usersTotal: Int @auth(requires: ["manage:system", "manage:navigation", "manage:groups", "write:groups", "manage:users", "write:users"])
  78. workingDirectory: String @auth(requires: ["manage:system"])
  79. }
  80. enum SystemImportUsersGroupMode {
  81. MULTI
  82. SINGLE
  83. NONE
  84. }
  85. type SystemImportUsersResponse {
  86. responseResult: ResponseStatus
  87. usersCount: Int
  88. groupsCount: Int
  89. failed: [SystemImportUsersResponseFailed]
  90. }
  91. type SystemImportUsersResponseFailed {
  92. provider: String
  93. email: String
  94. error: String
  95. }