page.graphql 6.7 KB

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