system.graphql 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229
  1. # ===============================================
  2. # SYSTEM
  3. # ===============================================
  4. extend type Query {
  5. systemExtensions: [SystemExtension]
  6. systemFlags: JSON
  7. systemInfo: SystemInfo
  8. systemInstances: [SystemInstance]
  9. systemSecurity: SystemSecurity
  10. systemJobs(
  11. states: [SystemJobState]
  12. ): [SystemJob]
  13. systemJobsScheduled: [SystemJobScheduled]
  14. systemJobsUpcoming: [SystemJobUpcoming]
  15. systemSearch: SystemSearch
  16. }
  17. extend type Mutation {
  18. cancelJob(
  19. id: UUID!
  20. ): DefaultResponse
  21. checkForUpdates: SystemCheckUpdateResponse
  22. disconnectWS: DefaultResponse
  23. installExtension(
  24. key: String!
  25. ): DefaultResponse
  26. rebuildSearchIndex: DefaultResponse
  27. retryJob(
  28. id: UUID!
  29. ): DefaultResponse
  30. updateSystemSearch(
  31. termHighlighting: Boolean
  32. dictOverrides: String
  33. ): DefaultResponse
  34. updateSystemFlags(
  35. flags: JSON!
  36. ): DefaultResponse
  37. updateSystemSecurity(
  38. authJwtAudience: String
  39. authJwtExpiration: String
  40. authJwtRenewablePeriod: String
  41. corsConfig: String
  42. corsMode: SystemSecurityCorsMode
  43. cspDirectives: String
  44. disallowFloc: Boolean
  45. disallowIframe: Boolean
  46. disallowOpenRedirect: Boolean
  47. enforceCsp: Boolean
  48. enforceHsts: Boolean
  49. enforceSameOriginReferrerPolicy: Boolean
  50. forceAssetDownload: Boolean
  51. hstsDuration: Int
  52. trustProxy: Boolean
  53. uploadMaxFiles: Int
  54. uploadMaxFileSize: Int
  55. uploadScanSVG: Boolean
  56. ): DefaultResponse
  57. }
  58. # -----------------------------------------------
  59. # TYPES
  60. # -----------------------------------------------
  61. type SystemInfo {
  62. configFile: String
  63. cpuCores: Int
  64. currentVersion: String
  65. dbHost: String
  66. dbType: String
  67. dbVersion: String
  68. groupsTotal: Int
  69. hostname: String
  70. httpPort: Int
  71. httpRedirection: Boolean
  72. httpsPort: Int
  73. isMailConfigured: Boolean
  74. isSchedulerHealthy: Boolean
  75. latestVersion: String
  76. latestVersionReleaseDate: Date
  77. loginsPastDay: Int
  78. nodeVersion: String
  79. operatingSystem: String
  80. pagesTotal: Int
  81. platform: String
  82. ramTotal: String
  83. sslDomain: String
  84. sslExpirationDate: Date
  85. sslProvider: String
  86. sslStatus: String
  87. sslSubscriberEmail: String
  88. tagsTotal: Int
  89. upgradeCapable: Boolean
  90. usersTotal: Int
  91. workingDirectory: String
  92. }
  93. type SystemInstance {
  94. id: String
  95. activeConnections: Int
  96. activeListeners: Int
  97. dbUser: String
  98. dbFirstSeen: Date
  99. dbLastSeen: Date
  100. ip: String
  101. }
  102. enum SystemImportUsersGroupMode {
  103. MULTI
  104. SINGLE
  105. NONE
  106. }
  107. type SystemImportUsersResponse {
  108. operation: Operation
  109. usersCount: Int
  110. groupsCount: Int
  111. failed: [SystemImportUsersResponseFailed]
  112. }
  113. type SystemImportUsersResponseFailed {
  114. provider: String
  115. email: String
  116. error: String
  117. }
  118. type SystemExtension {
  119. key: String
  120. title: String
  121. description: String
  122. isInstalled: Boolean
  123. isInstallable: Boolean
  124. isCompatible: Boolean
  125. }
  126. type SystemSecurity {
  127. authJwtAudience: String
  128. authJwtExpiration: String
  129. authJwtRenewablePeriod: String
  130. corsConfig: String
  131. corsMode: SystemSecurityCorsMode
  132. cspDirectives: String
  133. disallowFloc: Boolean
  134. disallowIframe: Boolean
  135. disallowOpenRedirect: Boolean
  136. enforceCsp: Boolean
  137. enforceHsts: Boolean
  138. enforceSameOriginReferrerPolicy: Boolean
  139. forceAssetDownload: Boolean
  140. hstsDuration: Int
  141. trustProxy: Boolean
  142. uploadMaxFiles: Int
  143. uploadMaxFileSize: Int
  144. uploadScanSVG: Boolean
  145. }
  146. enum SystemSecurityCorsMode {
  147. OFF
  148. REFLECT
  149. HOSTNAMES
  150. REGEX
  151. }
  152. type SystemJob {
  153. id: UUID
  154. task: String
  155. state: SystemJobState
  156. useWorker: Boolean
  157. wasScheduled: Boolean
  158. payload: JSON
  159. attempt: Int
  160. maxRetries: Int
  161. lastErrorMessage: String
  162. executedBy: String
  163. createdAt: Date
  164. startedAt: Date
  165. completedAt: Date
  166. }
  167. type SystemJobScheduled {
  168. id: UUID
  169. task: String
  170. cron: String
  171. type: String
  172. payload: JSON
  173. createdAt: Date
  174. updatedAt: Date
  175. }
  176. type SystemJobUpcoming {
  177. id: UUID
  178. task: String
  179. useWorker: Boolean
  180. payload: JSON
  181. retries: Int
  182. maxRetries: Int
  183. waitUntil: Date
  184. isScheduled: Boolean
  185. createdBy: String
  186. createdAt: Date
  187. updatedAt: Date
  188. }
  189. enum SystemJobState {
  190. ACTIVE
  191. COMPLETED
  192. FAILED
  193. INTERRUPTED
  194. }
  195. type SystemCheckUpdateResponse {
  196. operation: Operation
  197. current: String
  198. latest: String
  199. latestDate: String
  200. }
  201. type SystemSearch {
  202. termHighlighting: Boolean
  203. dictOverrides: String
  204. }