123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229 |
- # ===============================================
- # PAGES
- # ===============================================
- extend type Query {
- pages: PageQuery
- }
- extend type Mutation {
- pages: PageMutation
- }
- # -----------------------------------------------
- # QUERIES
- # -----------------------------------------------
- type PageQuery {
- history(
- id: Int!
- offsetPage: Int
- offsetSize: Int
- ): PageHistoryResult @auth(requires: ["manage:system", "read:pages"])
- search(
- query: String!
- path: String
- locale: String
- ): PageSearchResponse! @auth(requires: ["manage:system", "read:pages"])
- list(
- limit: Int
- orderBy: PageOrderBy
- orderByDirection: PageOrderByDirection
- tags: [String!]
- locale: String
- ): [PageListItem!]! @auth(requires: ["manage:system", "read:pages"])
- single(
- id: Int!
- ): Page @auth(requires: ["manage:pages", "delete:pages", "manage:system"])
- tags: [PageTag]! @auth(requires: ["manage:system", "read:pages"])
- tree(
- parent: Int!
- mode: PageTreeMode!
- locale: String!
- ): [PageTreeItem] @auth(requires: ["manage:system", "read:pages"])
- }
- # -----------------------------------------------
- # MUTATIONS
- # -----------------------------------------------
- type PageMutation {
- create(
- content: String!
- description: String!
- editor: String!
- isPublished: Boolean!
- isPrivate: Boolean!
- locale: String!
- path: String!
- publishEndDate: Date
- publishStartDate: Date
- tags: [String]!
- title: String!
- ): PageResponse @auth(requires: ["write:pages", "manage:pages", "manage:system"])
- update(
- id: Int!
- content: String
- description: String
- editor: String
- isPrivate: Boolean
- isPublished: Boolean
- locale: String
- path: String
- publishEndDate: Date
- publishStartDate: Date
- tags: [String]
- title: String
- ): PageResponse @auth(requires: ["write:pages", "manage:pages", "manage:system"])
- move(
- id: Int!
- destinationPath: String!
- destinationLocale: String!
- ): DefaultResponse @auth(requires: ["manage:pages", "manage:system"])
- delete(
- id: Int!
- ): DefaultResponse @auth(requires: ["delete:pages", "manage:system"])
- flushCache: DefaultResponse @auth(requires: ["manage:system"])
- migrateToLocale(
- sourceLocale: String!
- targetLocale: String!
- ): PageMigrationResponse @auth(requires: ["manage:system"])
- rebuildTree: DefaultResponse @auth(requires: ["manage:system"])
- }
- # -----------------------------------------------
- # TYPES
- # -----------------------------------------------
- type PageResponse {
- responseResult: ResponseStatus!
- page: Page
- }
- type PageMigrationResponse {
- responseResult: ResponseStatus!
- count: Int
- }
- type Page {
- id: Int!
- path: String!
- hash: String!
- title: String!
- description: String!
- isPrivate: Boolean!
- isPublished: Boolean!
- privateNS: String
- publishStartDate: Date!
- publishEndDate: String!
- tags: [PageTag]!
- 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!
- }
- type PageTag {
- id: Int!
- tag: String!
- title: String
- createdAt: Date!
- updatedAt: Date!
- }
- type PageHistory {
- versionId: Int!
- authorId: Int!
- authorName: String!
- actionType: String!
- valueBefore: String
- valueAfter: String
- createdAt: Date!
- }
- 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!
- }
- enum PageOrderBy {
- CREATED
- ID
- PATH
- TITLE
- UPDATED
- }
- enum PageOrderByDirection {
- ASC
- DESC
- }
- enum PageTreeMode {
- FOLDERS
- PAGES
- ALL
- }
|