page.graphql 7.7 KB

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