site.graphql 3.4 KB

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