page.graphql 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397
  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: UUID!
  30. password: String
  31. ): Page
  32. pageByPath(
  33. siteId: UUID!
  34. path: String!
  35. password: String
  36. ): Page
  37. tags: [PageTag]!
  38. searchTags(
  39. query: String!
  40. ): [String]!
  41. pageTree(
  42. path: String
  43. parent: Int
  44. mode: PageTreeMode!
  45. locale: String!
  46. includeAncestors: Boolean
  47. ): [PageTreeItem]
  48. pageLinks(
  49. locale: String!
  50. ): [PageLinkItem]
  51. checkConflicts(
  52. id: Int!
  53. checkoutDate: Date!
  54. ): Boolean!
  55. checkConflictsLatest(
  56. id: Int!
  57. ): PageConflictLatest!
  58. }
  59. extend type Mutation {
  60. createPage(
  61. allowComments: Boolean
  62. allowContributions: Boolean
  63. allowRatings: Boolean
  64. content: String!
  65. description: String!
  66. editor: String!
  67. icon: String
  68. isBrowsable: Boolean
  69. locale: String!
  70. path: String!
  71. publishState: PagePublishState!
  72. publishEndDate: Date
  73. publishStartDate: Date
  74. relations: [PageRelationInput!]
  75. scriptCss: String
  76. scriptJsLoad: String
  77. scriptJsUnload: String
  78. showSidebar: Boolean
  79. showTags: Boolean
  80. showToc: Boolean
  81. siteId: UUID!
  82. tags: [String!]
  83. title: String!
  84. tocDepth: PageTocDepthInput
  85. ): PageResponse
  86. updatePage(
  87. id: UUID!
  88. patch: PageUpdateInput!
  89. ): PageResponse
  90. convertPage(
  91. id: UUID!
  92. editor: String!
  93. ): DefaultResponse
  94. renamePage(
  95. id: Int!
  96. destinationPath: String!
  97. destinationLocale: String!
  98. ): DefaultResponse
  99. deletePage(
  100. id: UUID!
  101. ): DefaultResponse
  102. deleteTag(
  103. id: Int!
  104. ): DefaultResponse
  105. updateTag(
  106. id: Int!
  107. tag: String!
  108. title: String!
  109. ): DefaultResponse
  110. flushCache: DefaultResponse
  111. migrateToLocale(
  112. sourceLocale: String!
  113. targetLocale: String!
  114. ): PageMigrationResponse
  115. rebuildPageTree: DefaultResponse
  116. renderPage(
  117. id: Int!
  118. ): DefaultResponse
  119. restorePage(
  120. pageId: Int!
  121. versionId: Int!
  122. ): DefaultResponse
  123. purgePagesHistory (
  124. olderThan: String!
  125. ): DefaultResponse
  126. }
  127. # -----------------------------------------------
  128. # TYPES
  129. # -----------------------------------------------
  130. type PageResponse {
  131. operation: Operation
  132. page: Page
  133. }
  134. type PageMigrationResponse {
  135. operation: Operation
  136. count: Int
  137. }
  138. type Page {
  139. allowComments: Boolean
  140. allowContributions: Boolean
  141. allowRatings: Boolean
  142. author: User
  143. content: String
  144. contentType: String
  145. createdAt: Date
  146. creator: User
  147. description: String
  148. editor: String
  149. hash: String
  150. icon: String
  151. id: UUID
  152. isBrowsable: Boolean
  153. locale: String
  154. password: String
  155. path: String
  156. publishEndDate: Date
  157. publishStartDate: Date
  158. publishState: PagePublishState
  159. relations: [PageRelation]
  160. render: String
  161. scriptJsLoad: String
  162. scriptJsUnload: String
  163. scriptCss: String
  164. showSidebar: Boolean
  165. showTags: Boolean
  166. showToc: Boolean
  167. siteId: UUID
  168. tags: [PageTag]
  169. title: String
  170. toc: [JSON]
  171. tocDepth: PageTocDepth
  172. updatedAt: Date
  173. }
  174. type PageTag {
  175. id: Int
  176. tag: String
  177. title: String
  178. createdAt: Date
  179. updatedAt: Date
  180. }
  181. type PageHistory {
  182. versionId: Int
  183. versionDate: Date
  184. authorId: Int
  185. authorName: String
  186. actionType: String
  187. valueBefore: String
  188. valueAfter: String
  189. }
  190. type PageVersion {
  191. action: String
  192. authorId: String
  193. authorName: String
  194. content: String
  195. contentType: String
  196. createdAt: Date
  197. versionDate: Date
  198. description: String
  199. editor: String
  200. isPrivate: Boolean
  201. isPublished: Boolean
  202. locale: String
  203. pageId: Int
  204. path: String
  205. publishEndDate: Date
  206. publishStartDate: Date
  207. render: String
  208. tags: [String]
  209. title: String
  210. versionId: Int
  211. }
  212. type PageHistoryResult {
  213. trail: [PageHistory]
  214. total: Int
  215. }
  216. type PageSearchResponse {
  217. results: [PageSearchResult]
  218. suggestions: [String]
  219. totalHits: Int
  220. }
  221. type PageSearchResult {
  222. id: String
  223. title: String
  224. description: String
  225. path: String
  226. locale: String
  227. }
  228. type PageListItem {
  229. id: Int
  230. path: String
  231. locale: String
  232. title: String
  233. description: String
  234. contentType: String
  235. isPublished: Boolean
  236. isPrivate: Boolean
  237. privateNS: String
  238. createdAt: Date
  239. updatedAt: Date
  240. tags: [String]
  241. }
  242. type PageTreeItem {
  243. id: Int
  244. path: String
  245. depth: Int
  246. title: String
  247. isPrivate: Boolean
  248. isFolder: Boolean
  249. privateNS: String
  250. parent: Int
  251. pageId: Int
  252. locale: String
  253. }
  254. type PageLinkItem {
  255. id: Int
  256. path: String
  257. title: String
  258. links: [String]
  259. }
  260. type PageConflictLatest {
  261. id: Int
  262. authorId: String
  263. authorName: String
  264. content: String
  265. createdAt: Date
  266. description: String
  267. isPublished: Boolean
  268. locale: String
  269. path: String
  270. tags: [String]
  271. title: String
  272. updatedAt: Date
  273. }
  274. type PageRelation {
  275. id: UUID
  276. position: PageRelationPosition
  277. label: String
  278. caption: String
  279. icon: String
  280. target: String
  281. }
  282. input PageRelationInput {
  283. id: UUID!
  284. position: PageRelationPosition!
  285. label: String!
  286. caption: String
  287. icon: String
  288. target: String!
  289. }
  290. input PageUpdateInput {
  291. allowComments: Boolean
  292. allowContributions: Boolean
  293. allowRatings: Boolean
  294. content: String
  295. description: String
  296. icon: String
  297. isBrowsable: Boolean
  298. locale: String
  299. password: String
  300. path: String
  301. publishEndDate: Date
  302. publishStartDate: Date
  303. publishState: PagePublishState
  304. reasonForChange: String
  305. relations: [PageRelationInput!]
  306. scriptJsLoad: String
  307. scriptJsUnload: String
  308. scriptCss: String
  309. showSidebar: Boolean
  310. showTags: Boolean
  311. showToc: Boolean
  312. tags: [String!]
  313. title: String
  314. tocDepth: PageTocDepthInput
  315. }
  316. type PageTocDepth {
  317. min: Int
  318. max: Int
  319. }
  320. input PageTocDepthInput {
  321. min: Int!
  322. max: Int!
  323. }
  324. enum PageOrderBy {
  325. CREATED
  326. ID
  327. PATH
  328. TITLE
  329. UPDATED
  330. }
  331. enum PageOrderByDirection {
  332. ASC
  333. DESC
  334. }
  335. enum PageTreeMode {
  336. FOLDERS
  337. PAGES
  338. ALL
  339. }
  340. enum PagePublishState {
  341. draft
  342. published
  343. scheduled
  344. }
  345. enum PageRelationPosition {
  346. left
  347. center
  348. right
  349. }