system.graphql 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196
  1. # ===============================================
  2. # SYSTEM
  3. # ===============================================
  4. extend type Query {
  5. systemExtensions: [SystemExtension]
  6. systemFlags: [SystemFlag]
  7. systemInfo: SystemInfo
  8. systemSecurity: SystemSecurity
  9. systemJobs(
  10. state: SystemJobState
  11. ): [SystemJob]
  12. systemJobsScheduled: [SystemJobScheduled]
  13. systemJobsUpcoming: [SystemJobUpcoming]
  14. }
  15. extend type Mutation {
  16. disconnectWS: DefaultResponse
  17. installExtension(
  18. key: String!
  19. ): DefaultResponse
  20. updateSystemFlags(
  21. flags: [SystemFlagInput]!
  22. ): DefaultResponse
  23. updateSystemSecurity(
  24. authJwtAudience: String
  25. authJwtExpiration: String
  26. authJwtRenewablePeriod: String
  27. corsConfig: String
  28. corsMode: SystemSecurityCorsMode
  29. cspDirectives: String
  30. disallowFloc: Boolean
  31. disallowIframe: Boolean
  32. disallowOpenRedirect: Boolean
  33. enforceCsp: Boolean
  34. enforceHsts: Boolean
  35. enforceSameOriginReferrerPolicy: Boolean
  36. forceAssetDownload: Boolean
  37. hstsDuration: Int
  38. trustProxy: Boolean
  39. uploadMaxFiles: Int
  40. uploadMaxFileSize: Int
  41. uploadScanSVG: Boolean
  42. ): DefaultResponse
  43. }
  44. # -----------------------------------------------
  45. # TYPES
  46. # -----------------------------------------------
  47. type SystemFlag {
  48. key: String
  49. value: Boolean
  50. }
  51. input SystemFlagInput {
  52. key: String!
  53. value: Boolean!
  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. enum SystemImportUsersGroupMode {
  87. MULTI
  88. SINGLE
  89. NONE
  90. }
  91. type SystemImportUsersResponse {
  92. operation: Operation
  93. usersCount: Int
  94. groupsCount: Int
  95. failed: [SystemImportUsersResponseFailed]
  96. }
  97. type SystemImportUsersResponseFailed {
  98. provider: String
  99. email: String
  100. error: String
  101. }
  102. type SystemExtension {
  103. key: String
  104. title: String
  105. description: String
  106. isInstalled: Boolean
  107. isInstallable: Boolean
  108. isCompatible: Boolean
  109. }
  110. type SystemSecurity {
  111. authJwtAudience: String
  112. authJwtExpiration: String
  113. authJwtRenewablePeriod: String
  114. corsConfig: String
  115. corsMode: SystemSecurityCorsMode
  116. cspDirectives: String
  117. disallowFloc: Boolean
  118. disallowIframe: Boolean
  119. disallowOpenRedirect: Boolean
  120. enforceCsp: Boolean
  121. enforceHsts: Boolean
  122. enforceSameOriginReferrerPolicy: Boolean
  123. forceAssetDownload: Boolean
  124. hstsDuration: Int
  125. trustProxy: Boolean
  126. uploadMaxFiles: Int
  127. uploadMaxFileSize: Int
  128. uploadScanSVG: Boolean
  129. }
  130. enum SystemSecurityCorsMode {
  131. OFF
  132. REFLECT
  133. HOSTNAMES
  134. REGEX
  135. }
  136. type SystemJob {
  137. id: UUID
  138. task: String
  139. state: SystemJobState
  140. useWorker: Boolean
  141. wasScheduled: Boolean
  142. payload: JSON
  143. attempt: Int
  144. maxRetries: Int
  145. lastErrorMessage: String
  146. createdAt: Date
  147. startedAt: Date
  148. completedAt: Date
  149. }
  150. type SystemJobScheduled {
  151. id: UUID
  152. task: String
  153. cron: String
  154. type: String
  155. payload: JSON
  156. createdAt: Date
  157. updatedAt: Date
  158. }
  159. type SystemJobUpcoming {
  160. id: UUID
  161. task: String
  162. useWorker: Boolean
  163. payload: JSON
  164. retries: Int
  165. maxRetries: Int
  166. waitUntil: Date
  167. isScheduled: Boolean
  168. createdBy: String
  169. createdAt: Date
  170. updatedAt: Date
  171. }
  172. enum SystemJobState {
  173. ACTIVE
  174. COMPLETED
  175. FAILED
  176. INTERRUPTED
  177. }