tstor/ui/lib/api/schema.graphql
royalcat 832f5b9710
Some checks failed
docker / build-docker (push) Has been cancelled
wip
2025-01-20 05:18:15 +03:00

102 lines
1.9 KiB
GraphQL

directive @oneOf on INPUT_OBJECT | FIELD_DEFINITION
directive @resolver on INPUT_FIELD_DEFINITION | FIELD_DEFINITION
directive @stream on FIELD_DEFINITION
input BooleanFilter @oneOf {
eq: Boolean
}
scalar DateTime
input DateTimeFilter @oneOf {
eq: DateTime
gt: DateTime
lt: DateTime
gte: DateTime
lte: DateTime
}
interface Dir implements FsEntry {
name: String!
entries: [FsEntry!]!
}
interface File implements FsEntry {
name: String!
size: Int!
}
interface FsEntry {
name: String!
}
input IntFilter @oneOf {
eq: Int
gt: Int
lt: Int
gte: Int
lte: Int
in: [Int!]
}
type Mutation {
qbitTorrentDaemon: QBitTorrentDaemonMutation @resolver
uploadFile(dir: String!, file: Upload!): Boolean!
dedupeStorage: Int!
}
input Pagination {
offset: Int!
limit: Int!
}
interface Progress {
current: Int!
total: Int!
}
type QBitCleanupResponse {
count: Int!
hashes: [String!]!
}
type QBitCleanupUnregistredResponse {
count: Int!
hashes: [String!]!
}
input QBitTorrentDaemonFilter {
sourcesCount: IntFilter
}
type QBitTorrentDaemonMutation {
cleanup(run: Boolean!): QBitCleanupResponse! @resolver
cleanupUnregistred(run: Boolean!): QBitCleanupUnregistredResponse! @resolver
}
type QBitTorrentDaemonQuery {
torrents(filter: QBitTorrentDaemonFilter): [QTorrent!]! @resolver
}
type QTorrent {
name: String!
hash: String!
sourceFiles: [String!]! @resolver
}
type Query {
qbitTorrentDaemon: QBitTorrentDaemonQuery @resolver
fsEntry(path: String!): FsEntry
}
type ResolverFS implements Dir & FsEntry {
name: String!
entries: [FsEntry!]! @resolver
}
type Schema {
query: Query
mutation: Mutation
}
type SimpleDir implements Dir & FsEntry {
name: String!
entries: [FsEntry!]! @resolver
}
type SimpleFile implements File & FsEntry {
name: String!
size: Int!
}
input StringFilter @oneOf {
eq: String
substr: String
in: [String!]
}
type Subscription {
taskProgress(taskID: ID!): Progress
}
type Task {
id: ID!
}
scalar UInt
scalar Upload