@cleanmate/cip-sdk 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +114 -0
- package/dist/abis/Cleanup.d.ts +132 -0
- package/dist/abis/Cleanup.d.ts.map +1 -0
- package/dist/abis/Cleanup.js +1327 -0
- package/dist/abis/Cleanup.js.map +1 -0
- package/dist/abis/RewardsManager.d.ts +724 -0
- package/dist/abis/RewardsManager.d.ts.map +1 -0
- package/dist/abis/RewardsManager.js +934 -0
- package/dist/abis/RewardsManager.js.map +1 -0
- package/dist/abis/Streak.d.ts +601 -0
- package/dist/abis/Streak.d.ts.map +1 -0
- package/dist/abis/Streak.js +778 -0
- package/dist/abis/Streak.js.map +1 -0
- package/dist/abis/UserRegistry.d.ts +876 -0
- package/dist/abis/UserRegistry.d.ts.map +1 -0
- package/dist/abis/UserRegistry.js +1134 -0
- package/dist/abis/UserRegistry.js.map +1 -0
- package/dist/base.d.ts +53 -0
- package/dist/base.d.ts.map +1 -0
- package/dist/base.js +68 -0
- package/dist/base.js.map +1 -0
- package/dist/cleanup.d.ts +70 -0
- package/dist/cleanup.d.ts.map +1 -0
- package/dist/cleanup.js +75 -0
- package/dist/cleanup.js.map +1 -0
- package/dist/index.d.ts +21 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +23 -0
- package/dist/index.js.map +1 -0
- package/dist/streak.d.ts +57 -0
- package/dist/streak.d.ts.map +1 -0
- package/dist/streak.js +71 -0
- package/dist/streak.js.map +1 -0
- package/dist/subgraph/queries.d.ts +241 -0
- package/dist/subgraph/queries.d.ts.map +1 -0
- package/dist/subgraph/queries.js +837 -0
- package/dist/subgraph/queries.js.map +1 -0
- package/dist/subgraph/types.d.ts +1376 -0
- package/dist/subgraph/types.d.ts.map +1 -0
- package/dist/subgraph/types.js +6 -0
- package/dist/subgraph/types.js.map +1 -0
- package/dist/user.d.ts +38 -0
- package/dist/user.d.ts.map +1 -0
- package/dist/user.js +41 -0
- package/dist/user.js.map +1 -0
- package/package.json +58 -0
|
@@ -0,0 +1,837 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Complete GraphQL query strings for all subgraph entities
|
|
3
|
+
* All queries support complete filtering, ordering, and pagination
|
|
4
|
+
* Based on vechain-subgraph/schema.graphql
|
|
5
|
+
*/
|
|
6
|
+
// ============================================================================
|
|
7
|
+
// User Queries
|
|
8
|
+
// ============================================================================
|
|
9
|
+
/**
|
|
10
|
+
* Query a single user by ID
|
|
11
|
+
*/
|
|
12
|
+
export const GET_USER_QUERY = `
|
|
13
|
+
query GetUser($id: Bytes!) {
|
|
14
|
+
user(id: $id) {
|
|
15
|
+
id
|
|
16
|
+
metadata
|
|
17
|
+
email
|
|
18
|
+
emailVerified
|
|
19
|
+
kycStatus
|
|
20
|
+
referralCode
|
|
21
|
+
referrer
|
|
22
|
+
isOrganizer
|
|
23
|
+
registeredAt
|
|
24
|
+
emailVerifiedAt
|
|
25
|
+
lastProfileUpdateAt
|
|
26
|
+
totalRewardsEarned
|
|
27
|
+
totalRewardsClaimed
|
|
28
|
+
pendingRewards
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
`;
|
|
32
|
+
/**
|
|
33
|
+
* Query multiple users with filters, ordering, and pagination
|
|
34
|
+
*/
|
|
35
|
+
export const GET_USERS_QUERY = `
|
|
36
|
+
query GetUsers(
|
|
37
|
+
$first: Int
|
|
38
|
+
$skip: Int
|
|
39
|
+
$where: User_filter
|
|
40
|
+
$orderBy: User_orderBy
|
|
41
|
+
$orderDirection: OrderDirection
|
|
42
|
+
) {
|
|
43
|
+
users(
|
|
44
|
+
first: $first
|
|
45
|
+
skip: $skip
|
|
46
|
+
where: $where
|
|
47
|
+
orderBy: $orderBy
|
|
48
|
+
orderDirection: $orderDirection
|
|
49
|
+
) {
|
|
50
|
+
id
|
|
51
|
+
metadata
|
|
52
|
+
email
|
|
53
|
+
emailVerified
|
|
54
|
+
kycStatus
|
|
55
|
+
referralCode
|
|
56
|
+
referrer
|
|
57
|
+
isOrganizer
|
|
58
|
+
registeredAt
|
|
59
|
+
emailVerifiedAt
|
|
60
|
+
lastProfileUpdateAt
|
|
61
|
+
totalRewardsEarned
|
|
62
|
+
totalRewardsClaimed
|
|
63
|
+
pendingRewards
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
`;
|
|
67
|
+
// ============================================================================
|
|
68
|
+
// TeamMembership Queries
|
|
69
|
+
// ============================================================================
|
|
70
|
+
/**
|
|
71
|
+
* Query a single team membership by ID
|
|
72
|
+
*/
|
|
73
|
+
export const GET_TEAM_MEMBERSHIP_QUERY = `
|
|
74
|
+
query GetTeamMembership($id: ID!) {
|
|
75
|
+
teamMembership(id: $id) {
|
|
76
|
+
id
|
|
77
|
+
organizer
|
|
78
|
+
member
|
|
79
|
+
canEditCleanups
|
|
80
|
+
canManageParticipants
|
|
81
|
+
canSubmitProof
|
|
82
|
+
addedAt
|
|
83
|
+
lastUpdatedAt
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
`;
|
|
87
|
+
/**
|
|
88
|
+
* Query multiple team memberships with filters, ordering, and pagination
|
|
89
|
+
*/
|
|
90
|
+
export const GET_TEAM_MEMBERSHIPS_QUERY = `
|
|
91
|
+
query GetTeamMemberships(
|
|
92
|
+
$first: Int
|
|
93
|
+
$skip: Int
|
|
94
|
+
$where: TeamMembership_filter
|
|
95
|
+
$orderBy: TeamMembership_orderBy
|
|
96
|
+
$orderDirection: OrderDirection
|
|
97
|
+
) {
|
|
98
|
+
teamMemberships(
|
|
99
|
+
first: $first
|
|
100
|
+
skip: $skip
|
|
101
|
+
where: $where
|
|
102
|
+
orderBy: $orderBy
|
|
103
|
+
orderDirection: $orderDirection
|
|
104
|
+
) {
|
|
105
|
+
id
|
|
106
|
+
organizer
|
|
107
|
+
member
|
|
108
|
+
canEditCleanups
|
|
109
|
+
canManageParticipants
|
|
110
|
+
canSubmitProof
|
|
111
|
+
addedAt
|
|
112
|
+
lastUpdatedAt
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
`;
|
|
116
|
+
// ============================================================================
|
|
117
|
+
// Cleanup Queries
|
|
118
|
+
// ============================================================================
|
|
119
|
+
/**
|
|
120
|
+
* Query a single cleanup by ID
|
|
121
|
+
*/
|
|
122
|
+
export const GET_CLEANUP_QUERY = `
|
|
123
|
+
query GetCleanup($id: String!) {
|
|
124
|
+
cleanup(id: $id) {
|
|
125
|
+
id
|
|
126
|
+
organizer
|
|
127
|
+
metadata
|
|
128
|
+
category
|
|
129
|
+
date
|
|
130
|
+
startTime
|
|
131
|
+
endTime
|
|
132
|
+
maxParticipants
|
|
133
|
+
status
|
|
134
|
+
published
|
|
135
|
+
publishedAt
|
|
136
|
+
unpublishedAt
|
|
137
|
+
createdAt
|
|
138
|
+
updatedAt
|
|
139
|
+
location
|
|
140
|
+
city
|
|
141
|
+
country
|
|
142
|
+
latitude
|
|
143
|
+
longitude
|
|
144
|
+
rewardAmount
|
|
145
|
+
rewardsDistributed
|
|
146
|
+
rewardsTotalAmount
|
|
147
|
+
rewardsParticipantCount
|
|
148
|
+
rewardsDistributedAt
|
|
149
|
+
proofOfWorkSubmitted
|
|
150
|
+
proofOfWorkSubmittedAt
|
|
151
|
+
participants {
|
|
152
|
+
id
|
|
153
|
+
participant
|
|
154
|
+
user {
|
|
155
|
+
id
|
|
156
|
+
metadata
|
|
157
|
+
email
|
|
158
|
+
emailVerified
|
|
159
|
+
kycStatus
|
|
160
|
+
isOrganizer
|
|
161
|
+
}
|
|
162
|
+
appliedAt
|
|
163
|
+
status
|
|
164
|
+
acceptedAt
|
|
165
|
+
rejectedAt
|
|
166
|
+
rewardEarned
|
|
167
|
+
rewardEarnedAt
|
|
168
|
+
}
|
|
169
|
+
updates {
|
|
170
|
+
id
|
|
171
|
+
organizer
|
|
172
|
+
metadata
|
|
173
|
+
link
|
|
174
|
+
addedAt
|
|
175
|
+
blockNumber
|
|
176
|
+
transactionHash
|
|
177
|
+
}
|
|
178
|
+
proofOfWork {
|
|
179
|
+
id
|
|
180
|
+
ipfsHashes
|
|
181
|
+
mimetypes
|
|
182
|
+
submittedAt
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
`;
|
|
187
|
+
/**
|
|
188
|
+
* Query multiple cleanups with filters, ordering, and pagination
|
|
189
|
+
*/
|
|
190
|
+
export const GET_CLEANUPS_QUERY = `
|
|
191
|
+
query GetCleanups(
|
|
192
|
+
$first: Int
|
|
193
|
+
$skip: Int
|
|
194
|
+
$where: Cleanup_filter
|
|
195
|
+
$orderBy: Cleanup_orderBy
|
|
196
|
+
$orderDirection: OrderDirection
|
|
197
|
+
) {
|
|
198
|
+
cleanups(
|
|
199
|
+
first: $first
|
|
200
|
+
skip: $skip
|
|
201
|
+
where: $where
|
|
202
|
+
orderBy: $orderBy
|
|
203
|
+
orderDirection: $orderDirection
|
|
204
|
+
) {
|
|
205
|
+
id
|
|
206
|
+
organizer
|
|
207
|
+
metadata
|
|
208
|
+
category
|
|
209
|
+
date
|
|
210
|
+
startTime
|
|
211
|
+
endTime
|
|
212
|
+
maxParticipants
|
|
213
|
+
status
|
|
214
|
+
published
|
|
215
|
+
publishedAt
|
|
216
|
+
unpublishedAt
|
|
217
|
+
createdAt
|
|
218
|
+
updatedAt
|
|
219
|
+
location
|
|
220
|
+
city
|
|
221
|
+
country
|
|
222
|
+
latitude
|
|
223
|
+
longitude
|
|
224
|
+
rewardAmount
|
|
225
|
+
rewardsDistributed
|
|
226
|
+
rewardsTotalAmount
|
|
227
|
+
rewardsParticipantCount
|
|
228
|
+
rewardsDistributedAt
|
|
229
|
+
proofOfWorkSubmitted
|
|
230
|
+
proofOfWorkSubmittedAt
|
|
231
|
+
participants {
|
|
232
|
+
id
|
|
233
|
+
participant
|
|
234
|
+
user {
|
|
235
|
+
id
|
|
236
|
+
metadata
|
|
237
|
+
email
|
|
238
|
+
emailVerified
|
|
239
|
+
kycStatus
|
|
240
|
+
isOrganizer
|
|
241
|
+
}
|
|
242
|
+
appliedAt
|
|
243
|
+
status
|
|
244
|
+
acceptedAt
|
|
245
|
+
rejectedAt
|
|
246
|
+
rewardEarned
|
|
247
|
+
rewardEarnedAt
|
|
248
|
+
}
|
|
249
|
+
updates {
|
|
250
|
+
id
|
|
251
|
+
organizer
|
|
252
|
+
metadata
|
|
253
|
+
link
|
|
254
|
+
addedAt
|
|
255
|
+
blockNumber
|
|
256
|
+
transactionHash
|
|
257
|
+
}
|
|
258
|
+
proofOfWork {
|
|
259
|
+
id
|
|
260
|
+
ipfsHashes
|
|
261
|
+
mimetypes
|
|
262
|
+
submittedAt
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
`;
|
|
267
|
+
// ============================================================================
|
|
268
|
+
// ProofOfWork Queries
|
|
269
|
+
// ============================================================================
|
|
270
|
+
/**
|
|
271
|
+
* Query a single proof of work by ID
|
|
272
|
+
*/
|
|
273
|
+
export const GET_PROOF_OF_WORK_QUERY = `
|
|
274
|
+
query GetProofOfWork($id: ID!) {
|
|
275
|
+
proofOfWork(id: $id) {
|
|
276
|
+
id
|
|
277
|
+
cleanup {
|
|
278
|
+
id
|
|
279
|
+
organizer
|
|
280
|
+
metadata
|
|
281
|
+
category
|
|
282
|
+
date
|
|
283
|
+
status
|
|
284
|
+
published
|
|
285
|
+
}
|
|
286
|
+
ipfsHashes
|
|
287
|
+
mimetypes
|
|
288
|
+
submittedAt
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
`;
|
|
292
|
+
/**
|
|
293
|
+
* Query multiple proofs of work with filters, ordering, and pagination
|
|
294
|
+
*/
|
|
295
|
+
export const GET_PROOFS_OF_WORK_QUERY = `
|
|
296
|
+
query GetProofsOfWork(
|
|
297
|
+
$first: Int
|
|
298
|
+
$skip: Int
|
|
299
|
+
$where: ProofOfWork_filter
|
|
300
|
+
$orderBy: ProofOfWork_orderBy
|
|
301
|
+
$orderDirection: OrderDirection
|
|
302
|
+
) {
|
|
303
|
+
proofsOfWork(
|
|
304
|
+
first: $first
|
|
305
|
+
skip: $skip
|
|
306
|
+
where: $where
|
|
307
|
+
orderBy: $orderBy
|
|
308
|
+
orderDirection: $orderDirection
|
|
309
|
+
) {
|
|
310
|
+
id
|
|
311
|
+
cleanup {
|
|
312
|
+
id
|
|
313
|
+
organizer
|
|
314
|
+
metadata
|
|
315
|
+
category
|
|
316
|
+
date
|
|
317
|
+
status
|
|
318
|
+
published
|
|
319
|
+
}
|
|
320
|
+
ipfsHashes
|
|
321
|
+
mimetypes
|
|
322
|
+
submittedAt
|
|
323
|
+
}
|
|
324
|
+
}
|
|
325
|
+
`;
|
|
326
|
+
// ============================================================================
|
|
327
|
+
// CleanupUpdate Queries
|
|
328
|
+
// ============================================================================
|
|
329
|
+
/**
|
|
330
|
+
* Query a single cleanup update by ID
|
|
331
|
+
*/
|
|
332
|
+
export const GET_CLEANUP_UPDATE_QUERY = `
|
|
333
|
+
query GetCleanupUpdate($id: ID!) {
|
|
334
|
+
cleanupUpdate(id: $id) {
|
|
335
|
+
id
|
|
336
|
+
cleanup {
|
|
337
|
+
id
|
|
338
|
+
organizer
|
|
339
|
+
metadata
|
|
340
|
+
category
|
|
341
|
+
date
|
|
342
|
+
status
|
|
343
|
+
published
|
|
344
|
+
}
|
|
345
|
+
organizer
|
|
346
|
+
metadata
|
|
347
|
+
link
|
|
348
|
+
addedAt
|
|
349
|
+
blockNumber
|
|
350
|
+
transactionHash
|
|
351
|
+
}
|
|
352
|
+
}
|
|
353
|
+
`;
|
|
354
|
+
/**
|
|
355
|
+
* Query multiple cleanup updates with filters, ordering, and pagination
|
|
356
|
+
*/
|
|
357
|
+
export const GET_CLEANUP_UPDATES_QUERY = `
|
|
358
|
+
query GetCleanupUpdates(
|
|
359
|
+
$first: Int
|
|
360
|
+
$skip: Int
|
|
361
|
+
$where: CleanupUpdate_filter
|
|
362
|
+
$orderBy: CleanupUpdate_orderBy
|
|
363
|
+
$orderDirection: OrderDirection
|
|
364
|
+
) {
|
|
365
|
+
cleanupUpdates(
|
|
366
|
+
first: $first
|
|
367
|
+
skip: $skip
|
|
368
|
+
where: $where
|
|
369
|
+
orderBy: $orderBy
|
|
370
|
+
orderDirection: $orderDirection
|
|
371
|
+
) {
|
|
372
|
+
id
|
|
373
|
+
cleanup {
|
|
374
|
+
id
|
|
375
|
+
organizer
|
|
376
|
+
metadata
|
|
377
|
+
category
|
|
378
|
+
date
|
|
379
|
+
status
|
|
380
|
+
published
|
|
381
|
+
}
|
|
382
|
+
organizer
|
|
383
|
+
metadata
|
|
384
|
+
link
|
|
385
|
+
addedAt
|
|
386
|
+
blockNumber
|
|
387
|
+
transactionHash
|
|
388
|
+
}
|
|
389
|
+
}
|
|
390
|
+
`;
|
|
391
|
+
// ============================================================================
|
|
392
|
+
// CleanupParticipant Queries
|
|
393
|
+
// ============================================================================
|
|
394
|
+
/**
|
|
395
|
+
* Query a single cleanup participant by ID
|
|
396
|
+
*/
|
|
397
|
+
export const GET_CLEANUP_PARTICIPANT_QUERY = `
|
|
398
|
+
query GetCleanupParticipant($id: ID!) {
|
|
399
|
+
cleanupParticipant(id: $id) {
|
|
400
|
+
id
|
|
401
|
+
cleanup {
|
|
402
|
+
id
|
|
403
|
+
organizer
|
|
404
|
+
metadata
|
|
405
|
+
category
|
|
406
|
+
date
|
|
407
|
+
status
|
|
408
|
+
published
|
|
409
|
+
}
|
|
410
|
+
participant
|
|
411
|
+
user {
|
|
412
|
+
id
|
|
413
|
+
metadata
|
|
414
|
+
email
|
|
415
|
+
emailVerified
|
|
416
|
+
kycStatus
|
|
417
|
+
isOrganizer
|
|
418
|
+
totalRewardsEarned
|
|
419
|
+
totalRewardsClaimed
|
|
420
|
+
pendingRewards
|
|
421
|
+
}
|
|
422
|
+
appliedAt
|
|
423
|
+
status
|
|
424
|
+
acceptedAt
|
|
425
|
+
rejectedAt
|
|
426
|
+
rewardEarned
|
|
427
|
+
rewardEarnedAt
|
|
428
|
+
}
|
|
429
|
+
}
|
|
430
|
+
`;
|
|
431
|
+
/**
|
|
432
|
+
* Query multiple cleanup participants with filters, ordering, and pagination
|
|
433
|
+
*/
|
|
434
|
+
export const GET_CLEANUP_PARTICIPANTS_QUERY = `
|
|
435
|
+
query GetCleanupParticipants(
|
|
436
|
+
$first: Int
|
|
437
|
+
$skip: Int
|
|
438
|
+
$where: CleanupParticipant_filter
|
|
439
|
+
$orderBy: CleanupParticipant_orderBy
|
|
440
|
+
$orderDirection: OrderDirection
|
|
441
|
+
) {
|
|
442
|
+
cleanupParticipants(
|
|
443
|
+
first: $first
|
|
444
|
+
skip: $skip
|
|
445
|
+
where: $where
|
|
446
|
+
orderBy: $orderBy
|
|
447
|
+
orderDirection: $orderDirection
|
|
448
|
+
) {
|
|
449
|
+
id
|
|
450
|
+
cleanup {
|
|
451
|
+
id
|
|
452
|
+
organizer
|
|
453
|
+
metadata
|
|
454
|
+
category
|
|
455
|
+
date
|
|
456
|
+
status
|
|
457
|
+
published
|
|
458
|
+
}
|
|
459
|
+
participant
|
|
460
|
+
user {
|
|
461
|
+
id
|
|
462
|
+
metadata
|
|
463
|
+
email
|
|
464
|
+
emailVerified
|
|
465
|
+
kycStatus
|
|
466
|
+
isOrganizer
|
|
467
|
+
totalRewardsEarned
|
|
468
|
+
totalRewardsClaimed
|
|
469
|
+
pendingRewards
|
|
470
|
+
}
|
|
471
|
+
appliedAt
|
|
472
|
+
status
|
|
473
|
+
acceptedAt
|
|
474
|
+
rejectedAt
|
|
475
|
+
rewardEarned
|
|
476
|
+
rewardEarnedAt
|
|
477
|
+
}
|
|
478
|
+
}
|
|
479
|
+
`;
|
|
480
|
+
// ============================================================================
|
|
481
|
+
// Transaction Queries
|
|
482
|
+
// ============================================================================
|
|
483
|
+
/**
|
|
484
|
+
* Query a single transaction by ID
|
|
485
|
+
*/
|
|
486
|
+
export const GET_TRANSACTION_QUERY = `
|
|
487
|
+
query GetTransaction($id: ID!) {
|
|
488
|
+
transaction(id: $id) {
|
|
489
|
+
id
|
|
490
|
+
user
|
|
491
|
+
cleanupId
|
|
492
|
+
streakSubmissionId
|
|
493
|
+
amount
|
|
494
|
+
transactionType
|
|
495
|
+
rewardType
|
|
496
|
+
timestamp
|
|
497
|
+
blockNumber
|
|
498
|
+
transactionHash
|
|
499
|
+
}
|
|
500
|
+
}
|
|
501
|
+
`;
|
|
502
|
+
/**
|
|
503
|
+
* Query multiple transactions with filters, ordering, and pagination
|
|
504
|
+
*/
|
|
505
|
+
export const GET_TRANSACTIONS_QUERY = `
|
|
506
|
+
query GetTransactions(
|
|
507
|
+
$first: Int
|
|
508
|
+
$skip: Int
|
|
509
|
+
$where: Transaction_filter
|
|
510
|
+
$orderBy: Transaction_orderBy
|
|
511
|
+
$orderDirection: OrderDirection
|
|
512
|
+
) {
|
|
513
|
+
transactions(
|
|
514
|
+
first: $first
|
|
515
|
+
skip: $skip
|
|
516
|
+
where: $where
|
|
517
|
+
orderBy: $orderBy
|
|
518
|
+
orderDirection: $orderDirection
|
|
519
|
+
) {
|
|
520
|
+
id
|
|
521
|
+
user
|
|
522
|
+
cleanupId
|
|
523
|
+
streakSubmissionId
|
|
524
|
+
amount
|
|
525
|
+
transactionType
|
|
526
|
+
rewardType
|
|
527
|
+
timestamp
|
|
528
|
+
blockNumber
|
|
529
|
+
transactionHash
|
|
530
|
+
}
|
|
531
|
+
}
|
|
532
|
+
`;
|
|
533
|
+
// ============================================================================
|
|
534
|
+
// Notification Queries
|
|
535
|
+
// ============================================================================
|
|
536
|
+
/**
|
|
537
|
+
* Query a single notification by ID
|
|
538
|
+
*/
|
|
539
|
+
export const GET_NOTIFICATION_QUERY = `
|
|
540
|
+
query GetNotification($id: ID!) {
|
|
541
|
+
notification(id: $id) {
|
|
542
|
+
id
|
|
543
|
+
user
|
|
544
|
+
type
|
|
545
|
+
title
|
|
546
|
+
message
|
|
547
|
+
relatedEntity
|
|
548
|
+
relatedEntityType
|
|
549
|
+
read
|
|
550
|
+
createdAt
|
|
551
|
+
blockNumber
|
|
552
|
+
transactionHash
|
|
553
|
+
}
|
|
554
|
+
}
|
|
555
|
+
`;
|
|
556
|
+
/**
|
|
557
|
+
* Query multiple notifications with filters, ordering, and pagination
|
|
558
|
+
*/
|
|
559
|
+
export const GET_NOTIFICATIONS_QUERY = `
|
|
560
|
+
query GetNotifications(
|
|
561
|
+
$first: Int
|
|
562
|
+
$skip: Int
|
|
563
|
+
$where: Notification_filter
|
|
564
|
+
$orderBy: Notification_orderBy
|
|
565
|
+
$orderDirection: OrderDirection
|
|
566
|
+
) {
|
|
567
|
+
notifications(
|
|
568
|
+
first: $first
|
|
569
|
+
skip: $skip
|
|
570
|
+
where: $where
|
|
571
|
+
orderBy: $orderBy
|
|
572
|
+
orderDirection: $orderDirection
|
|
573
|
+
) {
|
|
574
|
+
id
|
|
575
|
+
user
|
|
576
|
+
type
|
|
577
|
+
title
|
|
578
|
+
message
|
|
579
|
+
relatedEntity
|
|
580
|
+
relatedEntityType
|
|
581
|
+
read
|
|
582
|
+
createdAt
|
|
583
|
+
blockNumber
|
|
584
|
+
transactionHash
|
|
585
|
+
}
|
|
586
|
+
}
|
|
587
|
+
`;
|
|
588
|
+
// ============================================================================
|
|
589
|
+
// AddressUpdated Queries
|
|
590
|
+
// ============================================================================
|
|
591
|
+
/**
|
|
592
|
+
* Query a single address updated event by ID
|
|
593
|
+
*/
|
|
594
|
+
export const GET_ADDRESS_UPDATED_QUERY = `
|
|
595
|
+
query GetAddressUpdated($id: ID!) {
|
|
596
|
+
addressUpdated(id: $id) {
|
|
597
|
+
id
|
|
598
|
+
key
|
|
599
|
+
oldAddress
|
|
600
|
+
newAddress
|
|
601
|
+
blockNumber
|
|
602
|
+
blockTimestamp
|
|
603
|
+
transactionHash
|
|
604
|
+
}
|
|
605
|
+
}
|
|
606
|
+
`;
|
|
607
|
+
/**
|
|
608
|
+
* Query multiple address updated events with filters, ordering, and pagination
|
|
609
|
+
*/
|
|
610
|
+
export const GET_ADDRESS_UPDATEDS_QUERY = `
|
|
611
|
+
query GetAddressUpdateds(
|
|
612
|
+
$first: Int
|
|
613
|
+
$skip: Int
|
|
614
|
+
$where: AddressUpdated_filter
|
|
615
|
+
$orderBy: AddressUpdated_orderBy
|
|
616
|
+
$orderDirection: OrderDirection
|
|
617
|
+
) {
|
|
618
|
+
addressUpdateds(
|
|
619
|
+
first: $first
|
|
620
|
+
skip: $skip
|
|
621
|
+
where: $where
|
|
622
|
+
orderBy: $orderBy
|
|
623
|
+
orderDirection: $orderDirection
|
|
624
|
+
) {
|
|
625
|
+
id
|
|
626
|
+
key
|
|
627
|
+
oldAddress
|
|
628
|
+
newAddress
|
|
629
|
+
blockNumber
|
|
630
|
+
blockTimestamp
|
|
631
|
+
transactionHash
|
|
632
|
+
}
|
|
633
|
+
}
|
|
634
|
+
`;
|
|
635
|
+
// ============================================================================
|
|
636
|
+
// AppIdUpdated Queries
|
|
637
|
+
// ============================================================================
|
|
638
|
+
/**
|
|
639
|
+
* Query a single app ID updated event by ID
|
|
640
|
+
*/
|
|
641
|
+
export const GET_APP_ID_UPDATED_QUERY = `
|
|
642
|
+
query GetAppIdUpdated($id: ID!) {
|
|
643
|
+
appIdUpdated(id: $id) {
|
|
644
|
+
id
|
|
645
|
+
oldAppId
|
|
646
|
+
newAppId
|
|
647
|
+
blockNumber
|
|
648
|
+
blockTimestamp
|
|
649
|
+
transactionHash
|
|
650
|
+
}
|
|
651
|
+
}
|
|
652
|
+
`;
|
|
653
|
+
/**
|
|
654
|
+
* Query multiple app ID updated events with filters, ordering, and pagination
|
|
655
|
+
*/
|
|
656
|
+
export const GET_APP_ID_UPDATEDS_QUERY = `
|
|
657
|
+
query GetAppIdUpdateds(
|
|
658
|
+
$first: Int
|
|
659
|
+
$skip: Int
|
|
660
|
+
$where: AppIdUpdated_filter
|
|
661
|
+
$orderBy: AppIdUpdated_orderBy
|
|
662
|
+
$orderDirection: OrderDirection
|
|
663
|
+
) {
|
|
664
|
+
appIdUpdateds(
|
|
665
|
+
first: $first
|
|
666
|
+
skip: $skip
|
|
667
|
+
where: $where
|
|
668
|
+
orderBy: $orderBy
|
|
669
|
+
orderDirection: $orderDirection
|
|
670
|
+
) {
|
|
671
|
+
id
|
|
672
|
+
oldAppId
|
|
673
|
+
newAppId
|
|
674
|
+
blockNumber
|
|
675
|
+
blockTimestamp
|
|
676
|
+
transactionHash
|
|
677
|
+
}
|
|
678
|
+
}
|
|
679
|
+
`;
|
|
680
|
+
// ============================================================================
|
|
681
|
+
// RewardsPoolUpdated Queries
|
|
682
|
+
// ============================================================================
|
|
683
|
+
/**
|
|
684
|
+
* Query a single rewards pool updated event by ID
|
|
685
|
+
*/
|
|
686
|
+
export const GET_REWARDS_POOL_UPDATED_QUERY = `
|
|
687
|
+
query GetRewardsPoolUpdated($id: ID!) {
|
|
688
|
+
rewardsPoolUpdated(id: $id) {
|
|
689
|
+
id
|
|
690
|
+
oldPool
|
|
691
|
+
newPool
|
|
692
|
+
blockNumber
|
|
693
|
+
blockTimestamp
|
|
694
|
+
transactionHash
|
|
695
|
+
}
|
|
696
|
+
}
|
|
697
|
+
`;
|
|
698
|
+
/**
|
|
699
|
+
* Query multiple rewards pool updated events with filters, ordering, and pagination
|
|
700
|
+
*/
|
|
701
|
+
export const GET_REWARDS_POOL_UPDATEDS_QUERY = `
|
|
702
|
+
query GetRewardsPoolUpdateds(
|
|
703
|
+
$first: Int
|
|
704
|
+
$skip: Int
|
|
705
|
+
$where: RewardsPoolUpdated_filter
|
|
706
|
+
$orderBy: RewardsPoolUpdated_orderBy
|
|
707
|
+
$orderDirection: OrderDirection
|
|
708
|
+
) {
|
|
709
|
+
rewardsPoolUpdateds(
|
|
710
|
+
first: $first
|
|
711
|
+
skip: $skip
|
|
712
|
+
where: $where
|
|
713
|
+
orderBy: $orderBy
|
|
714
|
+
orderDirection: $orderDirection
|
|
715
|
+
) {
|
|
716
|
+
id
|
|
717
|
+
oldPool
|
|
718
|
+
newPool
|
|
719
|
+
blockNumber
|
|
720
|
+
blockTimestamp
|
|
721
|
+
transactionHash
|
|
722
|
+
}
|
|
723
|
+
}
|
|
724
|
+
`;
|
|
725
|
+
// ============================================================================
|
|
726
|
+
// StreakSubmission Queries
|
|
727
|
+
// ============================================================================
|
|
728
|
+
/**
|
|
729
|
+
* Query a single streak submission by ID
|
|
730
|
+
*/
|
|
731
|
+
export const GET_STREAK_SUBMISSION_QUERY = `
|
|
732
|
+
query GetStreakSubmission($id: ID!) {
|
|
733
|
+
streakSubmission(id: $id) {
|
|
734
|
+
id
|
|
735
|
+
user
|
|
736
|
+
submissionId
|
|
737
|
+
metadata
|
|
738
|
+
status
|
|
739
|
+
submittedAt
|
|
740
|
+
reviewedAt
|
|
741
|
+
amount
|
|
742
|
+
rewardAmount
|
|
743
|
+
rejectionReason
|
|
744
|
+
ipfsHashes
|
|
745
|
+
mimetypes
|
|
746
|
+
blockNumber
|
|
747
|
+
transactionHash
|
|
748
|
+
}
|
|
749
|
+
}
|
|
750
|
+
`;
|
|
751
|
+
/**
|
|
752
|
+
* Query multiple streak submissions with filters, ordering, and pagination
|
|
753
|
+
*/
|
|
754
|
+
export const GET_STREAK_SUBMISSIONS_QUERY = `
|
|
755
|
+
query GetStreakSubmissions(
|
|
756
|
+
$first: Int
|
|
757
|
+
$skip: Int
|
|
758
|
+
$where: StreakSubmission_filter
|
|
759
|
+
$orderBy: StreakSubmission_orderBy
|
|
760
|
+
$orderDirection: OrderDirection
|
|
761
|
+
) {
|
|
762
|
+
streakSubmissions(
|
|
763
|
+
first: $first
|
|
764
|
+
skip: $skip
|
|
765
|
+
where: $where
|
|
766
|
+
orderBy: $orderBy
|
|
767
|
+
orderDirection: $orderDirection
|
|
768
|
+
) {
|
|
769
|
+
id
|
|
770
|
+
user
|
|
771
|
+
submissionId
|
|
772
|
+
metadata
|
|
773
|
+
status
|
|
774
|
+
submittedAt
|
|
775
|
+
reviewedAt
|
|
776
|
+
amount
|
|
777
|
+
rewardAmount
|
|
778
|
+
rejectionReason
|
|
779
|
+
ipfsHashes
|
|
780
|
+
mimetypes
|
|
781
|
+
blockNumber
|
|
782
|
+
transactionHash
|
|
783
|
+
}
|
|
784
|
+
}
|
|
785
|
+
`;
|
|
786
|
+
// ============================================================================
|
|
787
|
+
// UserStreakStats Queries
|
|
788
|
+
// ============================================================================
|
|
789
|
+
/**
|
|
790
|
+
* Query a single user streak stats by ID (user address)
|
|
791
|
+
*/
|
|
792
|
+
export const GET_USER_STREAK_STATS_QUERY = `
|
|
793
|
+
query GetUserStreakStats($id: Bytes!) {
|
|
794
|
+
userStreakStats(id: $id) {
|
|
795
|
+
id
|
|
796
|
+
user
|
|
797
|
+
streakerCode
|
|
798
|
+
totalSubmissions
|
|
799
|
+
approvedSubmissions
|
|
800
|
+
rejectedSubmissions
|
|
801
|
+
pendingSubmissions
|
|
802
|
+
totalAmount
|
|
803
|
+
lastSubmissionAt
|
|
804
|
+
}
|
|
805
|
+
}
|
|
806
|
+
`;
|
|
807
|
+
/**
|
|
808
|
+
* Query multiple user streak stats with filters, ordering, and pagination
|
|
809
|
+
*/
|
|
810
|
+
export const GET_USER_STREAK_STATS_LIST_QUERY = `
|
|
811
|
+
query GetUserStreakStatsList(
|
|
812
|
+
$first: Int
|
|
813
|
+
$skip: Int
|
|
814
|
+
$where: UserStreakStats_filter
|
|
815
|
+
$orderBy: UserStreakStats_orderBy
|
|
816
|
+
$orderDirection: OrderDirection
|
|
817
|
+
) {
|
|
818
|
+
userStreakStatsList(
|
|
819
|
+
first: $first
|
|
820
|
+
skip: $skip
|
|
821
|
+
where: $where
|
|
822
|
+
orderBy: $orderBy
|
|
823
|
+
orderDirection: $orderDirection
|
|
824
|
+
) {
|
|
825
|
+
id
|
|
826
|
+
user
|
|
827
|
+
streakerCode
|
|
828
|
+
totalSubmissions
|
|
829
|
+
approvedSubmissions
|
|
830
|
+
rejectedSubmissions
|
|
831
|
+
pendingSubmissions
|
|
832
|
+
totalAmount
|
|
833
|
+
lastSubmissionAt
|
|
834
|
+
}
|
|
835
|
+
}
|
|
836
|
+
`;
|
|
837
|
+
//# sourceMappingURL=queries.js.map
|