2018-05-20 22:50:51 +00:00
|
|
|
# ===============================================
|
|
|
|
# PAGES
|
|
|
|
# ===============================================
|
|
|
|
|
|
|
|
extend type Query {
|
|
|
|
pages: PageQuery
|
|
|
|
}
|
|
|
|
|
|
|
|
extend type Mutation {
|
|
|
|
pages: PageMutation
|
|
|
|
}
|
|
|
|
|
|
|
|
# -----------------------------------------------
|
|
|
|
# QUERIES
|
|
|
|
# -----------------------------------------------
|
|
|
|
|
|
|
|
type PageQuery {
|
2018-11-25 06:28:20 +00:00
|
|
|
history(
|
|
|
|
id: Int!
|
2018-11-25 23:25:52 +00:00
|
|
|
offsetPage: Int
|
|
|
|
offsetSize: Int
|
2020-02-24 04:53:27 +00:00
|
|
|
): PageHistoryResult @auth(requires: ["manage:system", "read:history"])
|
|
|
|
|
|
|
|
version(
|
|
|
|
pageId: Int!
|
|
|
|
versionId: Int!
|
|
|
|
): PageVersion @auth(requires: ["manage:system", "read:history"])
|
2019-03-09 05:51:02 +00:00
|
|
|
|
|
|
|
search(
|
|
|
|
query: String!
|
|
|
|
path: String
|
|
|
|
locale: String
|
|
|
|
): PageSearchResponse! @auth(requires: ["manage:system", "read:pages"])
|
2019-04-07 22:10:44 +00:00
|
|
|
|
2019-08-31 19:00:31 +00:00
|
|
|
list(
|
|
|
|
limit: Int
|
|
|
|
orderBy: PageOrderBy
|
|
|
|
orderByDirection: PageOrderByDirection
|
2019-09-09 01:31:22 +00:00
|
|
|
tags: [String!]
|
|
|
|
locale: String
|
|
|
|
): [PageListItem!]! @auth(requires: ["manage:system", "read:pages"])
|
2019-07-02 05:48:19 +00:00
|
|
|
|
|
|
|
single(
|
|
|
|
id: Int!
|
|
|
|
): Page @auth(requires: ["manage:pages", "delete:pages", "manage:system"])
|
2019-09-01 22:33:36 +00:00
|
|
|
|
|
|
|
tags: [PageTag]! @auth(requires: ["manage:system", "read:pages"])
|
2019-10-08 03:38:06 +00:00
|
|
|
|
2020-02-02 21:24:27 +00:00
|
|
|
searchTags(
|
|
|
|
query: String!
|
|
|
|
): [String]! @auth(requires: ["manage:system", "read:pages"])
|
|
|
|
|
2019-10-08 03:38:06 +00:00
|
|
|
tree(
|
2020-01-05 20:04:16 +00:00
|
|
|
path: String
|
|
|
|
parent: Int
|
2019-10-08 03:38:06 +00:00
|
|
|
mode: PageTreeMode!
|
|
|
|
locale: String!
|
2020-01-05 20:04:16 +00:00
|
|
|
includeParents: Boolean
|
2019-10-08 03:38:06 +00:00
|
|
|
): [PageTreeItem] @auth(requires: ["manage:system", "read:pages"])
|
2020-01-05 20:04:16 +00:00
|
|
|
|
|
|
|
links(
|
|
|
|
locale: String!
|
|
|
|
): [PageLinkItem] @auth(requires: ["manage:system", "read:pages"])
|
2020-03-02 05:43:19 +00:00
|
|
|
|
|
|
|
checkConflicts(
|
|
|
|
id: Int!
|
|
|
|
checkoutDate: Date!
|
|
|
|
): Boolean! @auth(requires: ["write:pages", "manage:pages", "manage:system"])
|
2018-05-20 22:50:51 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
# -----------------------------------------------
|
|
|
|
# MUTATIONS
|
|
|
|
# -----------------------------------------------
|
|
|
|
|
|
|
|
type PageMutation {
|
|
|
|
create(
|
2018-07-22 20:25:39 +00:00
|
|
|
content: String!
|
|
|
|
description: String!
|
|
|
|
editor: String!
|
2018-07-22 04:29:39 +00:00
|
|
|
isPublished: Boolean!
|
2018-07-22 20:25:39 +00:00
|
|
|
isPrivate: Boolean!
|
2018-07-22 04:29:39 +00:00
|
|
|
locale: String!
|
2018-05-20 22:50:51 +00:00
|
|
|
path: String!
|
|
|
|
publishEndDate: Date
|
|
|
|
publishStartDate: Date
|
2018-07-22 20:25:39 +00:00
|
|
|
tags: [String]!
|
2018-05-20 22:50:51 +00:00
|
|
|
title: String!
|
2018-10-14 21:38:39 +00:00
|
|
|
): PageResponse @auth(requires: ["write:pages", "manage:pages", "manage:system"])
|
2018-05-20 22:50:51 +00:00
|
|
|
|
|
|
|
update(
|
|
|
|
id: Int!
|
2018-07-22 20:25:39 +00:00
|
|
|
content: String
|
2018-07-22 04:29:39 +00:00
|
|
|
description: String
|
|
|
|
editor: String
|
2018-07-23 01:13:01 +00:00
|
|
|
isPrivate: Boolean
|
2018-07-22 04:29:39 +00:00
|
|
|
isPublished: Boolean
|
|
|
|
locale: String
|
|
|
|
path: String
|
|
|
|
publishEndDate: Date
|
|
|
|
publishStartDate: Date
|
|
|
|
tags: [String]
|
|
|
|
title: String
|
2019-10-13 23:59:50 +00:00
|
|
|
): PageResponse @auth(requires: ["write:pages", "manage:pages", "manage:system"])
|
|
|
|
|
|
|
|
move(
|
|
|
|
id: Int!
|
|
|
|
destinationPath: String!
|
|
|
|
destinationLocale: String!
|
|
|
|
): DefaultResponse @auth(requires: ["manage:pages", "manage:system"])
|
2018-05-20 22:50:51 +00:00
|
|
|
|
|
|
|
delete(
|
|
|
|
id: Int!
|
2018-10-14 21:38:39 +00:00
|
|
|
): DefaultResponse @auth(requires: ["delete:pages", "manage:system"])
|
2019-07-06 21:06:42 +00:00
|
|
|
|
2020-02-09 05:49:32 +00:00
|
|
|
deleteTag(
|
|
|
|
id: Int!
|
|
|
|
): DefaultResponse @auth(requires: ["manage:system"])
|
|
|
|
|
|
|
|
updateTag(
|
|
|
|
id: Int!
|
|
|
|
tag: String!
|
|
|
|
title: String!
|
|
|
|
): DefaultResponse @auth(requires: ["manage:system"])
|
|
|
|
|
2019-07-06 21:06:42 +00:00
|
|
|
flushCache: DefaultResponse @auth(requires: ["manage:system"])
|
2019-07-13 03:56:44 +00:00
|
|
|
|
2019-07-14 17:21:33 +00:00
|
|
|
migrateToLocale(
|
|
|
|
sourceLocale: String!
|
|
|
|
targetLocale: String!
|
2019-07-14 20:12:26 +00:00
|
|
|
): PageMigrationResponse @auth(requires: ["manage:system"])
|
2019-10-13 23:59:50 +00:00
|
|
|
|
|
|
|
rebuildTree: DefaultResponse @auth(requires: ["manage:system"])
|
2020-01-05 22:40:28 +00:00
|
|
|
|
|
|
|
render(
|
|
|
|
id: Int!
|
|
|
|
): DefaultResponse @auth(requires: ["manage:system"])
|
2020-03-01 04:40:07 +00:00
|
|
|
|
|
|
|
restore(
|
|
|
|
pageId: Int!
|
|
|
|
versionId: Int!
|
|
|
|
): DefaultResponse @auth(requires: ["write:pages", "manage:pages", "manage:system"])
|
2018-05-20 22:50:51 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
# -----------------------------------------------
|
|
|
|
# TYPES
|
|
|
|
# -----------------------------------------------
|
|
|
|
|
|
|
|
type PageResponse {
|
|
|
|
responseResult: ResponseStatus!
|
|
|
|
page: Page
|
|
|
|
}
|
|
|
|
|
2019-07-14 20:12:26 +00:00
|
|
|
type PageMigrationResponse {
|
|
|
|
responseResult: ResponseStatus!
|
|
|
|
count: Int
|
|
|
|
}
|
|
|
|
|
2018-05-20 22:50:51 +00:00
|
|
|
type Page {
|
|
|
|
id: Int!
|
2019-07-02 05:48:19 +00:00
|
|
|
path: String!
|
|
|
|
hash: String!
|
|
|
|
title: String!
|
|
|
|
description: String!
|
|
|
|
isPrivate: Boolean!
|
|
|
|
isPublished: Boolean!
|
|
|
|
privateNS: String
|
|
|
|
publishStartDate: Date!
|
2020-02-24 04:53:27 +00:00
|
|
|
publishEndDate: Date!
|
2019-09-01 22:33:36 +00:00
|
|
|
tags: [PageTag]!
|
2019-07-02 05:48:19 +00:00
|
|
|
content: String!
|
|
|
|
render: String
|
|
|
|
toc: String
|
|
|
|
contentType: String!
|
|
|
|
createdAt: Date!
|
|
|
|
updatedAt: Date!
|
|
|
|
editor: String!
|
|
|
|
locale: String!
|
|
|
|
authorId: Int!
|
|
|
|
authorName: String!
|
|
|
|
authorEmail: String!
|
|
|
|
creatorId: Int!
|
|
|
|
creatorName: String!
|
|
|
|
creatorEmail: String!
|
2018-05-20 22:50:51 +00:00
|
|
|
}
|
2018-11-25 06:28:20 +00:00
|
|
|
|
2019-09-01 22:33:36 +00:00
|
|
|
type PageTag {
|
|
|
|
id: Int!
|
|
|
|
tag: String!
|
|
|
|
title: String
|
|
|
|
createdAt: Date!
|
|
|
|
updatedAt: Date!
|
|
|
|
}
|
|
|
|
|
2018-11-25 06:28:20 +00:00
|
|
|
type PageHistory {
|
|
|
|
versionId: Int!
|
2020-02-29 23:57:54 +00:00
|
|
|
versionDate: Date!
|
2018-11-25 06:28:20 +00:00
|
|
|
authorId: Int!
|
|
|
|
authorName: String!
|
|
|
|
actionType: String!
|
|
|
|
valueBefore: String
|
|
|
|
valueAfter: String
|
|
|
|
}
|
2018-11-25 23:25:52 +00:00
|
|
|
|
2020-02-24 04:53:27 +00:00
|
|
|
type PageVersion {
|
|
|
|
action: String!
|
|
|
|
authorId: String!
|
|
|
|
authorName: String!
|
|
|
|
content: String!
|
|
|
|
contentType: String!
|
|
|
|
createdAt: Date!
|
2020-02-29 23:57:54 +00:00
|
|
|
versionDate: Date!
|
2020-02-24 04:53:27 +00:00
|
|
|
description: String!
|
|
|
|
editor: String!
|
|
|
|
isPrivate: Boolean!
|
|
|
|
isPublished: Boolean!
|
|
|
|
locale: String!
|
|
|
|
pageId: Int!
|
|
|
|
path: String!
|
|
|
|
publishEndDate: Date!
|
|
|
|
publishStartDate: Date!
|
|
|
|
tags: [String]!
|
|
|
|
title: String!
|
|
|
|
versionId: Int!
|
|
|
|
}
|
|
|
|
|
2018-11-25 23:25:52 +00:00
|
|
|
type PageHistoryResult {
|
|
|
|
trail: [PageHistory]
|
|
|
|
total: Int!
|
|
|
|
}
|
2019-03-09 05:51:02 +00:00
|
|
|
|
|
|
|
type PageSearchResponse {
|
|
|
|
results: [PageSearchResult]!
|
|
|
|
suggestions: [String]!
|
|
|
|
totalHits: Int!
|
|
|
|
}
|
|
|
|
|
|
|
|
type PageSearchResult {
|
2019-03-11 04:47:27 +00:00
|
|
|
id: String!
|
2019-03-09 05:51:02 +00:00
|
|
|
title: String!
|
|
|
|
description: String!
|
|
|
|
path: String!
|
|
|
|
locale: String!
|
|
|
|
}
|
2019-04-07 22:10:44 +00:00
|
|
|
|
|
|
|
type PageListItem {
|
|
|
|
id: Int!
|
|
|
|
path: String!
|
|
|
|
locale: String!
|
|
|
|
title: String
|
|
|
|
description: String
|
|
|
|
contentType: String!
|
|
|
|
isPublished: Boolean!
|
|
|
|
isPrivate: Boolean!
|
|
|
|
privateNS: String
|
|
|
|
createdAt: Date!
|
|
|
|
updatedAt: Date!
|
2019-09-09 01:31:22 +00:00
|
|
|
tags: [String]
|
2019-04-07 22:10:44 +00:00
|
|
|
}
|
2019-08-31 19:00:31 +00:00
|
|
|
|
2019-10-08 03:38:06 +00:00
|
|
|
type PageTreeItem {
|
|
|
|
id: Int!
|
|
|
|
path: String!
|
|
|
|
depth: Int!
|
|
|
|
title: String!
|
|
|
|
isPrivate: Boolean!
|
|
|
|
isFolder: Boolean!
|
|
|
|
privateNS: String
|
|
|
|
parent: Int
|
|
|
|
pageId: Int
|
|
|
|
locale: String!
|
|
|
|
}
|
|
|
|
|
2020-01-05 20:04:16 +00:00
|
|
|
type PageLinkItem {
|
|
|
|
id: Int!
|
|
|
|
path: String!
|
|
|
|
title: String!
|
|
|
|
links: [String]!
|
|
|
|
}
|
|
|
|
|
2019-08-31 19:00:31 +00:00
|
|
|
enum PageOrderBy {
|
|
|
|
CREATED
|
|
|
|
ID
|
|
|
|
PATH
|
|
|
|
TITLE
|
|
|
|
UPDATED
|
|
|
|
}
|
|
|
|
|
|
|
|
enum PageOrderByDirection {
|
|
|
|
ASC
|
|
|
|
DESC
|
|
|
|
}
|
2019-10-08 03:38:06 +00:00
|
|
|
|
|
|
|
enum PageTreeMode {
|
|
|
|
FOLDERS
|
|
|
|
PAGES
|
|
|
|
ALL
|
|
|
|
}
|