system.graphql 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216
  1. # ===============================================
  2. # SYSTEM
  3. # ===============================================
  4. extend type Query {
  5. systemExtensions: [SystemExtension]
  6. systemFlags: [SystemFlag]
  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. disconnectWS: DefaultResponse
  21. installExtension(
  22. key: String!
  23. ): DefaultResponse
  24. retryJob(
  25. id: UUID!
  26. ): DefaultResponse
  27. updateSystemFlags(
  28. flags: [SystemFlagInput]!
  29. ): DefaultResponse
  30. updateSystemSecurity(
  31. authJwtAudience: String
  32. authJwtExpiration: String
  33. authJwtRenewablePeriod: String
  34. corsConfig: String
  35. corsMode: SystemSecurityCorsMode
  36. cspDirectives: String
  37. disallowFloc: Boolean
  38. disallowIframe: Boolean
  39. disallowOpenRedirect: Boolean
  40. enforceCsp: Boolean
  41. enforceHsts: Boolean
  42. enforceSameOriginReferrerPolicy: Boolean
  43. forceAssetDownload: Boolean
  44. hstsDuration: Int
  45. trustProxy: Boolean
  46. uploadMaxFiles: Int
  47. uploadMaxFileSize: Int
  48. uploadScanSVG: Boolean
  49. ): DefaultResponse
  50. }
  51. # -----------------------------------------------
  52. # TYPES
  53. # -----------------------------------------------
  54. type SystemFlag {
  55. key: String
  56. value: Boolean
  57. }
  58. input SystemFlagInput {
  59. key: String!
  60. value: Boolean!
  61. }
  62. type SystemInfo {
  63. configFile: String
  64. cpuCores: Int
  65. currentVersion: String
  66. dbHost: String
  67. dbType: String
  68. dbVersion: String
  69. groupsTotal: Int
  70. hostname: String
  71. httpPort: Int
  72. httpRedirection: Boolean
  73. httpsPort: Int
  74. isMailConfigured: Boolean
  75. isSchedulerHealthy: Boolean
  76. latestVersion: String
  77. latestVersionReleaseDate: Date
  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. }