This commit is contained in:
royalcat 2024-03-18 00:00:34 +03:00
parent 35913e0190
commit 6a1e338af4
34 changed files with 1900 additions and 355 deletions

View file

@ -1,10 +1,20 @@
type Mutation {
validateTorrents(filter: TorrentFilter!): Boolean!
cleanupTorrents(files: Boolean, dryRun: Boolean!): Int!
downloadTorrent(infohash: String!, file: String): DownloadTorrentResponse
}
input TorrentFilter @oneOf {
everything: Boolean
infohash: String
# pathGlob: String!
}
type DownloadTorrentResponse {
task: Task
}
type Task {
id: ID!
}

View file

@ -1,4 +1,5 @@
directive @oneOf on INPUT_OBJECT | FIELD_DEFINITION
directive @stream on FIELD_DEFINITION
scalar DateTime
@ -6,4 +7,3 @@ type Schema {
query: Query
mutation: Mutation
}

View file

@ -0,0 +1,16 @@
type Subscription {
taskProgress(taskID: ID!): Progress
torrentDownloadUpdates: TorrentProgress
}
type TorrentProgress implements Progress {
torrent: Torrent!
current: Int!
total: Int!
}
interface Progress {
current: Int!
total: Int!
}