page.graphql 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395
  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. tags: [String]
  208. title: String
  209. versionId: Int
  210. }
  211. type PageHistoryResult {
  212. trail: [PageHistory]
  213. total: Int
  214. }
  215. type PageSearchResponse {
  216. results: [PageSearchResult]
  217. suggestions: [String]
  218. totalHits: Int
  219. }
  220. type PageSearchResult {
  221. id: String
  222. title: String
  223. description: String
  224. path: String
  225. locale: String
  226. }
  227. type PageListItem {
  228. id: Int
  229. path: String
  230. locale: String
  231. title: String
  232. description: String
  233. contentType: String
  234. isPublished: Boolean
  235. isPrivate: Boolean
  236. privateNS: String
  237. createdAt: Date
  238. updatedAt: Date
  239. tags: [String]
  240. }
  241. type PageTreeItem {
  242. id: Int
  243. path: String
  244. depth: Int
  245. title: String
  246. isPrivate: Boolean
  247. isFolder: Boolean
  248. privateNS: String
  249. parent: Int
  250. pageId: Int
  251. locale: String
  252. }
  253. type PageLinkItem {
  254. id: Int
  255. path: String
  256. title: String
  257. links: [String]
  258. }
  259. type PageConflictLatest {
  260. id: Int
  261. authorId: String
  262. authorName: String
  263. content: String
  264. createdAt: Date
  265. description: String
  266. isPublished: Boolean
  267. locale: String
  268. path: String
  269. tags: [String]
  270. title: String
  271. updatedAt: Date
  272. }
  273. type PageRelation {
  274. id: UUID
  275. position: PageRelationPosition
  276. label: String
  277. caption: String
  278. icon: String
  279. target: String
  280. }
  281. input PageRelationInput {
  282. id: UUID!
  283. position: PageRelationPosition!
  284. label: String!
  285. caption: String
  286. icon: String
  287. target: String!
  288. }
  289. input PageUpdateInput {
  290. allowComments: Boolean
  291. allowContributions: Boolean
  292. allowRatings: Boolean
  293. content: String
  294. description: String
  295. icon: String
  296. isBrowsable: Boolean
  297. locale: String
  298. password: String
  299. path: String
  300. publishEndDate: Date
  301. publishStartDate: Date
  302. publishState: PagePublishState
  303. relations: [PageRelationInput!]
  304. scriptJsLoad: String
  305. scriptJsUnload: String
  306. scriptCss: String
  307. showSidebar: Boolean
  308. showTags: Boolean
  309. showToc: Boolean
  310. tags: [String!]
  311. title: String
  312. tocDepth: PageTocDepthInput
  313. }
  314. type PageTocDepth {
  315. min: Int
  316. max: Int
  317. }
  318. input PageTocDepthInput {
  319. min: Int!
  320. max: Int!
  321. }
  322. enum PageOrderBy {
  323. CREATED
  324. ID
  325. PATH
  326. TITLE
  327. UPDATED
  328. }
  329. enum PageOrderByDirection {
  330. ASC
  331. DESC
  332. }
  333. enum PageTreeMode {
  334. FOLDERS
  335. PAGES
  336. ALL
  337. }
  338. enum PagePublishState {
  339. draft
  340. published
  341. scheduled
  342. }
  343. enum PageRelationPosition {
  344. left
  345. center
  346. right
  347. }