You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
wiki/server/graph/schemas/page.graphql

399 lines
6.2 KiB

# ===============================================
# PAGES
# ===============================================
extend type Query {
pageHistoryById(
id: Int!
offsetPage: Int
offsetSize: Int
): PageHistoryResult
pageVersionById(
pageId: Int!
versionId: Int!
): PageVersion
searchPages(
query: String!
path: String
locale: String
): 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
tags: [PageTag]!
searchTags(
query: String!
): [String]!
pageTree(
path: String
parent: Int
mode: PageTreeMode!
locale: String!
includeAncestors: Boolean
): [PageTreeItem]
pageLinks(
locale: String!
): [PageLinkItem]
checkConflicts(
id: Int!
checkoutDate: Date!
): Boolean!
checkConflictsLatest(
id: Int!
): PageConflictLatest!
}
extend type Mutation {
createPage(
allowComments: Boolean
allowContributions: Boolean
allowRatings: Boolean
content: String!
description: String!
editor: String!
icon: String
isBrowsable: Boolean
6 years ago
locale: String!
path: String!
publishState: PagePublishState!
publishEndDate: Date
publishStartDate: Date
relations: [PageRelationInput!]
render: String
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
5 years ago
convertPage(
id: UUID!
editor: String!
): DefaultResponse
renamePage(
5 years ago
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
5 years ago
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 {
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: String
title: String
description: String
path: String
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 {
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
relations: [PageRelationInput!]
render: String
scriptJsLoad: String
scriptJsUnload: String
scriptCss: String
showSidebar: Boolean
showTags: Boolean
showToc: Boolean
tags: [String!]
title: String
tocDepth: PageTocDepthInput
}
type PageTocDepth {
min: Int
max: Int
}
input PageTocDepthInput {
min: Int!
max: Int!
}
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
}