-
Notifications
You must be signed in to change notification settings - Fork 1
/
schema.graphql
751 lines (688 loc) · 18.4 KB
/
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
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
schema {
query: Query
mutation: Mutation
}
type Asset {
auction: Auction!
auctionId: Uuid!
category: Category!
categoryTokenId: Uuid!
id: Uuid!
image: String!
metadata: Json!
position: Int!
tokenAmount: Int!
tokenContractAddress: Hex!
tokenId: Int!
}
type Auction {
amount: Hex!
amountOrMinimal: Hex!
antisnippingDuration: Int
antisnippingTrigger: Int
assets(filter: assetFilter, limit: Limit = 10, orderBy: assetOrderBy, orderDir: orderDir): [Asset]!
auctioneerAuctions(filter: auctioneerAuctionFilter, limit: Limit = 10, orderBy: auctioneerAuctionOrderBy, orderDir: orderDir): [AuctioneerAuction]!
auctioneers(limit: Limit = 10, orderDir: orderDir): [Auctioneer]!
bidIncremental: Hex!
bids(
filter: bidFilter,
limit: Limit = 10,
#Value hash
offset: Hex,
orderBy: bidOrderBy,
orderDir: orderDir
): [Bid]!
blockNumber: Int!
blockedAt: DateTime
countBids: Int!
countLikes: Int!
createTransactionHash: String!
createdAt: DateTime!
currency: Currency!
currencyId: Uuid!
description: String!
endDate: DateTime!
finishedAt: DateTime
id: Uuid!
isBlocked: Boolean!
isFeatured: Boolean!
isLegacy: Boolean!
#True if the current user liked this auction
liked: Boolean!
metadata: Json
minimalBid: Hex!
rewards: Json!
sellerAddress: Hex!
sponsor: Hex
startAmount: Hex!
startDate: DateTime!
status: String!
title: String!
trustLevel: String!
updatedAt: DateTime!
winnerAddress: Hex
}
type AuctionLike {
auction: Auction!
auctionId: Uuid!
count: Int!
id: Uuid!
isLike: Boolean!
user: User!
userAddress: Hex!
}
type Auctioneer {
auctioneerAuctions(filter: auctioneerAuctionFilter, limit: Limit = 10, orderBy: auctioneerAuctionOrderBy, orderDir: orderDir): [AuctioneerAuction]!
avatar: String
countAuctions: Int!
countBids: Int!
countFollowers: Int!
createdAt: DateTime!
deletedAt: DateTime
description: String!
#True if the current user followed this auctioneer
followed: Boolean!
languages: Json!
profileName: String!
socialLinks: Json!
updatedAt: DateTime!
userAddress: Hex!
}
type AuctioneerAuction {
auction: Auction!
auctionId: Uuid!
auctioneer: Auctioneer!
avatar: String
countFollowers: Int!
createdAt: DateTime!
description: String!
estimate: Hex
id: Uuid!
isLive: Boolean!
languages: Json!
live: Json
preview: Json
profileName: String!
updatedAt: DateTime!
userAddress: Hex!
}
type AuctioneerFollow {
auctioneer: Auctioneer!
auctioneerAddress: Hex!
count: Int!
id: Uuid!
isFollow: Boolean!
user: User!
userAddress: Hex!
}
#user currency balance
type Balance {
available: Hex!
currency: Currency!
lock: Hex!
total: Hex!
}
type Bid {
amount: Hex!
auction: Auction!
auctionId: Uuid!
auctioneer: Auctioneer
auctioneerAddress: Hex
bidAt: DateTime!
bidIndex: Int!
bidderAddress: Hex!
blockNumber: Int!
hasAuctioneer: Boolean!
hasSponsorAddress: Boolean!
hash: Hex!
sponsorAddress: Hex
}
type Category {
abi: Json!
contractAddress: Hex!
createdAt: DateTime!
description: String
event: String
function: String
id: Uuid!
image: String
imagePatternUrl: String
isErc1155: Boolean!
isErc20: Boolean!
isErc721: Boolean!
isEth: Boolean!
metadata: Json!
reference: String!
title: String!
tokenImageUrl: String
updatedAt: DateTime!
url: String
video: String
}
type Currency {
abi: Json!
contractAddress: Hex!
createdAt: DateTime!
currencySymbol: String
decimalNumber: Int
defaultValue: Hex!
event: String
function: String
id: Uuid!
isErc1155: Boolean!
isErc20: Boolean!
isErc721: Boolean!
isEth: Boolean!
metadata: Json!
rates: Json!
reference: String!
symbol: String
title: String!
updatedAt: DateTime!
}
type Mutation {
#This mutation requires authentication.
auctionLiked(auctionId: Uuid!): Boolean
#This mutation requires authentication.
auctionMetadata(auctionId: Uuid!, description: String!, title: String!): Boolean
#This mutation requires authentication.
auctioneerAuction(auctionId: Uuid!, description: String!, estimate: Hex, isLive: Boolean!, languages: [language], live: videoInput, preview: videoInput): Boolean
#This mutation requires authentication.
auctioneerAuctionDelete(auctionId: Uuid!): Boolean
#This mutation requires authentication.
auctioneerFollowed(auctioneer: Hex!): Boolean
#This mutation requires authentication.
becameAuctioneer(avatar: Url, description: String!, languages: [language]!, profileName: String!, socialLinks: socialLinksInput!): JWT!
#This mutation requires authentication.
informationAdded(email: Email!, name: String!): JWT!
# if source is trezor sign specify type: trezor
login(message: String!, sign: String!, type: String): JWT!
}
type Query {
acnetBalances(currencyId: Uuid, userAddress: Hex!): [Balance]!
auctioneerAuctions(filter: auctioneerAuctionFullFilter, limit: Limit = 10, orderBy: auctioneerAuctionOrderBy, orderDir: orderDir): [AuctioneerAuction]!
auctioneers(filter: auctioneerFullFilter, limit: Limit = 10, orderBy: auctioneerOrderBy, orderDir: orderDir): [Auctioneer]!
auctions(
filter: auctionFullFilter,
limit: Limit = 10,
#Value id
offset: Uuid,
orderBy: auctionOrderBy,
orderDir: orderDir
): [Auction]!
bids(
filter: bidFullFilter,
limit: Limit = 10,
#Value hash
offset: Hex,
orderBy: bidOrderBy,
orderDir: orderDir
): [Bid]!
categories(filter: categoryFullFilter, limit: Limit = 10, orderBy: categoryOrderBy, orderDir: orderDir): [Category]!
currencies(filter: currencyFullFilter, limit: Limit = 10, orderBy: currencyOrderBy, orderDir: orderDir): [Currency]!
mainnetBalances(currencyId: Uuid, userAddress: Hex!): [Balance]!
#List of recommended auctions.
recommendedAuctions: [Auction]!
tokens(filter: tokenFullFilter, limit: Limit = 10, orderBy: tokenOrderBy, orderDir: orderDir): [Token]!
#List of 5 auctioneers.
topAuctioneers: [Auctioneer]!
#List of 15 top auctions.
topAuctions: [Auction]!
#Current user
user: User
vouchers(filter: voucherFullFilter, limit: Limit = 10, orderBy: voucherOrderBy, orderDir: orderDir): [Voucher]!
}
#user asset
type SimpleAsset {
available: Hex!
category: Category!
id: Int!
image: String!
lock: Hex!
}
type Token {
abi: Json!
config: Json!
contractAddress: Hex!
createdAt: DateTime!
currencySymbol: String
decimalNumber: Int
defaultValue: Hex!
description: String
event: String
function: String
id: Uuid!
image: String
imagePatternUrl: String
isCategory: Boolean!
isCurrency: Boolean!
isErc1155: Boolean!
isErc20: Boolean!
isErc721: Boolean!
isEth: Boolean!
metadata: Json!
reference: String!
symbol: String
title: String!
tokenId: Int!
tokenImageUrl: String
updatedAt: DateTime!
url: String
video: String
}
type User {
acnetAssets(categoryTokenId: Uuid): [SimpleAsset]!
acnetBalances(currencyId: Uuid): [Balance]!
address: Hex!
auctionLikes(filter: auctionLikeFilter, limit: Limit = 10, orderBy: auctionLikeOrderBy, orderDir: orderDir): [AuctionLike]!
auctioneer: Auctioneer
auctioneerFollows(filter: auctioneerFollowFilter, limit: Limit = 10, orderBy: auctioneerFollowOrderBy, orderDir: orderDir): [AuctioneerFollow]!
bids(
filter: bidFilter,
limit: Limit = 10,
#Value hash
offset: Hex,
orderBy: bidOrderBy,
orderDir: orderDir
): [Bid]!
createdAt: DateTime!
email: String!
mainnetAssets(categoryTokenId: Uuid): [SimpleAsset]!
mainnetBalances(currencyId: Uuid): [Balance]!
name: String!
pendingAssets(categoryTokenId: Uuid): [SimpleAsset]!
vouchers(filter: voucherFilter, limit: Limit = 10, orderBy: voucherOrderBy, orderDir: orderDir): [Voucher]!
walletHistory(currencyId: Uuid): Json!
}
type Voucher {
amount: Hex!
categoryTokenId: Uuid!
requestAt: DateTime!
requestHash: Hex!
submittedAt: DateTime
submittedHash: Hex
tokenAddress: Hex!
tokenId: Int!
userAddress: Hex!
voucher: Hex
}
enum assetOrderBy {
position
tokenAmount
tokenContractAddress
tokenId
}
enum auctionLikeOrderBy {
count
userAddress
}
enum auctionOrderBy {
amount
amountOrMinimal
antiSnippingDuration
antiSnippingTrigger
bidIncremental
blockNumber
blockedAt
countBids
createdAt
endDate
featured
finishedAt
legacy
minimalBid
rewards
sellerAddress
sponsor
startAmount
startDate
updatedAt
winnerAddress
}
enum auctionStatus {
finished
pending
running
}
enum auctioneerAuctionOrderBy {
countFollowers
createdAt
estimate
isLive
topAuctioneers
updatedAt
}
enum auctioneerFollowOrderBy {
auctioneerAddress
count
userAddress
}
enum auctioneerOrderBy {
countFollowers
createdAt
deletedAt
updatedAt
userAddress
}
enum bidOrderBy {
amount
auctioneerAddress
bidAt
bidIndex
bidderAddress
blockNumber
hash
sponsorAddress
}
enum categoryOrderBy {
contractAddress
createdAt
updatedAt
}
enum currencyOrderBy {
contractAddress
createdAt
updatedAt
}
enum language {
ar
en
es
fr
it
pt
zh
}
enum orderDir {
asc
desc
}
enum tokenOrderBy {
contractAddress
createdAt
isCategory
isCurrency
tokenId
updatedAt
}
enum videoProvider {
twitch
youtube
}
enum voucherOrderBy {
amount
requestAt
requestHash
submittedAt
submittedHash
tokenAddress
tokenId
userAddress
voucher
}
input assetFilter {
categoryTokenId: uuidInputCondition
id: uuidInputCondition
image: stringInputCondition
position: intInputCondition
tokenAmount: intInputCondition
tokenContractAddress: hexInputCondition
tokenId: intInputCondition
}
input auctionFullFilter {
amount: hexInputCondition
amountOrMinimal: hexInputCondition
antiSnippingDuration: intInputCondition
antiSnippingTrigger: intInputCondition
auctioneerAddress: hexInputCondition
bidIncremental: hexInputCondition
bidderAddress: hexInputCondition
blockNumber: intInputCondition
blockedAt: dateTimeInputCondition
categoryId: uuidInputCondition
createTransactionHash: stringInputCondition
createdAt: dateTimeInputCondition
currencyId: uuidInputCondition
endDate: dateTimeInputCondition
finishedAt: dateTimeInputCondition
hasAuctioneer: Boolean
hasBids: Boolean
hasLive: Boolean
id: uuidInputCondition
isFeatured: Boolean
isLegacy: Boolean
language: languageInputCondition
#true for only auctions liked by current user, false for auctions not liked by current user
liked: Boolean
minimalBid: hexInputCondition
sellerAddress: hexInputCondition
sponsor: hexInputCondition
startAmount: hexInputCondition
startDate: dateTimeInputCondition
status: auctionStatusInputCondition
trustLevel: stringInputCondition
updatedAt: dateTimeInputCondition
winnerAddress: hexInputCondition
}
input auctionLikeFilter {
auctionId: uuidInputCondition
count: intInputCondition
id: uuidInputCondition
}
input auctionStatusInputCondition {
#Matches value that are equal to a specified value.
eq: auctionStatus
#Matches any of the values specified in an array.
in: [auctionStatus!]
#Matches all values that are not equal to a specified value.
ne: auctionStatus
#Matches none of the values specified in an array.
nin: [auctionStatus!]
}
input auctioneerAuctionFilter {
auctionId: uuidInputCondition
createdAt: dateTimeInputCondition
description: stringInputCondition
estimate: hexInputCondition
id: uuidInputCondition
isLive: Boolean
updatedAt: dateTimeInputCondition
}
input auctioneerAuctionFullFilter {
auctionId: uuidInputCondition
createdAt: dateTimeInputCondition
description: stringInputCondition
estimate: hexInputCondition
id: uuidInputCondition
isLive: Boolean
updatedAt: dateTimeInputCondition
userAddress: hexInputCondition
}
input auctioneerFollowFilter {
auctioneerAddress: hexInputCondition
count: intInputCondition
id: uuidInputCondition
}
input auctioneerFullFilter {
avatar: stringInputCondition
createdAt: dateTimeInputCondition
deletedAt: dateTimeInputCondition
description: stringInputCondition
#true for only auctioneers followed by current user, false for auctioneers not followed by current user
followed: Boolean
profileName: stringInputCondition
updatedAt: dateTimeInputCondition
userAddress: hexInputCondition
}
input bidFilter {
amount: hexInputCondition
auctioneerAddress: hexInputCondition
bidAt: dateTimeInputCondition
bidIndex: intInputCondition
bidderAddress: hexInputCondition
blockNumber: intInputCondition
hash: hexInputCondition
sponsorAddress: hexInputCondition
}
input bidFullFilter {
amount: hexInputCondition
auctionId: uuidInputCondition
auctioneerAddress: hexInputCondition
bidAt: dateTimeInputCondition
bidIndex: intInputCondition
bidderAddress: hexInputCondition
blockNumber: intInputCondition
hash: hexInputCondition
sponsorAddress: hexInputCondition
}
input categoryFullFilter {
contractAddress: hexInputCondition
createdAt: dateTimeInputCondition
id: uuidInputCondition
reference: stringInputCondition
title: stringInputCondition
updatedAt: dateTimeInputCondition
}
input currencyFullFilter {
contractAddress: hexInputCondition
createdAt: dateTimeInputCondition
id: uuidInputCondition
reference: stringInputCondition
title: stringInputCondition
updatedAt: dateTimeInputCondition
}
input dateTimeInputCondition {
#Matches value that are equal to a specified value.
eq: DateTime
#Matches value that are greater than a specified value.
gt: DateTime
#Matches value that are greater than or equal to a specified value.
gte: DateTime
#Matches any of the values specified in an array.
in: [DateTime!]
#Matches value that are less than a specified value.
lt: DateTime
#Matches value that are less than or equal to a specified value.
lte: DateTime
#Matches all values that are not equal to a specified value.
ne: DateTime
#Matches none of the values specified in an array.
nin: [DateTime!]
}
input hexInputCondition {
#Matches value that are equal to a specified value.
eq: Hex
#Matches any of the values specified in an array.
in: [Hex!]
#Matches all values that are not equal to a specified value.
ne: Hex
#Matches none of the values specified in an array.
nin: [Hex!]
}
input intInputCondition {
#Matches value that are equal to a specified value.
eq: Int
#Matches value that are greater than a specified value.
gt: Int
#Matches value that are greater than or equal to a specified value.
gte: Int
#Matches any of the values specified in an array.
in: [Int!]
#Matches value that are less than a specified value.
lt: Int
#Matches value that are less than or equal to a specified value.
lte: Int
#Matches all values that are not equal to a specified value.
ne: Int
#Matches none of the values specified in an array.
nin: [Int!]
}
input languageInputCondition {
#Matches value that are equal to a specified value.
eq: language
#Matches any of the values specified in an array.
in: [language!]
#Matches all values that are not equal to a specified value.
ne: language
#Matches none of the values specified in an array.
nin: [language!]
}
input socialLinksInput {
facebook: Url
twitch: Url
twitter: Url
youtube: Url
}
input stringInputCondition {
#Matches value that are equal to a specified value.
eq: String
#Matches any of the values specified in an array.
in: [String!]
#Matches all values that are not equal to a specified value.
ne: String
#Matches none of the values specified in an array.
nin: [String!]
}
input tokenFullFilter {
contractAddress: hexInputCondition
createdAt: dateTimeInputCondition
id: uuidInputCondition
isCategory: Boolean
isCurrency: Boolean
reference: stringInputCondition
title: stringInputCondition
tokenId: intInputCondition
updatedAt: dateTimeInputCondition
}
input uuidInputCondition {
#Matches value that are equal to a specified value.
eq: Uuid
#Matches any of the values specified in an array.
in: [Uuid!]
#Matches all values that are not equal to a specified value.
ne: Uuid
#Matches none of the values specified in an array.
nin: [Uuid!]
}
input videoInput {
id: String!
provider: videoProvider!
thumbnail: Url
}
input voucherFilter {
amount: hexInputCondition
categoryTokenId: uuidInputCondition
requestAt: dateTimeInputCondition
requestHash: hexInputCondition
submittedAt: dateTimeInputCondition
submittedHash: hexInputCondition
tokenAddress: hexInputCondition
tokenId: intInputCondition
voucher: hexInputCondition
}
input voucherFullFilter {
amount: hexInputCondition
categoryTokenId: uuidInputCondition
requestAt: dateTimeInputCondition
requestHash: hexInputCondition
submittedAt: dateTimeInputCondition
submittedHash: hexInputCondition
tokenAddress: hexInputCondition
tokenId: intInputCondition
userAddress: hexInputCondition
voucher: hexInputCondition
}
#The `Hex` scalar type represents hexadecimal string, example : 0x000000000000000000000000
scalar Hex
#The `Json` scalar type represents json data, represented as UTF-8 character sequences.
scalar Json
#The `DateTime` scalar type represents date time, example : 2019-07-11T15:24:53+02:00
scalar DateTime
#Min 1, max 25
scalar Limit
#The `Uuid` scalar type represents uniq id string, example : 603abf9b-5251-3819-bc4b-c25cf4044a7b
scalar Uuid
scalar Email
#The string representation of the object is a JWT
scalar JWT
scalar Url