~cosmicrose/effusion-schema

ref: 7b8322375c9968f49caa70cd2aef516334f1188f effusion-schema/schema.graphqls -rw-r--r-- 1.1 KiB
7b832237 — Rosa Richter Add license files 10 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
# SPDX-FileCopyrightText: 2021 Rosa Richter
#
# SPDX-License-Identifier: MIT

scalar DateTime
scalar Base64

type Version {
  major: Int!
  minor: Int!
  patch: Int!
}

type Session {
  downSpeed: Int!
  upSpeed: Int!

  transfers: [Transfer!]!
}

type Tranfer {
  id: ID!
  name: String!
  size: Int!
  started: DateTime!
  state: TransferState!
  downloaded: Int!
  uploaded: Int!
  peers: [Peer!]!
  connectedPeersCount: Int!
  availablePeersCount: Int!
}

enum TransferState {
  CHECKING
  STOPPED
  DOWNLOADING
  SEEDING
  ERRORED
}

type Peer {
  ip: String!
  progress: Float!
  port: Int!
  protocol: Protocol!
  features: [Feature!]!
  from: PeerSource!
  client: Sring!
  downSpeed: Int!
  upSpeed: Int!
  downloaded: Int!
  uploaded: Int!
}

enum Protocol {
  BITTORRENT
  UTORRENT
  HTTP
  HTTPS
}

enum Feature {
  UTP
  FAST
  DHT
  PEX
  ENCRYPTION
}

enum PeerSource {
  TRACKER
  DHT
  PEX
}

type Query {
  version: Version!
  session: Session!
}

type Mutation {
  addTransfer(meta: Base64!): Transfer!
  startTransfer(id: ID!): Transfer!
  stopTransfer(id: ID!): Transfer!
}