page.graphql 7.5 KB

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