site.graphql 3.2 KB

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