page.graphql 7.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472
  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. renamePage(
  149. id: Int!
  150. destinationPath: String!
  151. destinationLocale: String!
  152. ): DefaultResponse
  153. deletePage(
  154. id: UUID!
  155. ): DefaultResponse
  156. deleteTag(
  157. id: Int!
  158. ): DefaultResponse
  159. updateTag(
  160. id: Int!
  161. tag: String!
  162. title: String!
  163. ): DefaultResponse
  164. flushCache: DefaultResponse
  165. migrateToLocale(
  166. sourceLocale: String!
  167. targetLocale: String!
  168. ): PageMigrationResponse
  169. rebuildPageTree: DefaultResponse
  170. rerenderPage(
  171. id: UUID!
  172. ): DefaultResponse
  173. restorePage(
  174. pageId: Int!
  175. versionId: Int!
  176. ): DefaultResponse
  177. purgePagesHistory (
  178. olderThan: String!
  179. ): DefaultResponse
  180. }
  181. # -----------------------------------------------
  182. # TYPES
  183. # -----------------------------------------------
  184. type PageResponse {
  185. operation: Operation
  186. page: Page
  187. }
  188. type PageMigrationResponse {
  189. operation: Operation
  190. count: Int
  191. }
  192. type Page {
  193. alias: String
  194. allowComments: Boolean
  195. allowContributions: Boolean
  196. allowRatings: Boolean
  197. author: User
  198. content: String
  199. contentType: String
  200. createdAt: Date
  201. creator: User
  202. description: String
  203. editor: String
  204. hash: String
  205. icon: String
  206. id: UUID
  207. isBrowsable: Boolean
  208. isSearchable: Boolean
  209. locale: String
  210. navigationId: UUID
  211. navigationMode: NavigationMode
  212. password: String
  213. path: String
  214. publishEndDate: Date
  215. publishStartDate: Date
  216. publishState: PagePublishState
  217. relations: [PageRelation]
  218. render: String
  219. scriptJsLoad: String
  220. scriptJsUnload: String
  221. scriptCss: String
  222. showSidebar: Boolean
  223. showTags: Boolean
  224. showToc: Boolean
  225. siteId: UUID
  226. tags: [String]
  227. title: String
  228. toc: [JSON]
  229. tocDepth: PageTocDepth
  230. updatedAt: Date
  231. }
  232. type PageTag {
  233. id: UUID
  234. tag: String
  235. usageCount: Int
  236. siteId: UUID
  237. createdAt: Date
  238. updatedAt: Date
  239. }
  240. type PageHistory {
  241. versionId: Int
  242. versionDate: Date
  243. authorId: Int
  244. authorName: String
  245. actionType: String
  246. valueBefore: String
  247. valueAfter: String
  248. }
  249. type PageVersion {
  250. action: String
  251. authorId: String
  252. authorName: String
  253. content: String
  254. contentType: String
  255. createdAt: Date
  256. versionDate: Date
  257. description: String
  258. editor: String
  259. isPrivate: Boolean
  260. isPublished: Boolean
  261. locale: String
  262. pageId: Int
  263. path: String
  264. publishEndDate: Date
  265. publishStartDate: Date
  266. render: String
  267. tags: [String]
  268. title: String
  269. versionId: Int
  270. }
  271. type PageHistoryResult {
  272. trail: [PageHistory]
  273. total: Int
  274. }
  275. type PageSearchResponse {
  276. results: [PageSearchResult]
  277. totalHits: Int
  278. }
  279. type PageSearchResult {
  280. description: String
  281. highlight: String
  282. icon: String
  283. id: UUID
  284. locale: String
  285. path: String
  286. relevancy: Float
  287. tags: [String]
  288. title: String
  289. updatedAt: Date
  290. }
  291. type PageListItem {
  292. id: Int
  293. path: String
  294. locale: String
  295. title: String
  296. description: String
  297. contentType: String
  298. isPublished: Boolean
  299. isPrivate: Boolean
  300. privateNS: String
  301. createdAt: Date
  302. updatedAt: Date
  303. tags: [String]
  304. }
  305. type PageTreeItem {
  306. id: Int
  307. path: String
  308. depth: Int
  309. title: String
  310. isPrivate: Boolean
  311. isFolder: Boolean
  312. privateNS: String
  313. parent: Int
  314. pageId: Int
  315. locale: String
  316. }
  317. type PageLinkItem {
  318. id: Int
  319. path: String
  320. title: String
  321. links: [String]
  322. }
  323. type PageConflictLatest {
  324. id: Int
  325. authorId: String
  326. authorName: String
  327. content: String
  328. createdAt: Date
  329. description: String
  330. isPublished: Boolean
  331. locale: String
  332. path: String
  333. tags: [String]
  334. title: String
  335. updatedAt: Date
  336. }
  337. type PageRelation {
  338. id: UUID
  339. position: PageRelationPosition
  340. label: String
  341. caption: String
  342. icon: String
  343. target: String
  344. }
  345. input PageRelationInput {
  346. id: UUID!
  347. position: PageRelationPosition!
  348. label: String!
  349. caption: String
  350. icon: String
  351. target: String!
  352. }
  353. input PageUpdateInput {
  354. alias: String
  355. allowComments: Boolean
  356. allowContributions: Boolean
  357. allowRatings: Boolean
  358. content: String
  359. description: String
  360. icon: String
  361. isBrowsable: Boolean
  362. isSearchable: Boolean
  363. password: String
  364. publishEndDate: Date
  365. publishStartDate: Date
  366. publishState: PagePublishState
  367. reasonForChange: String
  368. relations: [PageRelationInput!]
  369. scriptJsLoad: String
  370. scriptJsUnload: String
  371. scriptCss: String
  372. showSidebar: Boolean
  373. showTags: Boolean
  374. showToc: Boolean
  375. tags: [String!]
  376. title: String
  377. tocDepth: PageTocDepthInput
  378. }
  379. type PageAliasPath {
  380. id: UUID
  381. path: String
  382. }
  383. type PageTocDepth {
  384. min: Int
  385. max: Int
  386. }
  387. input PageTocDepthInput {
  388. min: Int!
  389. max: Int!
  390. }
  391. enum PageSearchSort {
  392. relevancy
  393. title
  394. updatedAt
  395. }
  396. enum PageOrderBy {
  397. CREATED
  398. ID
  399. PATH
  400. TITLE
  401. UPDATED
  402. }
  403. enum PageOrderByDirection {
  404. ASC
  405. DESC
  406. }
  407. enum PageTreeMode {
  408. FOLDERS
  409. PAGES
  410. ALL
  411. }
  412. enum PagePublishState {
  413. draft
  414. published
  415. scheduled
  416. }
  417. enum PageRelationPosition {
  418. left
  419. center
  420. right
  421. }