@merkl/api 0.10.361 → 0.10.377
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 +78 -14
- package/dist/database/api/.generated/edge.js +21 -6
- package/dist/database/api/.generated/index-browser.js +18 -3
- package/dist/database/api/.generated/index.d.ts +1746 -256
- package/dist/database/api/.generated/index.js +21 -6
- package/dist/database/api/.generated/package.json +1 -1
- package/dist/database/api/.generated/schema.prisma +12 -2
- package/dist/database/api/.generated/wasm.js +18 -3
- package/dist/src/eden/index.d.ts +1260 -127
- package/dist/src/entities/campaign.js +2 -1
- package/dist/src/entities/opportunity.js +169 -3
- package/dist/src/index.d.ts +432 -5
- package/dist/src/jobs/etl/pendings.js +2 -1
- package/dist/src/jobs/etl/reward-breakdowns.js +2 -1
- package/dist/src/jobs/etl/rewards.js +2 -1
- package/dist/src/libs/campaigns/campaignTypes/ERC20DynamicData.js +45 -54
- package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/helpers/tokenType.d.ts +3 -1
- package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/helpers/tokenType.js +4 -0
- package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/processor/ERC4626Processor.d.ts +34 -0
- package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/processor/ERC4626Processor.js +36 -0
- package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/processor/processorMapping.js +3 -0
- package/dist/src/libs/campaigns/campaignTypes/ERC20SubTypes/subtypesRound1.js +4 -1
- package/dist/src/libs/campaigns/campaignTypes/HyperdriveDynamicData.d.ts +5 -0
- package/dist/src/libs/campaigns/campaignTypes/HyperdriveDynamicData.js +76 -0
- package/dist/src/libs/campaigns/campaignsDynamicData.js +8 -0
- package/dist/src/modules/v4/campaign/campaign.controller.d.ts +2 -0
- package/dist/src/modules/v4/campaign/campaign.model.d.ts +1 -0
- package/dist/src/modules/v4/campaign/campaign.model.js +1 -0
- package/dist/src/modules/v4/campaign/campaign.repository.d.ts +63 -1
- package/dist/src/modules/v4/campaign/campaign.repository.js +15 -10
- package/dist/src/modules/v4/computedValue/computedValue.controller.d.ts +8 -5
- package/dist/src/modules/v4/computedValue/computedValue.controller.js +8 -6
- package/dist/src/modules/v4/computedValue/computedValue.model.js +12 -4
- package/dist/src/modules/v4/computedValue/computedValue.repository.d.ts +8 -5
- package/dist/src/modules/v4/computedValue/computedValue.repository.js +7 -3
- package/dist/src/modules/v4/computedValue/computedValue.service.d.ts +7 -4
- package/dist/src/modules/v4/computedValue/computedValue.service.js +10 -0
- package/dist/src/modules/v4/creator/creator.controller.d.ts +118 -0
- package/dist/src/modules/v4/creator/creator.controller.js +30 -0
- package/dist/src/modules/v4/creator/creator.model.d.ts +29 -0
- package/dist/src/modules/v4/creator/creator.model.js +18 -0
- package/dist/src/modules/v4/creator/creator.repository.d.ts +40 -0
- package/dist/src/modules/v4/creator/creator.repository.js +63 -0
- package/dist/src/modules/v4/creator/creator.service.d.ts +61 -0
- package/dist/src/modules/v4/creator/creator.service.js +44 -0
- package/dist/src/modules/v4/creator/index.d.ts +3 -0
- package/dist/src/modules/v4/creator/index.js +3 -0
- package/dist/src/modules/v4/dynamicData/dynamicData.controller.d.ts +3 -4
- package/dist/src/modules/v4/dynamicData/dynamicData.controller.js +1 -1
- package/dist/src/modules/v4/dynamicData/dynamicData.model.d.ts +1 -0
- package/dist/src/modules/v4/dynamicData/dynamicData.model.js +1 -0
- package/dist/src/modules/v4/dynamicData/dynamicData.service.d.ts +6 -3
- package/dist/src/modules/v4/dynamicData/dynamicData.service.js +50 -9
- package/dist/src/modules/v4/opportunity/opportunity.controller.d.ts +171 -1
- package/dist/src/modules/v4/opportunity/opportunity.controller.js +14 -0
- package/dist/src/modules/v4/opportunity/opportunity.model.d.ts +0 -1
- package/dist/src/modules/v4/opportunity/opportunity.repository.d.ts +185 -0
- package/dist/src/modules/v4/opportunity/opportunity.repository.js +41 -0
- package/dist/src/modules/v4/opportunity/opportunity.service.d.ts +151 -1
- package/dist/src/modules/v4/opportunity/opportunity.service.js +45 -2
- package/dist/src/modules/v4/opportunity/subservices/getHyperdriveMetadata.service.d.ts +1 -1
- package/dist/src/modules/v4/opportunity/subservices/getHyperdriveMetadata.service.js +2 -2
- package/dist/src/modules/v4/programPayload/programPayload.controller.d.ts +30 -0
- package/dist/src/modules/v4/programPayload/programPayload.controller.js +12 -1
- package/dist/src/modules/v4/programPayload/programPayload.model.d.ts +21 -1
- package/dist/src/modules/v4/programPayload/programPayload.model.js +12 -0
- package/dist/src/modules/v4/programPayload/programPayload.repository.d.ts +3 -2
- package/dist/src/modules/v4/programPayload/programPayload.repository.js +28 -2
- package/dist/src/modules/v4/programPayload/programPayload.service.d.ts +2 -1
- package/dist/src/modules/v4/programPayload/programPayload.service.js +42 -2
- package/dist/src/modules/v4/protocol/protocol.controller.d.ts +1 -0
- package/dist/src/modules/v4/protocol/protocol.model.d.ts +1 -0
- package/dist/src/modules/v4/protocol/protocol.model.js +1 -0
- package/dist/src/modules/v4/reward/reward.repository.d.ts +2 -1
- package/dist/src/modules/v4/reward/reward.repository.js +12 -1
- package/dist/src/modules/v4/reward/reward.service.js +5 -2
- package/dist/src/modules/v4/router.d.ts +432 -5
- package/dist/src/modules/v4/router.js +5 -1
- package/dist/src/modules/v4/user/user.controller.d.ts +28 -0
- package/dist/src/modules/v4/user/user.controller.js +5 -0
- package/dist/src/modules/v4/user/user.repository.d.ts +5 -0
- package/dist/src/modules/v4/user/user.service.d.ts +5 -0
- package/dist/src/utils/decodeCalls.js +7 -1
- package/dist/src/utils/encodeCalls.js +19 -1
- package/dist/src/utils/generateCardName.js +3 -0
- package/dist/tsconfig.package.tsbuildinfo +1 -1
- package/package.json +6 -2
- package/dist/src/jobs/breakdowns.d.ts +0 -1
- package/dist/src/jobs/breakdowns.js +0 -55
- package/dist/src/jobs/rewards.d.ts +0 -1
- package/dist/src/jobs/rewards.js +0 -74
@@ -38,7 +38,7 @@ export declare const v4: Elysia<"/v4", false, {
|
|
38
38
|
status: "NONE" | "PAST" | "LIVE" | "SOON";
|
39
39
|
identifier: string;
|
40
40
|
chainId: number;
|
41
|
-
action: "INVALID" | "POOL" | "HOLD" | "DROP" | "LEND" | "BORROW" | "
|
41
|
+
action: "INVALID" | "POOL" | "HOLD" | "DROP" | "LEND" | "BORROW" | "LONG" | "SHORT";
|
42
42
|
};
|
43
43
|
params: {};
|
44
44
|
query: unknown;
|
@@ -363,6 +363,176 @@ export declare const v4: Elysia<"/v4", false, {
|
|
363
363
|
};
|
364
364
|
};
|
365
365
|
};
|
366
|
+
} & {
|
367
|
+
opportunities: {
|
368
|
+
campaigns: {
|
369
|
+
get: {
|
370
|
+
body: unknown;
|
371
|
+
params: {};
|
372
|
+
query: {
|
373
|
+
type?: "INVALID" | "ERC20" | "CLAMM" | "ERC20_SNAPSHOT" | "JSON_AIRDROP" | "SILO" | "RADIANT" | "MORPHO" | "DOLOMITE" | "BADGER" | "COMPOUND" | "AJNA" | "EULER" | "UNISWAP_V4" | "ION" | "EIGENLAYER" | "ERC20TRANSFERS" | "ERC20LOGPROCESSOR" | "ERC20REBASELOGPROCESSOR" | "VEST" | "ERC20_FIX_APR" | "HYPERDRIVELOGPROCESSOR" | "HYPERDRIVELOGFIXPROCESSOR" | undefined;
|
374
|
+
items?: number | undefined;
|
375
|
+
subType?: number | undefined;
|
376
|
+
page?: number | undefined;
|
377
|
+
chainId?: number | undefined;
|
378
|
+
startTimestamp?: string | undefined;
|
379
|
+
endTimestamp?: string | undefined;
|
380
|
+
tokenAddress?: string | undefined;
|
381
|
+
mainParameter?: string | undefined;
|
382
|
+
campaignId?: string | undefined;
|
383
|
+
opportunityId?: string | undefined;
|
384
|
+
creatorId?: string | undefined;
|
385
|
+
test?: boolean | undefined;
|
386
|
+
creatorTag?: string | undefined;
|
387
|
+
tokenSymbol?: string | undefined;
|
388
|
+
};
|
389
|
+
headers: unknown;
|
390
|
+
response: {
|
391
|
+
200: ({
|
392
|
+
protocol?: {
|
393
|
+
name: string;
|
394
|
+
url: string;
|
395
|
+
description: string;
|
396
|
+
id: string;
|
397
|
+
tags: string[];
|
398
|
+
icon: string;
|
399
|
+
} | null | undefined;
|
400
|
+
depositUrl?: string | undefined;
|
401
|
+
aprRecord?: {
|
402
|
+
timestamp: string | bigint;
|
403
|
+
cumulated: number;
|
404
|
+
breakdowns: {
|
405
|
+
type: "CAMPAIGN" | "TOKEN" | "PROTOCOL";
|
406
|
+
id: number;
|
407
|
+
identifier: string;
|
408
|
+
value: number;
|
409
|
+
aprRecordId: string;
|
410
|
+
}[];
|
411
|
+
} | undefined;
|
412
|
+
tvlRecord?: {
|
413
|
+
total: number;
|
414
|
+
timestamp: string | bigint;
|
415
|
+
breakdowns: {
|
416
|
+
type: "TOKEN" | "PROTOCOL";
|
417
|
+
id: number;
|
418
|
+
identifier: string;
|
419
|
+
value: number;
|
420
|
+
tvlRecordId: string;
|
421
|
+
}[];
|
422
|
+
} | undefined;
|
423
|
+
rewardsRecord?: {
|
424
|
+
total: number;
|
425
|
+
id: string;
|
426
|
+
timestamp: string | bigint;
|
427
|
+
breakdowns: {
|
428
|
+
token: {
|
429
|
+
price?: number | null | undefined;
|
430
|
+
symbol: string;
|
431
|
+
name: string | null;
|
432
|
+
id: string;
|
433
|
+
icon: string;
|
434
|
+
chainId: number;
|
435
|
+
address: string;
|
436
|
+
decimals: number;
|
437
|
+
verified: boolean;
|
438
|
+
isTest: boolean;
|
439
|
+
};
|
440
|
+
id: number;
|
441
|
+
value: number;
|
442
|
+
campaignId: string;
|
443
|
+
amount: string | bigint;
|
444
|
+
dailyRewardsRecordId: string;
|
445
|
+
}[];
|
446
|
+
} | undefined;
|
447
|
+
name: string;
|
448
|
+
type: string;
|
449
|
+
tokens: {
|
450
|
+
price?: number | null | undefined;
|
451
|
+
symbol: string;
|
452
|
+
name: string | null;
|
453
|
+
id: string;
|
454
|
+
icon: string;
|
455
|
+
chainId: number;
|
456
|
+
address: string;
|
457
|
+
decimals: number;
|
458
|
+
verified: boolean;
|
459
|
+
isTest: boolean;
|
460
|
+
}[];
|
461
|
+
id: string;
|
462
|
+
status: string;
|
463
|
+
tags: string[];
|
464
|
+
identifier: string;
|
465
|
+
chain: {
|
466
|
+
name: string;
|
467
|
+
id: number;
|
468
|
+
icon: string;
|
469
|
+
};
|
470
|
+
chainId: number;
|
471
|
+
action: string;
|
472
|
+
tvl: number;
|
473
|
+
apr: number;
|
474
|
+
dailyRewards: number;
|
475
|
+
} & {
|
476
|
+
campaigns: {
|
477
|
+
params: any;
|
478
|
+
chain: {
|
479
|
+
name: string;
|
480
|
+
id: number;
|
481
|
+
icon: string;
|
482
|
+
};
|
483
|
+
rewardToken: {
|
484
|
+
symbol: string;
|
485
|
+
name: string | null;
|
486
|
+
id: string;
|
487
|
+
icon: string;
|
488
|
+
chainId: number;
|
489
|
+
address: string;
|
490
|
+
decimals: number;
|
491
|
+
verified: boolean;
|
492
|
+
isTest: boolean;
|
493
|
+
} & {
|
494
|
+
price?: number | null | undefined;
|
495
|
+
};
|
496
|
+
distributionChain: {
|
497
|
+
name: string;
|
498
|
+
id: number;
|
499
|
+
icon: string;
|
500
|
+
} | undefined;
|
501
|
+
campaignStatus: {
|
502
|
+
error: string;
|
503
|
+
details: import("database/api/.generated/runtime/library").JsonValue;
|
504
|
+
status: import("../../../database/api/.generated").$Enums.RunStatus;
|
505
|
+
campaignId: string;
|
506
|
+
computedUntil: bigint;
|
507
|
+
processingStarted: bigint;
|
508
|
+
};
|
509
|
+
type: import("../../../database/api/.generated").$Enums.CampaignType;
|
510
|
+
id: string;
|
511
|
+
subType: number | null;
|
512
|
+
startTimestamp: bigint;
|
513
|
+
endTimestamp: bigint;
|
514
|
+
computeChainId: number;
|
515
|
+
distributionChainId: number;
|
516
|
+
campaignId: string;
|
517
|
+
rewardTokenId: string;
|
518
|
+
amount: string;
|
519
|
+
opportunityId: string;
|
520
|
+
creatorAddress: string;
|
521
|
+
}[];
|
522
|
+
})[];
|
523
|
+
readonly 404: {
|
524
|
+
message: string;
|
525
|
+
name: string;
|
526
|
+
};
|
527
|
+
readonly 500: {
|
528
|
+
code: string;
|
529
|
+
info: string;
|
530
|
+
httpCode: number;
|
531
|
+
};
|
532
|
+
};
|
533
|
+
};
|
534
|
+
};
|
535
|
+
};
|
366
536
|
} & {
|
367
537
|
opportunities: {
|
368
538
|
":id": {
|
@@ -779,6 +949,7 @@ export declare const v4: Elysia<"/v4", false, {
|
|
779
949
|
mainParameter?: string | undefined;
|
780
950
|
campaignId?: string | undefined;
|
781
951
|
opportunityId?: string | undefined;
|
952
|
+
creatorId?: string | undefined;
|
782
953
|
test?: boolean | undefined;
|
783
954
|
creatorTag?: string | undefined;
|
784
955
|
tokenSymbol?: string | undefined;
|
@@ -851,6 +1022,7 @@ export declare const v4: Elysia<"/v4", false, {
|
|
851
1022
|
mainParameter?: string | undefined;
|
852
1023
|
campaignId?: string | undefined;
|
853
1024
|
opportunityId?: string | undefined;
|
1025
|
+
creatorId?: string | undefined;
|
854
1026
|
test?: boolean | undefined;
|
855
1027
|
creatorTag?: string | undefined;
|
856
1028
|
tokenSymbol?: string | undefined;
|
@@ -990,6 +1162,7 @@ export declare const v4: Elysia<"/v4", false, {
|
|
990
1162
|
":id": {
|
991
1163
|
patch: {
|
992
1164
|
body: {
|
1165
|
+
name?: string | undefined;
|
993
1166
|
url?: string | undefined;
|
994
1167
|
description?: string | undefined;
|
995
1168
|
icon?: string | undefined;
|
@@ -1978,6 +2151,7 @@ export declare const v4: Elysia<"/v4", false, {
|
|
1978
2151
|
200: {
|
1979
2152
|
tags: string[];
|
1980
2153
|
address: string;
|
2154
|
+
creatorId: string | null;
|
1981
2155
|
}[];
|
1982
2156
|
};
|
1983
2157
|
};
|
@@ -1997,6 +2171,7 @@ export declare const v4: Elysia<"/v4", false, {
|
|
1997
2171
|
200: {
|
1998
2172
|
tags: string[];
|
1999
2173
|
address: string;
|
2174
|
+
creatorId: string | null;
|
2000
2175
|
}[];
|
2001
2176
|
};
|
2002
2177
|
};
|
@@ -2016,11 +2191,35 @@ export declare const v4: Elysia<"/v4", false, {
|
|
2016
2191
|
200: {
|
2017
2192
|
tags: string[];
|
2018
2193
|
address: string;
|
2194
|
+
creatorId: string | null;
|
2019
2195
|
} | null;
|
2020
2196
|
};
|
2021
2197
|
};
|
2022
2198
|
};
|
2023
2199
|
};
|
2200
|
+
} & {
|
2201
|
+
users: {
|
2202
|
+
":address": {
|
2203
|
+
creator: {
|
2204
|
+
get: {
|
2205
|
+
body: unknown;
|
2206
|
+
params: {
|
2207
|
+
address: string;
|
2208
|
+
};
|
2209
|
+
query: unknown;
|
2210
|
+
headers: unknown;
|
2211
|
+
response: {
|
2212
|
+
200: {
|
2213
|
+
name: string;
|
2214
|
+
id: string;
|
2215
|
+
addresses: string[];
|
2216
|
+
icon?: string | undefined;
|
2217
|
+
} | null;
|
2218
|
+
};
|
2219
|
+
};
|
2220
|
+
};
|
2221
|
+
};
|
2222
|
+
};
|
2024
2223
|
} & {
|
2025
2224
|
users: {
|
2026
2225
|
":address": {
|
@@ -2272,6 +2471,7 @@ export declare const v4: Elysia<"/v4", false, {
|
|
2272
2471
|
200: {
|
2273
2472
|
tags: string[];
|
2274
2473
|
address: string;
|
2474
|
+
creatorId: string | null;
|
2275
2475
|
};
|
2276
2476
|
};
|
2277
2477
|
};
|
@@ -2312,6 +2512,7 @@ export declare const v4: Elysia<"/v4", false, {
|
|
2312
2512
|
200: {
|
2313
2513
|
tags: string[];
|
2314
2514
|
address: string;
|
2515
|
+
creatorId: string | null;
|
2315
2516
|
};
|
2316
2517
|
};
|
2317
2518
|
};
|
@@ -2710,8 +2911,7 @@ export declare const v4: Elysia<"/v4", false, {
|
|
2710
2911
|
authorization: string;
|
2711
2912
|
};
|
2712
2913
|
response: {
|
2713
|
-
|
2714
|
-
200: any;
|
2914
|
+
200: any[];
|
2715
2915
|
};
|
2716
2916
|
};
|
2717
2917
|
};
|
@@ -2734,6 +2934,7 @@ export declare const v4: Elysia<"/v4", false, {
|
|
2734
2934
|
mainParameter?: string | undefined;
|
2735
2935
|
campaignId?: string | undefined;
|
2736
2936
|
opportunityId?: string | undefined;
|
2937
|
+
creatorId?: string | undefined;
|
2737
2938
|
test?: boolean | undefined;
|
2738
2939
|
creatorTag?: string | undefined;
|
2739
2940
|
tokenSymbol?: string | undefined;
|
@@ -2742,8 +2943,7 @@ export declare const v4: Elysia<"/v4", false, {
|
|
2742
2943
|
authorization: string;
|
2743
2944
|
};
|
2744
2945
|
response: {
|
2745
|
-
|
2746
|
-
200: any;
|
2946
|
+
200: any[];
|
2747
2947
|
};
|
2748
2948
|
};
|
2749
2949
|
};
|
@@ -3163,6 +3363,36 @@ export declare const v4: Elysia<"/v4", false, {
|
|
3163
3363
|
};
|
3164
3364
|
};
|
3165
3365
|
};
|
3366
|
+
} & {
|
3367
|
+
"program-payload": {
|
3368
|
+
parse: {
|
3369
|
+
"from-campaign-data": {
|
3370
|
+
post: {
|
3371
|
+
body: {
|
3372
|
+
chainId: number;
|
3373
|
+
startTimestamp: number;
|
3374
|
+
endTimestamp: number;
|
3375
|
+
computeChainId: number;
|
3376
|
+
amount: string;
|
3377
|
+
rewardToken: string;
|
3378
|
+
campaignType: number;
|
3379
|
+
campaignData: string;
|
3380
|
+
symbolRewardToken: string;
|
3381
|
+
decimalsRewardToken: number;
|
3382
|
+
};
|
3383
|
+
params: {};
|
3384
|
+
query: unknown;
|
3385
|
+
headers: {
|
3386
|
+
authorization: string;
|
3387
|
+
};
|
3388
|
+
response: {
|
3389
|
+
[x: string]: any;
|
3390
|
+
200: any;
|
3391
|
+
};
|
3392
|
+
};
|
3393
|
+
};
|
3394
|
+
};
|
3395
|
+
};
|
3166
3396
|
};
|
3167
3397
|
} & {
|
3168
3398
|
v4: {
|
@@ -3205,6 +3435,203 @@ export declare const v4: Elysia<"/v4", false, {
|
|
3205
3435
|
};
|
3206
3436
|
};
|
3207
3437
|
};
|
3438
|
+
} & {
|
3439
|
+
v4: {
|
3440
|
+
value: {
|
3441
|
+
campaign: {
|
3442
|
+
":campaignId": {
|
3443
|
+
":field": {
|
3444
|
+
get: {
|
3445
|
+
body: unknown;
|
3446
|
+
params: {
|
3447
|
+
campaignId: string;
|
3448
|
+
field: string;
|
3449
|
+
};
|
3450
|
+
query: unknown;
|
3451
|
+
headers: unknown;
|
3452
|
+
response: {
|
3453
|
+
200: {
|
3454
|
+
averageBoost: number | null;
|
3455
|
+
totalDistributedInUSD: number | null;
|
3456
|
+
forfeitingBoost: number | null;
|
3457
|
+
} | null;
|
3458
|
+
};
|
3459
|
+
};
|
3460
|
+
};
|
3461
|
+
};
|
3462
|
+
};
|
3463
|
+
};
|
3464
|
+
} & {
|
3465
|
+
value: {
|
3466
|
+
user: {
|
3467
|
+
":address": {
|
3468
|
+
":field": {
|
3469
|
+
get: {
|
3470
|
+
body: unknown;
|
3471
|
+
params: {
|
3472
|
+
address: string;
|
3473
|
+
field: string;
|
3474
|
+
};
|
3475
|
+
query: unknown;
|
3476
|
+
headers: unknown;
|
3477
|
+
response: {
|
3478
|
+
200: {
|
3479
|
+
reason: string;
|
3480
|
+
id: number;
|
3481
|
+
campaignId: string;
|
3482
|
+
boost: number | null;
|
3483
|
+
}[];
|
3484
|
+
};
|
3485
|
+
};
|
3486
|
+
};
|
3487
|
+
};
|
3488
|
+
};
|
3489
|
+
};
|
3490
|
+
} & {
|
3491
|
+
value: {
|
3492
|
+
engine: {
|
3493
|
+
campaign: {
|
3494
|
+
post: {
|
3495
|
+
body: {
|
3496
|
+
value: number;
|
3497
|
+
campaignId: string;
|
3498
|
+
field: string;
|
3499
|
+
};
|
3500
|
+
params: {};
|
3501
|
+
query: unknown;
|
3502
|
+
headers: {
|
3503
|
+
authorization: string;
|
3504
|
+
};
|
3505
|
+
response: {
|
3506
|
+
200: void;
|
3507
|
+
};
|
3508
|
+
};
|
3509
|
+
};
|
3510
|
+
};
|
3511
|
+
};
|
3512
|
+
} & {
|
3513
|
+
value: {
|
3514
|
+
engine: {
|
3515
|
+
user: {
|
3516
|
+
post: {
|
3517
|
+
body: {
|
3518
|
+
reason: string;
|
3519
|
+
value: number;
|
3520
|
+
address: string;
|
3521
|
+
campaignId: string;
|
3522
|
+
field: string;
|
3523
|
+
}[];
|
3524
|
+
params: {};
|
3525
|
+
query: unknown;
|
3526
|
+
headers: {
|
3527
|
+
authorization: string;
|
3528
|
+
};
|
3529
|
+
response: {
|
3530
|
+
200: void;
|
3531
|
+
};
|
3532
|
+
};
|
3533
|
+
};
|
3534
|
+
};
|
3535
|
+
};
|
3536
|
+
};
|
3537
|
+
} & {
|
3538
|
+
v4: {
|
3539
|
+
creators: {
|
3540
|
+
index: {
|
3541
|
+
get: {
|
3542
|
+
body: unknown;
|
3543
|
+
params: {};
|
3544
|
+
query: {
|
3545
|
+
items?: number | undefined;
|
3546
|
+
page?: number | undefined;
|
3547
|
+
address?: string | undefined;
|
3548
|
+
};
|
3549
|
+
headers: unknown;
|
3550
|
+
response: {
|
3551
|
+
200: ({
|
3552
|
+
name: string;
|
3553
|
+
id: string;
|
3554
|
+
addresses: string[];
|
3555
|
+
} & {
|
3556
|
+
icon?: string | undefined;
|
3557
|
+
})[];
|
3558
|
+
};
|
3559
|
+
};
|
3560
|
+
};
|
3561
|
+
};
|
3562
|
+
} & {
|
3563
|
+
creators: {
|
3564
|
+
":id": {
|
3565
|
+
get: {
|
3566
|
+
body: unknown;
|
3567
|
+
params: {
|
3568
|
+
id: string;
|
3569
|
+
};
|
3570
|
+
query: unknown;
|
3571
|
+
headers: unknown;
|
3572
|
+
response: {
|
3573
|
+
200: {
|
3574
|
+
name: string;
|
3575
|
+
id: string;
|
3576
|
+
addresses: string[];
|
3577
|
+
icon?: string | undefined;
|
3578
|
+
};
|
3579
|
+
};
|
3580
|
+
};
|
3581
|
+
};
|
3582
|
+
};
|
3583
|
+
} & {
|
3584
|
+
creators: {
|
3585
|
+
index: {
|
3586
|
+
post: {
|
3587
|
+
body: {
|
3588
|
+
icon?: string | undefined;
|
3589
|
+
name: string;
|
3590
|
+
id: string;
|
3591
|
+
addresses: string[];
|
3592
|
+
};
|
3593
|
+
params: {};
|
3594
|
+
query: unknown;
|
3595
|
+
headers: {
|
3596
|
+
authorization: string;
|
3597
|
+
};
|
3598
|
+
response: {
|
3599
|
+
200: {
|
3600
|
+
name: string;
|
3601
|
+
id: string;
|
3602
|
+
icon: string | null;
|
3603
|
+
};
|
3604
|
+
};
|
3605
|
+
};
|
3606
|
+
};
|
3607
|
+
};
|
3608
|
+
} & {
|
3609
|
+
creators: {
|
3610
|
+
":id": {
|
3611
|
+
patch: {
|
3612
|
+
body: {
|
3613
|
+
icon?: string | undefined;
|
3614
|
+
name: string;
|
3615
|
+
addresses: string[];
|
3616
|
+
};
|
3617
|
+
params: {
|
3618
|
+
id: string;
|
3619
|
+
};
|
3620
|
+
query: unknown;
|
3621
|
+
headers: {
|
3622
|
+
authorization: string;
|
3623
|
+
};
|
3624
|
+
response: {
|
3625
|
+
200: {
|
3626
|
+
name: string;
|
3627
|
+
id: string;
|
3628
|
+
icon: string | null;
|
3629
|
+
};
|
3630
|
+
};
|
3631
|
+
};
|
3632
|
+
};
|
3633
|
+
};
|
3634
|
+
};
|
3208
3635
|
}, {
|
3209
3636
|
derive: {};
|
3210
3637
|
resolve: {};
|
@@ -17,6 +17,8 @@ import { PrismaInstrumentation } from "@prisma/instrumentation";
|
|
17
17
|
import Elysia from "elysia";
|
18
18
|
import { BoostController } from "./boost";
|
19
19
|
import { ClaimController } from "./claims";
|
20
|
+
import { ComputedValueController } from "./computedValue";
|
21
|
+
import { CreatorController } from "./creator";
|
20
22
|
import { DynamicDataController } from "./dynamicData";
|
21
23
|
import { ExplorerController } from "./explorer/explorer.controller";
|
22
24
|
import { InteractionController } from "./interaction/interaction.controller";
|
@@ -67,4 +69,6 @@ export const v4 = new Elysia({ tags: ["v4"], prefix: "/v4" })
|
|
67
69
|
.use(LiquidityController)
|
68
70
|
.use(ClaimController)
|
69
71
|
.use(ProgramPayloadController)
|
70
|
-
.use(BoostController)
|
72
|
+
.use(BoostController)
|
73
|
+
.use(ComputedValueController)
|
74
|
+
.use(CreatorController);
|
@@ -29,6 +29,7 @@ export declare const UserController: Elysia<"/users", false, {
|
|
29
29
|
200: {
|
30
30
|
tags: string[];
|
31
31
|
address: string;
|
32
|
+
creatorId: string | null;
|
32
33
|
}[];
|
33
34
|
};
|
34
35
|
};
|
@@ -48,6 +49,7 @@ export declare const UserController: Elysia<"/users", false, {
|
|
48
49
|
200: {
|
49
50
|
tags: string[];
|
50
51
|
address: string;
|
52
|
+
creatorId: string | null;
|
51
53
|
}[];
|
52
54
|
};
|
53
55
|
};
|
@@ -67,11 +69,35 @@ export declare const UserController: Elysia<"/users", false, {
|
|
67
69
|
200: {
|
68
70
|
tags: string[];
|
69
71
|
address: string;
|
72
|
+
creatorId: string | null;
|
70
73
|
} | null;
|
71
74
|
};
|
72
75
|
};
|
73
76
|
};
|
74
77
|
};
|
78
|
+
} & {
|
79
|
+
users: {
|
80
|
+
":address": {
|
81
|
+
creator: {
|
82
|
+
get: {
|
83
|
+
body: unknown;
|
84
|
+
params: {
|
85
|
+
address: string;
|
86
|
+
};
|
87
|
+
query: unknown;
|
88
|
+
headers: unknown;
|
89
|
+
response: {
|
90
|
+
200: {
|
91
|
+
name: string;
|
92
|
+
id: string;
|
93
|
+
addresses: string[];
|
94
|
+
icon?: string | undefined;
|
95
|
+
} | null;
|
96
|
+
};
|
97
|
+
};
|
98
|
+
};
|
99
|
+
};
|
100
|
+
};
|
75
101
|
} & {
|
76
102
|
users: {
|
77
103
|
":address": {
|
@@ -323,6 +349,7 @@ export declare const UserController: Elysia<"/users", false, {
|
|
323
349
|
200: {
|
324
350
|
tags: string[];
|
325
351
|
address: string;
|
352
|
+
creatorId: string | null;
|
326
353
|
};
|
327
354
|
};
|
328
355
|
};
|
@@ -363,6 +390,7 @@ export declare const UserController: Elysia<"/users", false, {
|
|
363
390
|
200: {
|
364
391
|
tags: string[];
|
365
392
|
address: string;
|
393
|
+
creatorId: string | null;
|
366
394
|
};
|
367
395
|
};
|
368
396
|
};
|
@@ -1,6 +1,7 @@
|
|
1
1
|
import { AuthorizationHeadersDto, BackOfficeGuard } from "../../../guards/BackOffice.guard";
|
2
2
|
import { throwOnInvalidRequiredAddress, throwOnUnsupportedChainId } from "../../../utils/throw";
|
3
3
|
import { Elysia, t } from "elysia";
|
4
|
+
import { CreatorService } from "../creator";
|
4
5
|
import { RewardService } from "../reward";
|
5
6
|
import { GetManyUserQuery, OptionalChainIdDto, UpdateUserTagsDto, UserDto, UserRewardRouteDto, UserRewardsResourceDto, UserUniqueDto, } from "./user.model";
|
6
7
|
import { UserService } from "./user.service";
|
@@ -15,6 +16,10 @@ export const UserController = new Elysia({ prefix: "/users", detail: { tags: ["U
|
|
15
16
|
// ─── Get A User By Address ───────────────────────────────────────────
|
16
17
|
.get("/:address", async ({ params }) => await UserService.findUnique(params.address), {
|
17
18
|
detail: { hide: true },
|
19
|
+
})
|
20
|
+
.get("/:address/creator", async ({ params: { address } }) => {
|
21
|
+
const [creator] = await CreatorService.findMany({ address });
|
22
|
+
return creator ? CreatorService.format(creator) : null;
|
18
23
|
})
|
19
24
|
// ─── Get User's Rewards With Breakdown And Details for our FE ────────
|
20
25
|
.get("/:address/rewards/breakdowns", async ({ params, query }) => {
|
@@ -3,22 +3,27 @@ export declare abstract class UserRepository {
|
|
3
3
|
static findUnique(address: string): Promise<{
|
4
4
|
tags: string[];
|
5
5
|
address: string;
|
6
|
+
creatorId: string | null;
|
6
7
|
} | null>;
|
7
8
|
static findMany(query: GetManyUserModel): Promise<{
|
8
9
|
tags: string[];
|
9
10
|
address: string;
|
11
|
+
creatorId: string | null;
|
10
12
|
}[]>;
|
11
13
|
static findManyWithTags(): Promise<{
|
12
14
|
tags: string[];
|
13
15
|
address: string;
|
16
|
+
creatorId: string | null;
|
14
17
|
}[]>;
|
15
18
|
static create(user: UserModel): Promise<{
|
16
19
|
tags: string[];
|
17
20
|
address: string;
|
21
|
+
creatorId: string | null;
|
18
22
|
}>;
|
19
23
|
static createMany(users: UserModel[]): Promise<import("../../../../database/api/.generated").Prisma.BatchPayload>;
|
20
24
|
static updateTags(address: string, tags: string[]): Promise<{
|
21
25
|
tags: string[];
|
22
26
|
address: string;
|
27
|
+
creatorId: string | null;
|
23
28
|
}>;
|
24
29
|
}
|