system.graphql 3.8 KB

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