system.graphql 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228
  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. nodeVersion: String
  78. operatingSystem: String
  79. pagesTotal: Int
  80. platform: String
  81. ramTotal: String
  82. sslDomain: String
  83. sslExpirationDate: Date
  84. sslProvider: String
  85. sslStatus: String
  86. sslSubscriberEmail: String
  87. tagsTotal: Int
  88. upgradeCapable: Boolean
  89. usersTotal: Int
  90. workingDirectory: String
  91. }
  92. type SystemInstance {
  93. id: String
  94. activeConnections: Int
  95. activeListeners: Int
  96. dbUser: String
  97. dbFirstSeen: Date
  98. dbLastSeen: Date
  99. ip: String
  100. }
  101. enum SystemImportUsersGroupMode {
  102. MULTI
  103. SINGLE
  104. NONE
  105. }
  106. type SystemImportUsersResponse {
  107. operation: Operation
  108. usersCount: Int
  109. groupsCount: Int
  110. failed: [SystemImportUsersResponseFailed]
  111. }
  112. type SystemImportUsersResponseFailed {
  113. provider: String
  114. email: String
  115. error: String
  116. }
  117. type SystemExtension {
  118. key: String
  119. title: String
  120. description: String
  121. isInstalled: Boolean
  122. isInstallable: Boolean
  123. isCompatible: Boolean
  124. }
  125. type SystemSecurity {
  126. authJwtAudience: String
  127. authJwtExpiration: String
  128. authJwtRenewablePeriod: String
  129. corsConfig: String
  130. corsMode: SystemSecurityCorsMode
  131. cspDirectives: String
  132. disallowFloc: Boolean
  133. disallowIframe: Boolean
  134. disallowOpenRedirect: Boolean
  135. enforceCsp: Boolean
  136. enforceHsts: Boolean
  137. enforceSameOriginReferrerPolicy: Boolean
  138. forceAssetDownload: Boolean
  139. hstsDuration: Int
  140. trustProxy: Boolean
  141. uploadMaxFiles: Int
  142. uploadMaxFileSize: Int
  143. uploadScanSVG: Boolean
  144. }
  145. enum SystemSecurityCorsMode {
  146. OFF
  147. REFLECT
  148. HOSTNAMES
  149. REGEX
  150. }
  151. type SystemJob {
  152. id: UUID
  153. task: String
  154. state: SystemJobState
  155. useWorker: Boolean
  156. wasScheduled: Boolean
  157. payload: JSON
  158. attempt: Int
  159. maxRetries: Int
  160. lastErrorMessage: String
  161. executedBy: String
  162. createdAt: Date
  163. startedAt: Date
  164. completedAt: Date
  165. }
  166. type SystemJobScheduled {
  167. id: UUID
  168. task: String
  169. cron: String
  170. type: String
  171. payload: JSON
  172. createdAt: Date
  173. updatedAt: Date
  174. }
  175. type SystemJobUpcoming {
  176. id: UUID
  177. task: String
  178. useWorker: Boolean
  179. payload: JSON
  180. retries: Int
  181. maxRetries: Int
  182. waitUntil: Date
  183. isScheduled: Boolean
  184. createdBy: String
  185. createdAt: Date
  186. updatedAt: Date
  187. }
  188. enum SystemJobState {
  189. ACTIVE
  190. COMPLETED
  191. FAILED
  192. INTERRUPTED
  193. }
  194. type SystemCheckUpdateResponse {
  195. operation: Operation
  196. current: String
  197. latest: String
  198. latestDate: String
  199. }
  200. type SystemSearch {
  201. termHighlighting: Boolean
  202. dictOverrides: String
  203. }