-
Notifications
You must be signed in to change notification settings - Fork 0
/
api-schema.graphql
721 lines (641 loc) · 17.2 KB
/
api-schema.graphql
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
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
# ------------------------------------------------------
# THIS FILE WAS AUTOMATICALLY GENERATED (DO NOT MODIFY)
# ------------------------------------------------------
input AdminCreateIdentityInput {
ownerId: String!
provider: IdentityProvider!
providerId: String!
}
input AdminCreateUserInput {
password: String
username: String!
}
input AdminFindManyCommentInput {
reviewId: String!
search: String
}
input AdminFindManyCommunityInput {
limit: Int = 10
page: Int = 1
search: String
}
input AdminFindManyIdentityInput {
ownerId: String
provider: IdentityProvider
}
input AdminFindManyProjectInput {
communityId: String
limit: Int = 10
page: Int = 1
search: String
}
input AdminFindManyRatingInput {
commentId: String
search: String
}
input AdminFindManyReviewInput {
limit: Int = 10
page: Int = 1
projectId: String!
search: String
}
input AdminFindManyUserInput {
limit: Int = 10
page: Int = 1
role: UserRole
search: String
status: UserStatus
}
input AdminUpdateCommentInput {
content: String
}
input AdminUpdateCommunityInput {
avatarUrl: String
homeServerId: String
name: String
}
input AdminUpdateDiscordServerInput {
communityCategoryId: String
createChannels: Boolean
logChannelId: String
projectCategoryId: String
}
input AdminUpdateProjectInput {
amountManagerUsd: Int
amountReferralUsd: Int
amountTotalUsd: Int
avatarUrl: String
communityId: String
durationDays: Int
instructions: String
linkDiscord: String
linkGithub: String
linkTelegram: String
linkTwitter: String
linkWebsite: String
name: String
reviewsOpen: Boolean
startDate: DateTime
status: ProjectStatus
}
input AdminUpdateRatingInput {
content: String
rating: Float!
}
input AdminUpdateUserInput {
avatarUrl: String
developer: Boolean
name: String
role: UserRole
status: UserStatus
username: String
}
type AppConfig {
authDiscordEnabled: Boolean!
authPasswordEnabled: Boolean!
authRegisterEnabled: Boolean!
authSolanaEnabled: Boolean!
solanaMainnetUrl: String!
}
type Comment {
author: User
authorId: String!
category: CommentCategory!
children: [Comment!]
content: String!
createdAt: DateTime
id: String!
parentId: String
ratingAverage: Float
ratings: [Rating!]
review: Review
reviewId: String!
updatedAt: DateTime
versionBrowser: String
versionOs: String
}
enum CommentCategory {
Bug
Feature
Other
}
type Community {
activeProjectsCount: Int
avatarUrl: String
createdAt: DateTime
homeServerId: String
id: String!
manageUrl: String!
managerCount: Int
managers: [CommunityManager!]
name: String!
updatedAt: DateTime
viewUrl: String!
}
type CommunityManager {
admin: Boolean
createdAt: DateTime
id: String!
updatedAt: DateTime
user: User
userId: String!
}
type CommunityPaging {
data: [Community!]!
meta: PagingMeta!
}
"""
A date-time string at UTC, such as 2019-12-03T09:54:33Z, compliant with the date-time format.
"""
scalar DateTime
type DiscordBot {
avatarUrl: String
id: String!
inviteUrl: String
manageUrl: String
username: String!
}
type DiscordChannel {
guildId: String
id: String!
name: String!
parentId: String
type: String!
}
type DiscordRole {
color: Int!
id: String!
managed: Boolean!
name: String!
position: Int!
}
type DiscordServer {
avatarUrl: String
communityCategoryId: String
createChannels: Boolean
id: String!
logChannelId: String
name: String!
permissions: [String!]
projectCategoryId: String
}
type FaqItem {
answer: String!
createdAt: DateTime
group: FaqItemGroup!
id: String!
order: Int
question: String!
updatedAt: DateTime
}
input FaqItemAdminCreateInput {
group: FaqItemGroup!
question: String!
}
input FaqItemAdminFindManyInput {
search: String
}
input FaqItemAdminUpdateInput {
answer: String
group: FaqItemGroup
order: Int
question: String
}
enum FaqItemGroup {
Manager
Reviewer
}
input FaqItemUserFindManyInput {
search: String
}
type Identity {
challenges: [IdentityChallenge!]
createdAt: DateTime!
expired: Boolean
id: String!
name: String
owner: User
primary: Boolean
profile: JSON
provider: IdentityProvider!
providerId: String!
updatedAt: DateTime!
url: String
verified: Boolean
}
type IdentityChallenge {
challenge: String!
createdAt: DateTime!
id: String!
ip: String!
provider: IdentityProvider!
providerId: String!
signature: String
updatedAt: DateTime!
userAgent: String!
verified: Boolean!
}
enum IdentityProvider {
Discord
Solana
}
"""
The `JSON` scalar type represents JSON values as specified by [ECMA-404](http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-404.pdf).
"""
scalar JSON @specifiedBy(url: "http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-404.pdf")
input LinkIdentityInput {
provider: IdentityProvider!
providerId: String!
}
input LoginInput {
password: String!
username: String!
}
input ManagerCreateCommunityInput {
name: String!
}
input ManagerCreateProjectInput {
communityId: String!
duration: Int
name: String!
startDate: DateTime
}
input ManagerCreateRatingInput {
commentId: String!
content: String
rating: Float!
}
input ManagerFindManyCommentInput {
projectId: String!
search: String
}
input ManagerFindManyCommunityInput {
limit: Int = 10
page: Int = 1
search: String
}
input ManagerFindManyProjectInput {
communityId: String
limit: Int = 10
mineOnly: Boolean
orderBy: ProjectOrderBy
orderDirection: OrderDirection
page: Int = 1
search: String
status: ProjectStatus
}
input ManagerFindManyReviewByProjectInput {
projectId: String!
search: String
}
input ManagerUpdateCommunityInput {
avatarUrl: String
homeServerId: String
name: String
}
input ManagerUpdateProjectInput {
amountManagerUsd: Int
amountReferralUsd: Int
amountTotalUsd: Int
avatarUrl: String
durationDays: Int
instructions: String
linkDiscord: String
linkGithub: String
linkTelegram: String
linkTwitter: String
linkWebsite: String
name: String
referralId: String
reviewsOpen: Boolean
startDate: DateTime
}
input ManagerUpdateProjectMemberInput {
amount: Int
bonus: Int
}
input ManagerUpdateRatingInput {
content: String
rating: Float
}
type Mutation {
adminAddCommunityManager(communityId: String!, userId: String!): Boolean
adminAddProjectManager(managerUserId: String!, projectId: String!): Boolean
adminCreateCommunityChannel(channelId: String!, communityId: String!, serverId: String!): Boolean!
adminCreateFaqItem(input: FaqItemAdminCreateInput!): FaqItem
adminCreateIdentity(input: AdminCreateIdentityInput!): Identity
adminCreateProjectChannel(channelId: String!, projectId: String!, serverId: String!): Boolean!
adminCreateUser(input: AdminCreateUserInput!): User
adminDeleteComment(commentId: String!): Boolean
adminDeleteCommunity(communityId: String!): Boolean
adminDeleteCommunityChannel(channelId: String!, communityId: String!): Boolean!
adminDeleteFaqItem(faqItemId: String!): Boolean
adminDeleteIdentity(identityId: String!): Boolean
adminDeleteProject(projectId: String!): Boolean
adminDeleteProjectChannel(channelId: String!, projectId: String!): Boolean!
adminDeleteRating(ratingId: String!): Boolean
adminDeleteReview(reviewId: String!): Boolean
adminDeleteUser(userId: String!): Boolean
adminLeaveDiscordServer(serverId: String!): Boolean!
adminPingDiscordChannel(channelId: String!, serverId: String!): Boolean!
adminRemoveCommunityManager(communityId: String!, userId: String!): Boolean
adminRemoveProjectMember(projectMemberId: String!): Boolean
adminToggleCommunityAdmin(communityId: String!, userId: String!): Boolean
adminUpdateComment(commentId: String!, input: AdminUpdateCommentInput!): Comment
adminUpdateCommunity(communityId: String!, input: AdminUpdateCommunityInput!): Community
adminUpdateDiscordServer(input: AdminUpdateDiscordServerInput!, serverId: String!): Boolean!
adminUpdateFaqItem(faqItemId: String!, input: FaqItemAdminUpdateInput!): FaqItem
adminUpdateProject(input: AdminUpdateProjectInput!, projectId: String!): Project
adminUpdateProjectMemberRole(projectMemberId: String!, role: ProjectRole!): Boolean
adminUpdateRating(input: AdminUpdateRatingInput!, ratingId: String!): Rating
adminUpdateUser(input: AdminUpdateUserInput!, userId: String!): User
anonVerifyIdentityChallenge(input: VerifyIdentityChallengeInput!): IdentityChallenge
login(input: LoginInput!): User
logout: Boolean
managerAddCommunityManager(communityId: String!, userId: String!): Boolean
managerAddProjectManager(managerUserId: String!, projectId: String!): Boolean
managerAddProjectReferral(projectId: String!, referralUserId: String!): Boolean
managerAddProjectReviewer(projectId: String!, reviewerUserId: String!): Boolean
managerCreateCommunity(input: ManagerCreateCommunityInput!): Community
managerCreateProject(input: ManagerCreateProjectInput!): Project
managerCreateRating(input: ManagerCreateRatingInput!): Rating
managerDeleteCommunity(communityId: String!): Boolean
managerDeleteProject(projectId: String!): Boolean
managerDeleteRating(ratingId: String!): Boolean
managerRemoveCommunityManager(communityId: String!, userId: String!): Boolean
managerRemoveProjectManager(managerUserId: String!, projectId: String!): Boolean
managerRemoveProjectReferral(projectId: String!, referralUserId: String!): Boolean
managerRemoveProjectReviewer(projectId: String!, reviewerUserId: String!): Boolean
managerSplitByRating(projectId: String!): Boolean
managerToggleCommunityAdmin(communityId: String!, userId: String!): Boolean
managerUpdateCommunity(communityId: String!, input: ManagerUpdateCommunityInput!): Community
managerUpdateProject(input: ManagerUpdateProjectInput!, projectId: String!): Project
managerUpdateProjectMember(input: ManagerUpdateProjectMemberInput!, projectMemberId: String!): ProjectMember
managerUpdateProjectStatus(projectId: String!, status: ProjectStatus!): Project
managerUpdateRating(input: ManagerUpdateRatingInput!, ratingId: String!): Rating
register(input: RegisterInput!): User
reviewerCreateComment(input: ReviewerCreateCommentInput!): Comment
reviewerCreateReview(projectId: String!): Review
reviewerDeleteComment(commentId: String!): Boolean
reviewerDeleteReview(reviewId: String!): Boolean
reviewerUpdateComment(commentId: String!, input: ReviewerUpdateCommentInput!): Comment
userDeleteIdentity(identityId: String!): Boolean
userLinkIdentity(input: LinkIdentityInput!): Identity
userSetPrimaryIdentity(identityId: String!): Identity
userUpdateUser(input: UserUpdateUserInput!): User
userVerifyIdentityChallenge(input: VerifyIdentityChallengeInput!): IdentityChallenge
}
enum OrderDirection {
Asc
Desc
}
type PagingMeta {
currentPage: Int!
isFirstPage: Boolean!
isLastPage: Boolean!
nextPage: Int
pageCount: Int
previousPage: Int
totalCount: Int
}
type Project {
amountManagerUsd: Int
amountReferralUsd: Int
amountTotalUsd: Int
amountTotalUsdLeft: Int
avatarUrl: String
community: Community
communityId: String!
createdAt: DateTime
durationDays: Int
endDate: DateTime
id: String!
instructions: String
linkDiscord: String
linkGithub: String
linkTelegram: String
linkTwitter: String
linkWebsite: String
manageUrl: String!
managers: [ProjectMember!]
members: [ProjectMember!]
message: ProjectMessage
name: String!
referral: ProjectMember
remainingDays: Int
reviewCount: Int
reviewers: [ProjectMember!]
reviewsOpen: Boolean
slug: String!
startDate: DateTime
status: ProjectStatus
updatedAt: DateTime
viewUrl: String!
}
type ProjectMember {
amount: Int
bonus: Int
createdAt: DateTime
id: String!
project: Project
projectId: String
referral: Boolean
review: Review
role: ProjectRole
updatedAt: DateTime
user: User
userId: String
}
type ProjectMessage {
message: String
nextStatus: ProjectStatus
}
enum ProjectOrderBy {
Amount
CreatedAt
EndDate
UpdatedAt
}
type ProjectPaging {
data: [Project!]!
meta: PagingMeta!
}
enum ProjectRole {
Manager
Referral
Reviewer
}
enum ProjectStatus {
Active
Closed
Draft
}
type Query {
adminFindManyComment(input: AdminFindManyCommentInput!): [Comment!]
adminFindManyCommunity(input: AdminFindManyCommunityInput!): CommunityPaging!
adminFindManyFaqItem(input: FaqItemAdminFindManyInput!): [FaqItem!]!
adminFindManyIdentity(input: AdminFindManyIdentityInput!): [Identity!]
adminFindManyProject(input: AdminFindManyProjectInput!): ProjectPaging!
adminFindManyRating(input: AdminFindManyRatingInput!): [Rating!]!
adminFindManyReview(input: AdminFindManyReviewInput!): ReviewPaging!
adminFindManyUser(input: AdminFindManyUserInput!): UserPaging!
adminFindOneCommunity(communityId: String!): Community
adminFindOneFaqItem(faqItemId: String!): FaqItem
adminFindOneProject(projectId: String!): Project
adminFindOneReview(reviewId: String!): Review
adminFindOneUser(userId: String!): User
adminGetCommunityChannels(communityId: String!): [DiscordChannel!]!
adminGetCommunityManagers(communityId: String!): [CommunityManager!]
adminGetDiscordBot: DiscordBot!
adminGetDiscordChannels(serverId: String!): [DiscordChannel!]!
adminGetDiscordRoles(serverId: String!): [DiscordRole!]!
adminGetDiscordServers: [DiscordServer!]!
adminGetProjectChannels(projectId: String!): [DiscordChannel!]!
anonRequestIdentityChallenge(input: RequestIdentityChallengeInput!): IdentityChallenge
appConfig: AppConfig!
managerFindManyComment(input: ManagerFindManyCommentInput!): [Comment!]
managerFindManyCommunity(input: ManagerFindManyCommunityInput!): CommunityPaging!
managerFindManyProject(input: ManagerFindManyProjectInput!): ProjectPaging!
managerFindManyReviewByProject(input: ManagerFindManyReviewByProjectInput!): [Review!]
managerFindOneCommunity(communityId: String!): Community
managerFindOneProject(projectId: String!): Project
managerGetCommunityManager(communityId: String!): CommunityManager
managerGetCommunityManagers(communityId: String!): [CommunityManager!]
me: User
reviewerFindManyComment(input: ReviewerFindManyCommentInput!): [Comment!]
reviewerFindManyProject(input: ReviewerFindManyProjectInput!): ProjectPaging!
reviewerFindManyReviewByProject(input: ReviewerFindManyReviewByProjectInput!): [Review!]
reviewerFindManyReviewByUsername(input: ReviewerFindManyReviewByUsernameInput!): [Review!]
reviewerFindOneProject(projectId: String!): Project
reviewerFindOneReview(reviewId: String!): Review
reviewerFindUserProjectReview(projectId: String!): Review
uptime: Float!
userFindManyCommunity(input: UserFindManyCommunityInput!): CommunityPaging!
userFindManyFaqItem(input: FaqItemUserFindManyInput!): [FaqItem!]!
userFindManyIdentity(input: UserFindManyIdentityInput!): [Identity!]
userFindManyUser(input: UserFindManyUserInput!): UserPaging!
userFindOneCommunity(communityId: String!): Community
userFindOneUser(username: String!): User
userGetCommunityChannels(communityId: String!): [DiscordChannel!]!
userGetDiscordServers: [DiscordServer!]!
userGetProjectChannels(projectId: String!): [DiscordChannel!]!
userRequestIdentityChallenge(input: RequestIdentityChallengeInput!): IdentityChallenge
}
type Rating {
author: User
authorId: String!
commentId: String!
content: String
createdAt: DateTime
id: String!
rating: Float!
updatedAt: DateTime
}
input RegisterInput {
password: String!
username: String!
}
input RequestIdentityChallengeInput {
provider: IdentityProvider!
providerId: String!
}
type Review {
commentCount: Int
createdAt: DateTime
id: String!
name: String!
projectMember: ProjectMember
projectMemberId: String!
ratingAverage: Float
ratingCount: Int
updatedAt: DateTime
viewUrl: String!
}
type ReviewPaging {
data: [Review!]!
meta: PagingMeta!
}
input ReviewerCreateCommentInput {
content: String!
parentId: String
reviewId: String!
versionBrowser: String
versionOs: String
}
input ReviewerFindManyCommentInput {
reviewId: String!
search: String
}
input ReviewerFindManyProjectInput {
communityId: String
limit: Int = 10
mineOnly: Boolean
orderBy: ProjectOrderBy
orderDirection: OrderDirection
page: Int = 1
search: String
status: ProjectStatus
}
input ReviewerFindManyReviewByProjectInput {
projectId: String!
search: String
}
input ReviewerFindManyReviewByUsernameInput {
search: String
username: String!
}
input ReviewerUpdateCommentInput {
content: String
}
type User {
avatarUrl: String
createdAt: DateTime
developer: Boolean
id: String!
identities: [Identity!]
manager: Boolean
name: String
profileUrl: String!
role: UserRole
status: UserStatus
updatedAt: DateTime
username: String
walletAddress: String
}
input UserFindManyCommunityInput {
limit: Int = 10
page: Int = 1
search: String
}
input UserFindManyIdentityInput {
username: String!
}
input UserFindManyUserInput {
filterIds: [String!]
limit: Int = 10
page: Int = 1
search: String
}
type UserPaging {
data: [User!]!
meta: PagingMeta!
}
enum UserRole {
Admin
User
}
enum UserStatus {
Active
Created
Inactive
}
input UserUpdateUserInput {
developer: Boolean
}
input VerifyIdentityChallengeInput {
challenge: String!
provider: IdentityProvider!
providerId: String!
signature: String!
useLedger: Boolean = false
}