system.graphql 3.8 KB

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