page.graphql 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317
  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. content: String!
  56. description: String!
  57. editor: String!
  58. isPublished: Boolean!
  59. isPrivate: 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. isPrivate: Boolean
  75. isPublished: Boolean
  76. locale: String
  77. path: String
  78. publishEndDate: Date
  79. publishStartDate: Date
  80. scriptCss: String
  81. scriptJs: String
  82. tags: [String]
  83. title: String
  84. ): PageResponse
  85. convertPage(
  86. id: Int!
  87. editor: String!
  88. ): DefaultResponse
  89. renamePage(
  90. id: Int!
  91. destinationPath: String!
  92. destinationLocale: String!
  93. ): DefaultResponse
  94. deletePage(
  95. id: Int!
  96. ): DefaultResponse
  97. deleteTag(
  98. id: Int!
  99. ): DefaultResponse
  100. updateTag(
  101. id: Int!
  102. tag: String!
  103. title: String!
  104. ): DefaultResponse
  105. flushCache: DefaultResponse
  106. migrateToLocale(
  107. sourceLocale: String!
  108. targetLocale: String!
  109. ): PageMigrationResponse
  110. rebuildPageTree: DefaultResponse
  111. renderPage(
  112. id: Int!
  113. ): DefaultResponse
  114. restorePage(
  115. pageId: Int!
  116. versionId: Int!
  117. ): DefaultResponse
  118. purgePagesHistory (
  119. olderThan: String!
  120. ): DefaultResponse
  121. }
  122. # -----------------------------------------------
  123. # TYPES
  124. # -----------------------------------------------
  125. type PageResponse {
  126. operation: Operation
  127. page: Page
  128. }
  129. type PageMigrationResponse {
  130. operation: Operation
  131. count: Int
  132. }
  133. type Page {
  134. id: Int
  135. path: String
  136. hash: String
  137. title: String
  138. description: String
  139. isPrivate: Boolean
  140. isPublished: Boolean
  141. privateNS: String
  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. }