2024-04-24 17:36:33 +00:00
|
|
|
directive @oneOf on INPUT_OBJECT | FIELD_DEFINITION
|
2024-07-07 20:09:13 +00:00
|
|
|
directive @resolver on INPUT_FIELD_DEFINITION | FIELD_DEFINITION
|
2024-04-24 17:36:33 +00:00
|
|
|
directive @stream on FIELD_DEFINITION
|
|
|
|
type ArchiveFS implements Dir & FsEntry {
|
|
|
|
name: String!
|
2024-07-07 20:09:13 +00:00
|
|
|
entries: [FsEntry!]! @resolver
|
2024-04-24 17:36:33 +00:00
|
|
|
size: Int!
|
|
|
|
}
|
|
|
|
input BooleanFilter @oneOf {
|
|
|
|
eq: Boolean
|
|
|
|
}
|
|
|
|
type CleanupResponse {
|
|
|
|
count: Int!
|
|
|
|
list: [String!]!
|
|
|
|
}
|
|
|
|
scalar DateTime
|
|
|
|
input DateTimeFilter @oneOf {
|
|
|
|
eq: DateTime
|
|
|
|
gt: DateTime
|
|
|
|
lt: DateTime
|
|
|
|
gte: DateTime
|
|
|
|
lte: DateTime
|
|
|
|
}
|
|
|
|
interface Dir implements FsEntry {
|
|
|
|
name: String!
|
|
|
|
entries: [FsEntry!]!
|
|
|
|
}
|
|
|
|
type DownloadTorrentResponse {
|
|
|
|
task: Task
|
|
|
|
}
|
|
|
|
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 {
|
2024-07-07 20:09:13 +00:00
|
|
|
torrentDaemon: TorrentDaemonMutation @resolver
|
2024-05-14 21:40:38 +00:00
|
|
|
uploadFile(dir: String!, file: Upload!): Boolean!
|
2024-04-24 17:36:33 +00:00
|
|
|
dedupeStorage: Int!
|
|
|
|
}
|
|
|
|
input Pagination {
|
|
|
|
offset: Int!
|
|
|
|
limit: Int!
|
|
|
|
}
|
|
|
|
interface Progress {
|
|
|
|
current: Int!
|
|
|
|
total: Int!
|
|
|
|
}
|
|
|
|
type Query {
|
2024-07-07 20:09:13 +00:00
|
|
|
torrentDaemon: TorrentDaemonQuery @resolver
|
2024-04-24 17:36:33 +00:00
|
|
|
fsEntry(path: String!): FsEntry
|
|
|
|
}
|
|
|
|
type ResolverFS implements Dir & FsEntry {
|
|
|
|
name: String!
|
2024-07-07 20:09:13 +00:00
|
|
|
entries: [FsEntry!]! @resolver
|
2024-04-24 17:36:33 +00:00
|
|
|
}
|
|
|
|
type Schema {
|
|
|
|
query: Query
|
|
|
|
mutation: Mutation
|
|
|
|
}
|
|
|
|
type SimpleDir implements Dir & FsEntry {
|
|
|
|
name: String!
|
2024-07-07 20:09:13 +00:00
|
|
|
entries: [FsEntry!]! @resolver
|
2024-04-24 17:36:33 +00:00
|
|
|
}
|
|
|
|
type SimpleFile implements File & FsEntry {
|
|
|
|
name: String!
|
|
|
|
size: Int!
|
|
|
|
}
|
|
|
|
input StringFilter @oneOf {
|
|
|
|
eq: String
|
|
|
|
substr: String
|
|
|
|
in: [String!]
|
|
|
|
}
|
|
|
|
type Subscription {
|
|
|
|
taskProgress(taskID: ID!): Progress
|
|
|
|
torrentDownloadUpdates: TorrentProgress
|
|
|
|
}
|
|
|
|
type Task {
|
|
|
|
id: ID!
|
|
|
|
}
|
|
|
|
type Torrent {
|
2024-07-07 20:09:13 +00:00
|
|
|
name: String! @resolver
|
2024-04-24 17:36:33 +00:00
|
|
|
infohash: String!
|
|
|
|
bytesCompleted: Int!
|
|
|
|
torrentFilePath: String!
|
|
|
|
bytesMissing: Int!
|
2024-07-07 20:09:13 +00:00
|
|
|
priority: TorrentPriority! @resolver
|
|
|
|
files: [TorrentFile!]! @resolver
|
|
|
|
excludedFiles: [TorrentFile!]! @resolver
|
|
|
|
peers: [TorrentPeer!]! @resolver
|
|
|
|
}
|
|
|
|
type TorrentDaemonMutation {
|
|
|
|
validateTorrent(filter: TorrentFilter!): Boolean! @resolver
|
|
|
|
setTorrentPriority(infohash: String!, file: String, priority: TorrentPriority!): Boolean! @resolver
|
|
|
|
cleanup(files: Boolean, dryRun: Boolean!): CleanupResponse! @resolver
|
|
|
|
}
|
|
|
|
type TorrentDaemonQuery {
|
|
|
|
torrents(filter: TorrentsFilter): [Torrent!]! @resolver
|
2024-04-24 17:36:33 +00:00
|
|
|
}
|
|
|
|
type TorrentFS implements Dir & FsEntry {
|
|
|
|
name: String!
|
|
|
|
torrent: Torrent!
|
2024-07-07 20:09:13 +00:00
|
|
|
entries: [FsEntry!]! @resolver
|
2024-04-24 17:36:33 +00:00
|
|
|
}
|
|
|
|
type TorrentFile {
|
|
|
|
filename: String!
|
|
|
|
size: Int!
|
|
|
|
bytesCompleted: Int!
|
|
|
|
}
|
|
|
|
type TorrentFileEntry implements File & FsEntry {
|
|
|
|
name: String!
|
|
|
|
torrent: Torrent!
|
|
|
|
size: Int!
|
|
|
|
}
|
|
|
|
input TorrentFilter @oneOf {
|
|
|
|
everything: Boolean
|
|
|
|
infohash: String
|
|
|
|
}
|
|
|
|
type TorrentPeer {
|
|
|
|
ip: String!
|
|
|
|
downloadRate: Float!
|
|
|
|
discovery: String!
|
|
|
|
port: Int!
|
|
|
|
clientName: String!
|
|
|
|
}
|
2024-07-07 20:09:13 +00:00
|
|
|
enum TorrentPriority {
|
|
|
|
NONE
|
|
|
|
NORMAL
|
|
|
|
HIGH
|
|
|
|
READAHEAD
|
|
|
|
NEXT
|
|
|
|
NOW
|
|
|
|
}
|
|
|
|
input TorrentPriorityFilter @oneOf {
|
|
|
|
eq: TorrentPriority
|
|
|
|
gt: TorrentPriority
|
|
|
|
lt: TorrentPriority
|
|
|
|
gte: TorrentPriority
|
|
|
|
lte: TorrentPriority
|
|
|
|
in: [TorrentPriority!]
|
|
|
|
}
|
2024-04-24 17:36:33 +00:00
|
|
|
type TorrentProgress implements Progress {
|
|
|
|
torrent: Torrent!
|
|
|
|
current: Int!
|
|
|
|
total: Int!
|
|
|
|
}
|
|
|
|
input TorrentsFilter {
|
|
|
|
infohash: StringFilter
|
|
|
|
name: StringFilter
|
|
|
|
bytesCompleted: IntFilter
|
|
|
|
bytesMissing: IntFilter
|
|
|
|
peersCount: IntFilter
|
2024-07-07 20:09:13 +00:00
|
|
|
priority: TorrentPriorityFilter
|
2024-04-24 17:36:33 +00:00
|
|
|
}
|
2024-05-13 16:56:20 +00:00
|
|
|
scalar Upload
|