-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathschema.graphqls
119 lines (102 loc) · 2.1 KB
/
schema.graphqls
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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
enum UserType {
PROVIDER
REQUESTER
}
type User {
id: ID!
email: String!
createdAt: String!
updatedAt: String!
type: UserType!
banAddress: String
}
type StatsUserType {
banAddress: String!
totalPaidBanano: String!
}
type StatsServiceType {
name: String!
website: String!
requests: Int!
}
type Stats {
connectedWorkers: Int!
totalPaidBanano: String!
registeredServiceCount: Int!
top10: [StatsUserType]!
services: [StatsServiceType]!
}
input RefreshTokenInput {
token: String!
}
input VerifyEmailInput {
email: String!
token: String!
}
input VerifyServiceInput {
email: String!
token: String!
}
input UserInput {
email: String!
password: String!
type: UserType!
banAddress: String
serviceName: String
serviceWebsite: String
}
input LoginInput {
email: String!
password: String!
}
input WorkGenerateInput {
hash: String!
difficultyMultiplier: Int!
blockAward: Boolean
}
input ResetPasswordInput {
email: String!
}
input ResendConfirmationEmailInput {
email: String!
}
type LoginResponse {
token: String!
email: String!
type: UserType!
banAddress: String
serviceName: String
serviceWebsite: String
emailVerified: Boolean!
}
type GetUserResponse {
email: String!
type: UserType!
banAddress: String
serviceName: String
serviceWebsite: String
emailVerified: Boolean!
canRequestWork: Boolean!
}
input ChangePasswordInput {
newPassword: String!
}
type Mutation {
# Related to user authentication and authorization
createUser(input: UserInput!): User!
login(input: LoginInput!): LoginResponse!
refreshToken(input: RefreshTokenInput!): String!
workGenerate(input: WorkGenerateInput!): String!
generateOrGetServiceToken: String!
resetPassword(input: ResetPasswordInput!): Boolean!
resendConfirmationEmail(input: ResendConfirmationEmailInput!): Boolean!
sendConfirmationEmail: Boolean!
changePassword(input: ChangePasswordInput!): Boolean!
}
type Query {
# User queries
verifyEmail(input: VerifyEmailInput!): Boolean!
verifyService(input: VerifyServiceInput!): Boolean!
getUser: GetUserResponse!
stats: Stats!
}