page.graphql 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318
  1. # ===============================================
  2. # PAGES
  3. # ===============================================
  4. extend type Query {
  5. pageHistoryById(
  6. id: Int!
  7. offsetPage: Int
  8. offsetSize: Int
  9. ): PageHistoryResult
  10. pageVersionById(
  11. pageId: Int!
  12. versionId: Int!
  13. ): PageVersion
  14. searchPages(
  15. query: String!
  16. path: String
  17. locale: String
  18. ): PageSearchResponse!
  19. pages(
  20. limit: Int
  21. orderBy: PageOrderBy
  22. orderByDirection: PageOrderByDirection
  23. tags: [String!]
  24. locale: String
  25. creatorId: Int
  26. authorId: Int
  27. ): [PageListItem!]!
  28. pageById(
  29. id: Int!
  30. ): Page
  31. pageByPath(
  32. path: String!
  33. ): Page
  34. tags: [PageTag]!
  35. searchTags(
  36. query: String!
  37. ): [String]!
  38. pageTree(
  39. path: String
  40. parent: Int
  41. mode: PageTreeMode!
  42. locale: String!
  43. includeAncestors: Boolean
  44. ): [PageTreeItem]
  45. pageLinks(
  46. locale: String!
  47. ): [PageLinkItem]
  48. checkConflicts(
  49. id: Int!
  50. checkoutDate: Date!
  51. ): Boolean!
  52. checkConflictsLatest(
  53. id: Int!
  54. ): PageConflictLatest!
  55. }
  56. extend type Mutation {
  57. createPage(
  58. siteId: UUID!
  59. content: String!
  60. description: String!
  61. editor: String!
  62. isPublished: Boolean!
  63. locale: String!
  64. path: String!
  65. publishEndDate: Date
  66. publishStartDate: Date
  67. scriptCss: String
  68. scriptJs: String
  69. tags: [String]!
  70. title: String!
  71. ): PageResponse
  72. updatePage(
  73. id: UUID!
  74. content: String
  75. description: String
  76. editor: String
  77. isPublished: Boolean
  78. locale: String
  79. path: String
  80. publishEndDate: Date
  81. publishStartDate: Date
  82. scriptCss: String
  83. scriptJs: String
  84. tags: [String]
  85. title: String
  86. ): PageResponse
  87. convertPage(
  88. id: Int!
  89. editor: String!
  90. ): DefaultResponse
  91. renamePage(
  92. id: Int!
  93. destinationPath: String!
  94. destinationLocale: String!
  95. ): DefaultResponse
  96. deletePage(
  97. id: Int!
  98. ): DefaultResponse
  99. deleteTag(
  100. id: Int!
  101. ): DefaultResponse
  102. updateTag(
  103. id: Int!
  104. tag: String!
  105. title: String!
  106. ): DefaultResponse
  107. flushCache: DefaultResponse
  108. migrateToLocale(
  109. sourceLocale: String!
  110. targetLocale: String!
  111. ): PageMigrationResponse
  112. rebuildPageTree: DefaultResponse
  113. renderPage(
  114. id: Int!
  115. ): DefaultResponse
  116. restorePage(
  117. pageId: Int!
  118. versionId: Int!
  119. ): DefaultResponse
  120. purgePagesHistory (
  121. olderThan: String!
  122. ): DefaultResponse
  123. }
  124. # -----------------------------------------------
  125. # TYPES
  126. # -----------------------------------------------
  127. type PageResponse {
  128. operation: Operation
  129. page: Page
  130. }
  131. type PageMigrationResponse {
  132. operation: Operation
  133. count: Int
  134. }
  135. type Page {
  136. id: UUID
  137. path: String
  138. hash: String
  139. title: String
  140. description: String
  141. isPublished: Boolean
  142. publishStartDate: Date
  143. publishEndDate: Date
  144. tags: [PageTag]
  145. content: String
  146. render: String
  147. toc: String
  148. contentType: String
  149. createdAt: Date
  150. updatedAt: Date
  151. editor: String
  152. locale: String
  153. scriptCss: String
  154. scriptJs: String
  155. authorId: Int
  156. authorName: String
  157. authorEmail: String
  158. creatorId: Int
  159. creatorName: String
  160. creatorEmail: String
  161. }
  162. type PageTag {
  163. id: Int
  164. tag: String
  165. title: String
  166. createdAt: Date
  167. updatedAt: Date
  168. }
  169. type PageHistory {
  170. versionId: Int
  171. versionDate: Date
  172. authorId: Int
  173. authorName: String
  174. actionType: String
  175. valueBefore: String
  176. valueAfter: String
  177. }
  178. type PageVersion {
  179. action: String
  180. authorId: String
  181. authorName: String
  182. content: String
  183. contentType: String
  184. createdAt: Date
  185. versionDate: Date
  186. description: String
  187. editor: String
  188. isPrivate: Boolean
  189. isPublished: Boolean
  190. locale: String
  191. pageId: Int
  192. path: String
  193. publishEndDate: Date
  194. publishStartDate: Date
  195. tags: [String]
  196. title: String
  197. versionId: Int
  198. }
  199. type PageHistoryResult {
  200. trail: [PageHistory]
  201. total: Int
  202. }
  203. type PageSearchResponse {
  204. results: [PageSearchResult]
  205. suggestions: [String]
  206. totalHits: Int
  207. }
  208. type PageSearchResult {
  209. id: String
  210. title: String
  211. description: String
  212. path: String
  213. locale: String
  214. }
  215. type PageListItem {
  216. id: Int
  217. path: String
  218. locale: String
  219. title: String
  220. description: String
  221. contentType: String
  222. isPublished: Boolean
  223. isPrivate: Boolean
  224. privateNS: String
  225. createdAt: Date
  226. updatedAt: Date
  227. tags: [String]
  228. }
  229. type PageTreeItem {
  230. id: Int
  231. path: String
  232. depth: Int
  233. title: String
  234. isPrivate: Boolean
  235. isFolder: Boolean
  236. privateNS: String
  237. parent: Int
  238. pageId: Int
  239. locale: String
  240. }
  241. type PageLinkItem {
  242. id: Int
  243. path: String
  244. title: String
  245. links: [String]
  246. }
  247. type PageConflictLatest {
  248. id: Int
  249. authorId: String
  250. authorName: String
  251. content: String
  252. createdAt: Date
  253. description: String
  254. isPublished: Boolean
  255. locale: String
  256. path: String
  257. tags: [String]
  258. title: String
  259. updatedAt: Date
  260. }
  261. enum PageOrderBy {
  262. CREATED
  263. ID
  264. PATH
  265. TITLE
  266. UPDATED
  267. }
  268. enum PageOrderByDirection {
  269. ASC
  270. DESC
  271. }
  272. enum PageTreeMode {
  273. FOLDERS
  274. PAGES
  275. ALL
  276. }