123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259 |
- # ENUMS
- enum FileType {
- binary
- image
- }
- enum RightRole {
- read
- write
- manage
- }
- # TYPES
- type KeyValuePair {
- key: String!
- value: String!
- }
- input KeyValuePairInput {
- key: String!
- value: String!
- }
- type DefaultResponse {
- responseResult: ResponseStatus
- }
- type ResponseStatus {
- succeeded: Boolean!
- errorCode: Int!
- slug: String!
- message: String
- }
- type Comment {
- id: Int!
- createdAt: Date
- updatedAt: Date
- content: String
- document: Document!
- author: User!
- }
- type Document {
- id: Int!
- createdAt: Date
- updatedAt: Date
- path: String!
- title: String!
- subtitle: String
- parentPath: String
- parentTitle: String
- isDirectory: Boolean!
- isEntry: Boolean!
- searchContent: String
- comments: [Comment]
- tags: [Tag]
- }
- type File {
- id: Int!
- createdAt: Date
- updatedAt: Date
- category: FileType!
- mime: String!
- extra: String
- filename: String!
- basename: String!
- filesize: Int!
- folder: Folder
- }
- type Folder {
- id: Int!
- createdAt: Date
- updatedAt: Date
- name: String!
- files: [File]
- }
- type Right {
- id: Int!
- createdAt: Date
- updatedAt: Date
- path: String!
- role: RightRole!
- exact: Boolean!
- allow: Boolean!
- group: Group!
- }
- type SearchResult {
- path: String
- title: String
- tags: [String]
- }
- type Setting {
- id: Int!
- createdAt: Date
- updatedAt: Date
- key: String!
- config: String!
- }
- # Tags are attached to one or more documents
- type Tag {
- id: Int!
- createdAt: Date
- updatedAt: Date
- key: String!
- documents: [Document]
- }
- type Translation {
- key: String!
- value: String!
- }
- type OperationResult {
- succeeded: Boolean!
- message: String
- data: String
- }
- # Query (Read)
- type Query {
- comments(id: Int): [Comment]
- documents(id: Int, path: String): [Document]
- files(id: Int): [File]
- folders(id: Int, name: String): [Folder]
- rights(id: Int): [Right]
- search(q: String, tags: [String]): [SearchResult]
- settings(key: String): [Setting]
- tags(key: String): [Tag]
- translations(locale: String!, namespace: String!): [Translation]
- }
- # Mutations (Create, Update, Delete)
- type Mutation {
- addRightToGroup(
- groupId: Int!
- path: String!
- role: RightRole!
- exact: Boolean!
- allow: Boolean!
- ): Right
- assignTagToDocument(
- tagId: Int!
- documentId: Int!
- ): OperationResult
- createComment(
- userId: Int!
- documentId: Int!
- content: String!
- ): Comment
- createDocument(
- path: String!
- title: String!
- subtitle: String
- ): Document
- createFolder(
- name: String!
- ): Folder
- createTag(
- name: String!
- ): Tag
- deleteComment(
- id: Int!
- ): OperationResult
- deleteDocument(
- id: Int!
- ): OperationResult
- deleteFile(
- id: Int!
- ): OperationResult
- deleteFolder(
- id: Int!
- ): OperationResult
- deleteTag(
- id: Int!
- ): OperationResult
- modifyComment(
- id: Int!
- content: String!
- ): Document
- modifyDocument(
- id: Int!
- title: String
- subtitle: String
- ): Document
- modifyRight(
- id: Int!
- path: String
- role: RightRole
- exact: Boolean
- allow: Boolean
- ): Right
- moveDocument(
- id: Int!
- path: String!
- ): OperationResult
- moveFile(
- id: Int!
- folderId: Int!
- ): OperationResult
- renameFile(
- id: Int!
- name: String!
- ): OperationResult
- renameFolder(
- id: Int!
- name: String!
- ): OperationResult
- renameTag(
- id: Int!
- key: String!
- ): OperationResult
- removeTagFromDocument(
- tagId: Int!
- documentId: Int!
- ): OperationResult
- removeRightFromGroup(
- rightId: Int!
- ): OperationResult
- setConfigEntry(
- key: String!
- value: String!
- ): OperationResult
- uploadFile(
- category: FileType!
- filename: String!
- ): File
- }
|