system.graphql 4.0 KB

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