page.graphql 4.8 KB

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