This commit is contained in:
royalcat 2025-04-03 03:19:01 +04:00
parent e62df2e9fc
commit 1912b5baf0
39 changed files with 8489 additions and 476 deletions

View file

@ -0,0 +1,8 @@
type Mutation {
uploadFile(dir: String!, file: Upload!): Boolean!
dedupeStorage: Int!
}
type Task {
id: ID!
}

View file

@ -0,0 +1,9 @@
type Query {
plugins: [Plugin!]!
fsEntry(path: String!): FsEntry
}
type Plugin {
name: String!
endpountSubPath: String
}

View file

@ -0,0 +1,13 @@
# directive @oneOf on INPUT_OBJECT | FIELD_DEFINITION
directive @resolver on INPUT_FIELD_DEFINITION | FIELD_DEFINITION
directive @stream on FIELD_DEFINITION
scalar DateTime
scalar Upload
scalar UInt
type Schema {
query: Query
mutation: Mutation
}

View file

@ -0,0 +1,3 @@
type Subscription {
taskProgress(taskID: ID!): Progress
}

View file

@ -0,0 +1,31 @@
input Pagination {
offset: Int!
limit: Int!
}
input StringFilter @oneOf {
eq: String
substr: String
in: [String!]
}
input IntFilter @oneOf {
eq: Int
gt: Int
lt: Int
gte: Int
lte: Int
in: [Int!]
}
input DateTimeFilter @oneOf {
eq: DateTime
gt: DateTime
lt: DateTime
gte: DateTime
lte: DateTime
}
input BooleanFilter @oneOf {
eq: Boolean
}

View file

@ -0,0 +1,35 @@
interface FsEntry {
name: String!
}
interface Dir implements FsEntry {
name: String!
entries: [FsEntry!]!
}
interface File implements FsEntry {
name: String!
size: Int!
}
type SimpleDir implements Dir & FsEntry {
name: String!
entries: [FsEntry!]! @resolver
}
type SimpleFile implements File & FsEntry {
name: String!
size: Int!
}
type ResolverFS implements Dir & FsEntry {
name: String!
entries: [FsEntry!]! @resolver
}
# type ArchiveFS implements Dir & FsEntry {
# name: String!
# entries: [FsEntry!]! @resolver
# size: Int!
# }

View file

@ -0,0 +1,4 @@
interface Progress {
current: Int!
total: Int!
}