page.graphql 6.2 KB

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