| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319 | # SCALARSscalar Date# ENUMSenum UserRole {  guest  user  admin}enum FileType {  binary  image}enum RightRole {  read  write  manage}# INTERFACESinterface Base {  id: Int!  createdAt: Date  updatedAt: Date}# TYPEStype Comment implements Base {  id: Int!  createdAt: Date  updatedAt: Date  content: String  document: Document!  author: User!}type Document implements Base {  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 implements Base {  id: Int!  createdAt: Date  updatedAt: Date  category: FileType!  mime: String!  extra: String  filename: String!  basename: String!  filesize: Int!  folder: Folder}type Folder implements Base {  id: Int!  createdAt: Date  updatedAt: Date  name: String!  files: [File]}type Group implements Base {  id: Int!  createdAt: Date  updatedAt: Date  name: String!  users: [User]  rights: [Right]}type Right implements Base {  id: Int!  createdAt: Date  updatedAt: Date  path: String!  role: RightRole!  exact: Boolean!  allow: Boolean!  group: Group!}type Setting implements Base {  id: Int!  createdAt: Date  updatedAt: Date  key: String!  config: String!}# Tags are attached to one or more documentstype Tag implements Base {  id: Int!  createdAt: Date  updatedAt: Date  key: String!  documents: [Document]}# A Usertype User implements Base {  id: Int!  createdAt: Date  updatedAt: Date  email: String!  provider: String!  providerId: String  name: String  role: UserRole!  groups: [Group]}type OperationResult {  succeded: Boolean!  message: 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]  groups(id: Int, name: String): [Group]  rights(id: Int): [Right]  settings(key: String): [Setting]  tags(key: String): [Tag]  users(id: Int, email: String, provider: String, providerId: String, role: UserRole): [User]}# Mutations (Create, Update, Delete)type Mutation {  addRightToGroup(    groupId: Int!    path: String!    role: RightRole!    exact: Boolean!    allow: Boolean!  ): Right  assignTagToDocument(    tagId: Int!    documentId: Int!  ): OperationResult  assignUserToGroup(    userId: Int!    groupId: Int!  ): OperationResult  createComment(    userId: Int!    documentId: Int!    content: String!  ): Comment  createDocument(    path: String!    title: String!    subtitle: String  ): Document  createFolder(    name: String!  ): Folder  createGroup(    name: String!  ): Group  createTag(    name: String!  ): Tag  createUser(    email: String!    name: String    passwordRaw: String    provider: String!    providerId: String    role: UserRole!  ): User  deleteComment(    id: Int!  ): OperationResult  deleteDocument(    id: Int!  ): OperationResult  deleteFile(    id: Int!  ): OperationResult  deleteFolder(    id: Int!  ): OperationResult  deleteGroup(    id: Int!  ): OperationResult  deleteTag(    id: Int!  ): OperationResult  deleteUser(    id: Int!  ): OperationResult  modifyComment(    id: Int!    content: String!  ): Document  modifyDocument(    id: Int!    title: String    subtitle: String  ): Document  modifyUser(    id: Int!    email: String    name: String    provider: String    providerId: String    role: UserRole  ): User  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  renameGroup(    id: Int!    name: String!  ): OperationResult  renameTag(    id: Int!    key: String!  ): OperationResult  removeTagFromDocument(    tagId: Int!    documentId: Int!  ): OperationResult  removeRightFromGroup(    rightId: Int!  ): OperationResult  removeUserFromGroup(    userId: Int!    groupId: Int!  ): OperationResult  resetUserPassword(    id: Int!  ): OperationResult  setConfigEntry(    key: String!    value: String!  ): OperationResult  setUserPassword(    id: Int!    passwordRaw: String!  ): OperationResult  uploadFile(    category: FileType!    filename: String!  ): File}
 |