# =============================================== # PAGES # =============================================== extend type Query { pageHistoryById( id: Int! offsetPage: Int offsetSize: Int ): PageHistoryResult pageVersionById( pageId: Int! versionId: Int! ): PageVersion searchPages( siteId: UUID! query: String! path: String locale: [String] tags: [String] editor: String publishState: PagePublishState orderBy: PageSearchSort orderByDirection: OrderByDirection offset: Int limit: Int ): PageSearchResponse pages( limit: Int orderBy: PageOrderBy orderByDirection: PageOrderByDirection tags: [String!] locale: String creatorId: Int authorId: Int ): [PageListItem] pageById( id: UUID! password: String ): Page pageByPath( siteId: UUID! path: String! password: String ): Page pageTree( path: String parent: Int mode: PageTreeMode! locale: String! includeAncestors: Boolean ): [PageTreeItem] pageLinks( locale: String! ): [PageLinkItem] pathFromAlias( siteId: UUID! alias: String! ): PageAliasPath searchTags( query: String! ): [String]! tags: [PageTag]! checkConflicts( id: Int! checkoutDate: Date! ): Boolean! checkConflictsLatest( id: Int! ): PageConflictLatest! } extend type Mutation { createPage( alias: String allowComments: Boolean allowContributions: Boolean allowRatings: Boolean content: String! description: String! editor: String! icon: String isBrowsable: Boolean locale: String! path: String! publishState: PagePublishState! publishEndDate: Date publishStartDate: Date relations: [PageRelationInput!] scriptCss: String scriptJsLoad: String scriptJsUnload: String showSidebar: Boolean showTags: Boolean showToc: Boolean siteId: UUID! tags: [String!] title: String! tocDepth: PageTocDepthInput ): PageResponse updatePage( id: UUID! patch: PageUpdateInput! ): PageResponse convertPage( id: UUID! editor: String! ): DefaultResponse renamePage( id: Int! destinationPath: String! destinationLocale: String! ): DefaultResponse deletePage( id: UUID! ): DefaultResponse deleteTag( id: Int! ): DefaultResponse updateTag( id: Int! tag: String! title: String! ): DefaultResponse flushCache: DefaultResponse migrateToLocale( sourceLocale: String! targetLocale: String! ): PageMigrationResponse rebuildPageTree: DefaultResponse renderPage( id: Int! ): DefaultResponse restorePage( pageId: Int! versionId: Int! ): DefaultResponse purgePagesHistory ( olderThan: String! ): DefaultResponse } # ----------------------------------------------- # TYPES # ----------------------------------------------- type PageResponse { operation: Operation page: Page } type PageMigrationResponse { operation: Operation count: Int } type Page { alias: String allowComments: Boolean allowContributions: Boolean allowRatings: Boolean author: User content: String contentType: String createdAt: Date creator: User description: String editor: String hash: String icon: String id: UUID isBrowsable: Boolean locale: String password: String path: String publishEndDate: Date publishStartDate: Date publishState: PagePublishState relations: [PageRelation] render: String scriptJsLoad: String scriptJsUnload: String scriptCss: String showSidebar: Boolean showTags: Boolean showToc: Boolean siteId: UUID tags: [PageTag] title: String toc: [JSON] tocDepth: PageTocDepth updatedAt: Date } type PageTag { id: Int tag: String title: String createdAt: Date updatedAt: Date } type PageHistory { versionId: Int versionDate: Date authorId: Int authorName: String actionType: String valueBefore: String valueAfter: String } type PageVersion { action: String authorId: String authorName: String content: String contentType: String createdAt: Date versionDate: Date description: String editor: String isPrivate: Boolean isPublished: Boolean locale: String pageId: Int path: String publishEndDate: Date publishStartDate: Date render: String tags: [String] title: String versionId: Int } type PageHistoryResult { trail: [PageHistory] total: Int } type PageSearchResponse { results: [PageSearchResult] suggestions: [String] totalHits: Int } type PageSearchResult { id: UUID title: String description: String icon: String path: String tags: [String] updatedAt: Date locale: String } type PageListItem { id: Int path: String locale: String title: String description: String contentType: String isPublished: Boolean isPrivate: Boolean privateNS: String createdAt: Date updatedAt: Date tags: [String] } type PageTreeItem { id: Int path: String depth: Int title: String isPrivate: Boolean isFolder: Boolean privateNS: String parent: Int pageId: Int locale: String } type PageLinkItem { id: Int path: String title: String links: [String] } type PageConflictLatest { id: Int authorId: String authorName: String content: String createdAt: Date description: String isPublished: Boolean locale: String path: String tags: [String] title: String updatedAt: Date } type PageRelation { id: UUID position: PageRelationPosition label: String caption: String icon: String target: String } input PageRelationInput { id: UUID! position: PageRelationPosition! label: String! caption: String icon: String target: String! } input PageUpdateInput { alias: String allowComments: Boolean allowContributions: Boolean allowRatings: Boolean content: String description: String icon: String isBrowsable: Boolean locale: String password: String path: String publishEndDate: Date publishStartDate: Date publishState: PagePublishState reasonForChange: String relations: [PageRelationInput!] scriptJsLoad: String scriptJsUnload: String scriptCss: String showSidebar: Boolean showTags: Boolean showToc: Boolean tags: [String!] title: String tocDepth: PageTocDepthInput } type PageAliasPath { id: UUID path: String } type PageTocDepth { min: Int max: Int } input PageTocDepthInput { min: Int! max: Int! } enum PageSearchSort { relevancy title updated } enum PageOrderBy { CREATED ID PATH TITLE UPDATED } enum PageOrderByDirection { ASC DESC } enum PageTreeMode { FOLDERS PAGES ALL } enum PagePublishState { draft published scheduled } enum PageRelationPosition { left center right }