site.graphql 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179
  1. # ===============================================
  2. # SITES
  3. # ===============================================
  4. extend type Query {
  5. sites: [Site] @auth(requires: ["manage:system"])
  6. siteById (
  7. id: UUID!
  8. ): Site @auth(requires: ["manage:system"])
  9. siteByHostname (
  10. hostname: String!
  11. exact: Boolean!
  12. ): Site @auth(requires: ["manage:system"])
  13. }
  14. extend type Mutation {
  15. createSite (
  16. hostname: String!
  17. title: String!
  18. ): SiteCreateResponse @auth(requires: ["manage:system"])
  19. updateSite (
  20. id: UUID!
  21. patch: SiteUpdateInput!
  22. ): DefaultResponse @auth(requires: ["manage:system"])
  23. uploadSiteLogo (
  24. id: UUID!
  25. image: Upload!
  26. ): DefaultResponse @auth(requires: ["manage:system"])
  27. uploadSiteFavicon (
  28. id: UUID!
  29. image: Upload!
  30. ): DefaultResponse @auth(requires: ["manage:system"])
  31. deleteSite (
  32. id: UUID!
  33. ): DefaultResponse @auth(requires: ["manage:system"])
  34. }
  35. # -----------------------------------------------
  36. # TYPES
  37. # -----------------------------------------------
  38. type Site {
  39. id: UUID
  40. hostname: String
  41. isEnabled: Boolean
  42. title: String
  43. description: String
  44. company: String
  45. contentLicense: String
  46. footerExtra: String
  47. pageExtensions: String
  48. logoText: Boolean
  49. sitemap: Boolean
  50. robots: SiteRobots
  51. features: SiteFeatures
  52. defaults: SiteDefaults
  53. locale: String
  54. localeNamespaces: [String]
  55. localeNamespacing: Boolean
  56. theme: SiteTheme
  57. }
  58. type SiteRobots {
  59. index: Boolean
  60. follow: Boolean
  61. }
  62. type SiteFeatures {
  63. ratings: Boolean
  64. ratingsMode: SitePageRatingModes
  65. comments: Boolean
  66. contributions: Boolean
  67. profile: Boolean
  68. search: Boolean
  69. }
  70. type SiteDefaults {
  71. timezone: String
  72. dateFormat: String
  73. timeFormat: String
  74. }
  75. type SiteLocale {
  76. locale: String
  77. autoUpdate: Boolean
  78. namespacing: Boolean
  79. namespaces: [String]
  80. }
  81. type SiteTheme {
  82. dark: Boolean
  83. colorPrimary: String
  84. colorSecondary: String
  85. colorAccent: String
  86. colorHeader: String
  87. colorSidebar: String
  88. injectCSS: String
  89. injectHead: String
  90. injectBody: String
  91. sidebarPosition: SiteThemePosition
  92. tocPosition: SiteThemePosition
  93. showSharingMenu: Boolean
  94. showPrintBtn: Boolean
  95. }
  96. enum SiteThemePosition {
  97. left
  98. right
  99. }
  100. enum SitePageRatingModes {
  101. off
  102. thumbs
  103. stars
  104. }
  105. type SiteCreateResponse {
  106. operation: Operation
  107. site: Site
  108. }
  109. input SiteUpdateInput {
  110. hostname: String
  111. isEnabled: Boolean
  112. title: String
  113. description: String
  114. company: String
  115. contentLicense: String
  116. footerExtra: String
  117. pageExtensions: String
  118. logoText: Boolean
  119. sitemap: Boolean
  120. robots: SiteRobotsInput
  121. features: SiteFeaturesInput
  122. defaults: SiteDefaultsInput
  123. theme: SiteThemeInput
  124. }
  125. input SiteRobotsInput {
  126. index: Boolean
  127. follow: Boolean
  128. }
  129. input SiteFeaturesInput {
  130. ratings: Boolean
  131. ratingsMode: SitePageRatingModes
  132. comments: Boolean
  133. contributions: Boolean
  134. profile: Boolean
  135. search: Boolean
  136. }
  137. input SiteDefaultsInput {
  138. timezone: String
  139. dateFormat: String
  140. timeFormat: String
  141. }
  142. input SiteThemeInput {
  143. dark: Boolean
  144. colorPrimary: String
  145. colorSecondary: String
  146. colorAccent: String
  147. colorHeader: String
  148. colorSidebar: String
  149. injectCSS: String
  150. injectHead: String
  151. injectBody: String
  152. sidebarPosition: SiteThemePosition
  153. tocPosition: SiteThemePosition
  154. showSharingMenu: Boolean
  155. showPrintBtn: Boolean
  156. }