page.graphql 4.9 KB

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