page.graphql 6.4 KB

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