site.graphql 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177
  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. logoText: Boolean
  48. sitemap: Boolean
  49. robots: SiteRobots
  50. features: SiteFeatures
  51. defaults: SiteDefaults
  52. locale: String
  53. localeNamespaces: [String]
  54. localeNamespacing: Boolean
  55. theme: SiteTheme
  56. }
  57. type SiteRobots {
  58. index: Boolean
  59. follow: Boolean
  60. }
  61. type SiteFeatures {
  62. ratings: Boolean
  63. ratingsMode: SitePageRatingModes
  64. comments: Boolean
  65. contributions: Boolean
  66. profile: Boolean
  67. search: Boolean
  68. }
  69. type SiteDefaults {
  70. timezone: String
  71. dateFormat: String
  72. timeFormat: String
  73. }
  74. type SiteLocale {
  75. locale: String
  76. autoUpdate: Boolean
  77. namespacing: Boolean
  78. namespaces: [String]
  79. }
  80. type SiteTheme {
  81. dark: Boolean
  82. colorPrimary: String
  83. colorSecondary: String
  84. colorAccent: String
  85. colorHeader: String
  86. colorSidebar: String
  87. injectCSS: String
  88. injectHead: String
  89. injectBody: String
  90. sidebarPosition: SiteThemePosition
  91. tocPosition: SiteThemePosition
  92. showSharingMenu: Boolean
  93. showPrintBtn: Boolean
  94. }
  95. enum SiteThemePosition {
  96. left
  97. right
  98. }
  99. enum SitePageRatingModes {
  100. off
  101. thumbs
  102. stars
  103. }
  104. type SiteCreateResponse {
  105. operation: Operation
  106. site: Site
  107. }
  108. input SiteUpdateInput {
  109. hostname: String
  110. isEnabled: Boolean
  111. title: String
  112. description: String
  113. company: String
  114. contentLicense: String
  115. footerExtra: String
  116. logoText: Boolean
  117. sitemap: Boolean
  118. robots: SiteRobotsInput
  119. features: SiteFeaturesInput
  120. defaults: SiteDefaultsInput
  121. theme: SiteThemeInput
  122. }
  123. input SiteRobotsInput {
  124. index: Boolean
  125. follow: Boolean
  126. }
  127. input SiteFeaturesInput {
  128. ratings: Boolean
  129. ratingsMode: SitePageRatingModes
  130. comments: Boolean
  131. contributions: Boolean
  132. profile: Boolean
  133. search: Boolean
  134. }
  135. input SiteDefaultsInput {
  136. timezone: String
  137. dateFormat: String
  138. timeFormat: String
  139. }
  140. input SiteThemeInput {
  141. dark: Boolean
  142. colorPrimary: String
  143. colorSecondary: String
  144. colorAccent: String
  145. colorHeader: String
  146. colorSidebar: String
  147. injectCSS: String
  148. injectHead: String
  149. injectBody: String
  150. sidebarPosition: SiteThemePosition
  151. tocPosition: SiteThemePosition
  152. showSharingMenu: Boolean
  153. showPrintBtn: Boolean
  154. }