@merkl/api 1.0.48 → 1.0.50
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/dist/src/eden/index.d.ts +18 -443
- package/dist/src/engine/implementations/Ajna/metadata.d.ts +1 -1
- package/dist/src/engine/implementations/Ambient/metadata.d.ts +1 -1
- package/dist/src/engine/implementations/Badger/metadata.d.ts +1 -1
- package/dist/src/engine/implementations/Clamm/metadata.d.ts +1 -1
- package/dist/src/engine/implementations/Compound/metadata.d.ts +1 -1
- package/dist/src/engine/implementations/CompoundV3/metadata.d.ts +1 -1
- package/dist/src/engine/implementations/Default/metadata.d.ts +1 -1
- package/dist/src/engine/implementations/Dolomite/metadata.d.ts +1 -1
- package/dist/src/engine/implementations/EigenLayer/metadata.d.ts +1 -1
- package/dist/src/engine/implementations/Encompassing/metadata.d.ts +1 -1
- package/dist/src/engine/implementations/Erc20/metadata.d.ts +1 -1
- package/dist/src/engine/implementations/Erc20/subTypes/implementations/aave/metadata.d.ts +1 -1
- package/dist/src/engine/implementations/Erc20/subTypes/implementations/bunni/metadata.d.ts +18 -0
- package/dist/src/engine/implementations/Erc20/subTypes/implementations/bunni/tvl.d.ts +6 -0
- package/dist/src/engine/implementations/Erc20/subTypes/implementations/euler/metadata.d.ts +1 -1
- package/dist/src/engine/implementations/Erc20/subTypes/implementations/gamma/metadata.d.ts +1 -1
- package/dist/src/engine/implementations/Erc20/subTypes/implementations/gearbox/metadata.d.ts +1 -1
- package/dist/src/engine/implementations/Erc20/subTypes/implementations/hypurrfiIsolatedMarket/metadata.d.ts +1 -1
- package/dist/src/engine/implementations/Erc20/subTypes/implementations/lendleVaults/metadata.d.ts +1 -1
- package/dist/src/engine/implementations/Erc20/subTypes/implementations/metamorpho/metadata.d.ts +1 -1
- package/dist/src/engine/implementations/Erc20/subTypes/implementations/pino/metadata.d.ts +1 -1
- package/dist/src/engine/implementations/Erc20/subTypes/implementations/termmax/metadata.d.ts +1 -1
- package/dist/src/engine/implementations/Erc20/subTypes/implementations/termmaxVault/metadata.d.ts +1 -1
- package/dist/src/engine/implementations/Erc20/subTypes/implementations/uniswapV2/metadata.d.ts +1 -1
- package/dist/src/engine/implementations/Erc20/subTypes/implementations/uniswapV2/mimswap/metadata.d.ts +1 -1
- package/dist/src/engine/implementations/Erc20Snapshot/metadata.d.ts +1 -1
- package/dist/src/engine/implementations/Erc721/metadata.d.ts +1 -1
- package/dist/src/engine/implementations/ErcMultiToken/metadata.d.ts +1 -1
- package/dist/src/engine/implementations/EventBased/metadata.d.ts +1 -1
- package/dist/src/engine/implementations/FraxLend/metadataBorrow.d.ts +2 -2
- package/dist/src/engine/implementations/FraxLend/metadataCollateral.d.ts +1 -1
- package/dist/src/engine/implementations/Hyperdrive/metadata.d.ts +1 -1
- package/dist/src/engine/implementations/Ion/metadata.d.ts +1 -1
- package/dist/src/engine/implementations/JsonAirdrop/metadata.d.ts +1 -1
- package/dist/src/engine/implementations/Locker/metadata.d.ts +1 -1
- package/dist/src/engine/implementations/Morpho/metadata.d.ts +1 -1
- package/dist/src/engine/implementations/MultiLog/metadata.d.ts +1 -1
- package/dist/src/engine/implementations/Radiant/metadata.d.ts +1 -1
- package/dist/src/engine/implementations/Silo/metadata.d.ts +1 -1
- package/dist/src/engine/implementations/UniswapV4/metadata.d.ts +1 -1
- package/dist/src/engine/implementations/Vest/metadata.d.ts +1 -1
- package/dist/src/engine/implementations/morphoBorrow/metadata.d.ts +1 -1
- package/dist/src/engine/implementations/morphoCollateral/metadata.d.ts +1 -1
- package/dist/src/engine/implementations/morphoSupply/metadata.d.ts +1 -1
- package/dist/src/index.d.ts +9 -224
- package/dist/src/modules/v4/campaign/campaign.controller.d.ts +0 -55
- package/dist/src/modules/v4/campaign/campaign.convertor.d.ts +1 -1
- package/dist/src/modules/v4/campaign/campaign.formatter.d.ts +3 -81
- package/dist/src/modules/v4/campaign/campaign.model.d.ts +3 -4
- package/dist/src/modules/v4/campaign/campaign.repository.d.ts +23 -2
- package/dist/src/modules/v4/campaign/campaign.service.d.ts +11 -587
- package/dist/src/modules/v4/creator/creator.controller.d.ts +2 -162
- package/dist/src/modules/v4/creator/creator.service.d.ts +2 -162
- package/dist/src/modules/v4/opportunity/opportunity.controller.d.ts +0 -6
- package/dist/src/modules/v4/opportunity/opportunity.formatter.d.ts +29 -91
- package/dist/src/modules/v4/opportunity/opportunity.model.d.ts +15 -5
- package/dist/src/modules/v4/opportunity/opportunity.service.d.ts +10 -407
- package/dist/src/modules/v4/programPayload/programPayload.controller.d.ts +1 -1
- package/dist/src/modules/v4/programPayload/programPayload.repository.d.ts +125 -1
- package/dist/src/modules/v4/reward/reward.service.d.ts +7 -87
- package/dist/src/modules/v4/router.d.ts +6 -224
- package/dist/src/modules/v4/status/status.model.d.ts +0 -1
- package/dist/src/modules/v4/status/status.service.d.ts +2 -2
- package/dist/src/modules/v4/uniswap/uniswap.controller.d.ts +3 -0
- package/dist/src/routes/v3/router.d.ts +3 -0
- package/dist/src/routes/v3/uniswapv4.d.ts +3 -0
- package/dist/src/utils/providers.d.ts +2 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
package/dist/src/index.d.ts
CHANGED
@@ -344,7 +344,6 @@ declare const app: Elysia<"", {
|
|
344
344
|
campaignStatus?: {
|
345
345
|
error?: string | undefined;
|
346
346
|
details?: any;
|
347
|
-
campaignId: string;
|
348
347
|
status: string;
|
349
348
|
computedUntil: string | number;
|
350
349
|
processingStarted: string | number;
|
@@ -383,10 +382,8 @@ declare const app: Elysia<"", {
|
|
383
382
|
computeChainId: number;
|
384
383
|
distributionChainId: number;
|
385
384
|
endTimestamp: string | number;
|
386
|
-
opportunityId: string;
|
387
385
|
creatorAddress: string;
|
388
386
|
subType: number | null;
|
389
|
-
rewardTokenId: string;
|
390
387
|
createdAt: string;
|
391
388
|
chain: {
|
392
389
|
explorers?: {
|
@@ -687,7 +684,6 @@ declare const app: Elysia<"", {
|
|
687
684
|
campaignStatus?: {
|
688
685
|
error?: string | undefined;
|
689
686
|
details?: any;
|
690
|
-
campaignId: string;
|
691
687
|
status: string;
|
692
688
|
computedUntil: string | number;
|
693
689
|
processingStarted: string | number;
|
@@ -726,10 +722,8 @@ declare const app: Elysia<"", {
|
|
726
722
|
computeChainId: number;
|
727
723
|
distributionChainId: number;
|
728
724
|
endTimestamp: string | number;
|
729
|
-
opportunityId: string;
|
730
725
|
creatorAddress: string;
|
731
726
|
subType: number | null;
|
732
|
-
rewardTokenId: string;
|
733
727
|
createdAt: string;
|
734
728
|
chain: {
|
735
729
|
explorers?: {
|
@@ -1727,7 +1721,6 @@ declare const app: Elysia<"", {
|
|
1727
1721
|
campaignStatus?: {
|
1728
1722
|
error?: string | undefined;
|
1729
1723
|
details?: any;
|
1730
|
-
campaignId: string;
|
1731
1724
|
status: string;
|
1732
1725
|
computedUntil: string | number;
|
1733
1726
|
processingStarted: string | number;
|
@@ -1766,10 +1759,8 @@ declare const app: Elysia<"", {
|
|
1766
1759
|
computeChainId: number;
|
1767
1760
|
distributionChainId: number;
|
1768
1761
|
endTimestamp: string | number;
|
1769
|
-
opportunityId: string;
|
1770
1762
|
creatorAddress: string;
|
1771
1763
|
subType: number | null;
|
1772
|
-
rewardTokenId: string;
|
1773
1764
|
createdAt: string;
|
1774
1765
|
chain: {
|
1775
1766
|
explorers?: {
|
@@ -2035,7 +2026,6 @@ declare const app: Elysia<"", {
|
|
2035
2026
|
campaignStatus?: {
|
2036
2027
|
error?: string | undefined;
|
2037
2028
|
details?: any;
|
2038
|
-
campaignId: string;
|
2039
2029
|
status: string;
|
2040
2030
|
computedUntil: string | number;
|
2041
2031
|
processingStarted: string | number;
|
@@ -2074,10 +2064,8 @@ declare const app: Elysia<"", {
|
|
2074
2064
|
computeChainId: number;
|
2075
2065
|
distributionChainId: number;
|
2076
2066
|
endTimestamp: string | number;
|
2077
|
-
opportunityId: string;
|
2078
2067
|
creatorAddress: string;
|
2079
2068
|
subType: number | null;
|
2080
|
-
rewardTokenId: string;
|
2081
2069
|
createdAt: string;
|
2082
2070
|
chain: {
|
2083
2071
|
explorers?: {
|
@@ -2409,55 +2397,6 @@ declare const app: Elysia<"", {
|
|
2409
2397
|
};
|
2410
2398
|
};
|
2411
2399
|
};
|
2412
|
-
} & {
|
2413
|
-
campaigns: {
|
2414
|
-
metadata: {
|
2415
|
-
patch: {
|
2416
|
-
body: {
|
2417
|
-
campaignId: string;
|
2418
|
-
url: string;
|
2419
|
-
distributionChain: number;
|
2420
|
-
};
|
2421
|
-
params: {};
|
2422
|
-
query: unknown;
|
2423
|
-
headers: {
|
2424
|
-
authorization: string;
|
2425
|
-
};
|
2426
|
-
response: {
|
2427
|
-
200: {
|
2428
|
-
campaignId: string;
|
2429
|
-
description: string | null;
|
2430
|
-
id: string;
|
2431
|
-
params: import("@prisma/client/runtime/library").JsonValue;
|
2432
|
-
amount: string;
|
2433
|
-
startTimestamp: bigint;
|
2434
|
-
type: string;
|
2435
|
-
computeChainId: number;
|
2436
|
-
distributionChainId: number;
|
2437
|
-
endTimestamp: bigint;
|
2438
|
-
opportunityId: string;
|
2439
|
-
creatorAddress: string;
|
2440
|
-
distributionType: import("@package/databases").DistributionType;
|
2441
|
-
subType: number | null;
|
2442
|
-
rewardTokenId: string;
|
2443
|
-
manualOverrides: import("@package/databases").CampaignManualOverride[];
|
2444
|
-
createdAt: Date;
|
2445
|
-
rootCampaignId: string | null;
|
2446
|
-
parentCampaignId: string | null;
|
2447
|
-
};
|
2448
|
-
422: {
|
2449
|
-
type: "validation";
|
2450
|
-
on: string;
|
2451
|
-
summary?: string;
|
2452
|
-
message?: string;
|
2453
|
-
found?: unknown;
|
2454
|
-
property?: string;
|
2455
|
-
expected?: string;
|
2456
|
-
};
|
2457
|
-
};
|
2458
|
-
};
|
2459
|
-
};
|
2460
|
-
};
|
2461
2400
|
} & {
|
2462
2401
|
campaigns: {
|
2463
2402
|
tvls: {
|
@@ -6931,7 +6870,7 @@ declare const app: Elysia<"", {
|
|
6931
6870
|
whitelist: string[];
|
6932
6871
|
blacklist: string[];
|
6933
6872
|
url?: string | undefined;
|
6934
|
-
distributionMethodParameters: import("@angleprotocol/sdk/
|
6873
|
+
distributionMethodParameters: import("@angleprotocol/sdk/ts").DistributionParameters<import("@angleprotocol/sdk/ts").DistributionMethod>;
|
6935
6874
|
} | {
|
6936
6875
|
rewardToken: string;
|
6937
6876
|
amount: string;
|
@@ -7669,87 +7608,7 @@ declare const app: Elysia<"", {
|
|
7669
7608
|
createdAt: Date;
|
7670
7609
|
rootCampaignId: string | null;
|
7671
7610
|
parentCampaignId: string | null;
|
7672
|
-
}) |
|
7673
|
-
params: any;
|
7674
|
-
chain: {
|
7675
|
-
name: string;
|
7676
|
-
id: number;
|
7677
|
-
icon: string;
|
7678
|
-
};
|
7679
|
-
endTimestamp: number;
|
7680
|
-
startTimestamp: number;
|
7681
|
-
rewardToken: {
|
7682
|
-
symbol: string;
|
7683
|
-
name: string | null;
|
7684
|
-
decimals: number;
|
7685
|
-
address: string;
|
7686
|
-
id: string;
|
7687
|
-
chainId: number;
|
7688
|
-
icon: string;
|
7689
|
-
isNative: boolean;
|
7690
|
-
isPoint: boolean;
|
7691
|
-
isPreTGE: boolean;
|
7692
|
-
isTest: boolean;
|
7693
|
-
verified: boolean;
|
7694
|
-
} & {
|
7695
|
-
price?: number | null | undefined;
|
7696
|
-
isTokenWrapper?: boolean | undefined;
|
7697
|
-
tokenWrapperAddress?: string | undefined;
|
7698
|
-
};
|
7699
|
-
distributionChain: {
|
7700
|
-
name: string;
|
7701
|
-
id: number;
|
7702
|
-
icon: string;
|
7703
|
-
} | undefined;
|
7704
|
-
campaignStatus: {
|
7705
|
-
computedUntil: number;
|
7706
|
-
processingStarted: number;
|
7707
|
-
campaignId: string;
|
7708
|
-
error: string;
|
7709
|
-
status: import("@package/databases").RunStatus;
|
7710
|
-
details: import("@prisma/client/runtime/library").JsonValue;
|
7711
|
-
} | undefined;
|
7712
|
-
creatorAddress: string;
|
7713
|
-
creator: {
|
7714
|
-
address: string;
|
7715
|
-
tags: string[];
|
7716
|
-
creatorId: string | null;
|
7717
|
-
};
|
7718
|
-
createdAt: string;
|
7719
|
-
description: string | undefined;
|
7720
|
-
parentCampaignId: string | undefined;
|
7721
|
-
rootCampaignId: string | undefined;
|
7722
|
-
Opportunity: {
|
7723
|
-
name: string;
|
7724
|
-
apr: number;
|
7725
|
-
tvl: number;
|
7726
|
-
description: string;
|
7727
|
-
id: string;
|
7728
|
-
status: import("@package/databases").Status;
|
7729
|
-
chainId: number;
|
7730
|
-
action: import("@package/databases").OpportunityAction;
|
7731
|
-
type: string;
|
7732
|
-
depositUrl: string | null;
|
7733
|
-
explorerAddress: string | null;
|
7734
|
-
howToSteps: string[];
|
7735
|
-
mainProtocolId: string | null;
|
7736
|
-
manualOverrides: import("@package/databases").OpportunityManualOverride[];
|
7737
|
-
identifier: string;
|
7738
|
-
dailyRewards: number;
|
7739
|
-
tags: string[];
|
7740
|
-
lastCampaignCreatedAt: Date;
|
7741
|
-
};
|
7742
|
-
campaignId: string;
|
7743
|
-
id: string;
|
7744
|
-
amount: string;
|
7745
|
-
type: string;
|
7746
|
-
computeChainId: number;
|
7747
|
-
distributionChainId: number;
|
7748
|
-
opportunityId: string;
|
7749
|
-
distributionType: import("@package/databases").DistributionType;
|
7750
|
-
subType: number | null;
|
7751
|
-
rewardTokenId: string;
|
7752
|
-
})[];
|
7611
|
+
}) | Omit<import("./modules/v4/campaign/campaign.model").CampaignWithParams, "manualOverrides">)[];
|
7753
7612
|
422: {
|
7754
7613
|
type: "validation";
|
7755
7614
|
on: string;
|
@@ -7820,87 +7679,7 @@ declare const app: Elysia<"", {
|
|
7820
7679
|
createdAt: Date;
|
7821
7680
|
rootCampaignId: string | null;
|
7822
7681
|
parentCampaignId: string | null;
|
7823
|
-
})[] |
|
7824
|
-
params: any;
|
7825
|
-
chain: {
|
7826
|
-
name: string;
|
7827
|
-
id: number;
|
7828
|
-
icon: string;
|
7829
|
-
};
|
7830
|
-
endTimestamp: number;
|
7831
|
-
startTimestamp: number;
|
7832
|
-
rewardToken: {
|
7833
|
-
symbol: string;
|
7834
|
-
name: string | null;
|
7835
|
-
decimals: number;
|
7836
|
-
address: string;
|
7837
|
-
id: string;
|
7838
|
-
chainId: number;
|
7839
|
-
icon: string;
|
7840
|
-
isNative: boolean;
|
7841
|
-
isPoint: boolean;
|
7842
|
-
isPreTGE: boolean;
|
7843
|
-
isTest: boolean;
|
7844
|
-
verified: boolean;
|
7845
|
-
} & {
|
7846
|
-
price?: number | null | undefined;
|
7847
|
-
isTokenWrapper?: boolean | undefined;
|
7848
|
-
tokenWrapperAddress?: string | undefined;
|
7849
|
-
};
|
7850
|
-
distributionChain: {
|
7851
|
-
name: string;
|
7852
|
-
id: number;
|
7853
|
-
icon: string;
|
7854
|
-
} | undefined;
|
7855
|
-
campaignStatus: {
|
7856
|
-
computedUntil: number;
|
7857
|
-
processingStarted: number;
|
7858
|
-
campaignId: string;
|
7859
|
-
error: string;
|
7860
|
-
status: import("@package/databases").RunStatus;
|
7861
|
-
details: import("@prisma/client/runtime/library").JsonValue;
|
7862
|
-
} | undefined;
|
7863
|
-
creatorAddress: string;
|
7864
|
-
creator: {
|
7865
|
-
address: string;
|
7866
|
-
tags: string[];
|
7867
|
-
creatorId: string | null;
|
7868
|
-
};
|
7869
|
-
createdAt: string;
|
7870
|
-
description: string | undefined;
|
7871
|
-
parentCampaignId: string | undefined;
|
7872
|
-
rootCampaignId: string | undefined;
|
7873
|
-
Opportunity: {
|
7874
|
-
name: string;
|
7875
|
-
apr: number;
|
7876
|
-
tvl: number;
|
7877
|
-
description: string;
|
7878
|
-
id: string;
|
7879
|
-
status: import("@package/databases").Status;
|
7880
|
-
chainId: number;
|
7881
|
-
action: import("@package/databases").OpportunityAction;
|
7882
|
-
type: string;
|
7883
|
-
depositUrl: string | null;
|
7884
|
-
explorerAddress: string | null;
|
7885
|
-
howToSteps: string[];
|
7886
|
-
mainProtocolId: string | null;
|
7887
|
-
manualOverrides: import("@package/databases").OpportunityManualOverride[];
|
7888
|
-
identifier: string;
|
7889
|
-
dailyRewards: number;
|
7890
|
-
tags: string[];
|
7891
|
-
lastCampaignCreatedAt: Date;
|
7892
|
-
};
|
7893
|
-
campaignId: string;
|
7894
|
-
id: string;
|
7895
|
-
amount: string;
|
7896
|
-
type: string;
|
7897
|
-
computeChainId: number;
|
7898
|
-
distributionChainId: number;
|
7899
|
-
opportunityId: string;
|
7900
|
-
distributionType: import("@package/databases").DistributionType;
|
7901
|
-
subType: number | null;
|
7902
|
-
rewardTokenId: string;
|
7903
|
-
}[];
|
7682
|
+
})[] | Omit<import("./modules/v4/campaign/campaign.model").CampaignWithParams, "manualOverrides">[];
|
7904
7683
|
422: {
|
7905
7684
|
type: "validation";
|
7906
7685
|
on: string;
|
@@ -8286,6 +8065,9 @@ declare const app: Elysia<"", {
|
|
8286
8065
|
50?: {
|
8287
8066
|
[poolId: string]: import("@angleprotocol/sdk/ts").UniswapV4PoolType;
|
8288
8067
|
} | undefined;
|
8068
|
+
747474?: {
|
8069
|
+
[poolId: string]: import("@angleprotocol/sdk/ts").UniswapV4PoolType;
|
8070
|
+
} | undefined;
|
8289
8071
|
};
|
8290
8072
|
};
|
8291
8073
|
};
|
@@ -10068,6 +9850,9 @@ declare const app: Elysia<"", {
|
|
10068
9850
|
50?: {
|
10069
9851
|
[poolId: string]: import("@angleprotocol/sdk/ts").UniswapV4PoolType;
|
10070
9852
|
} | undefined;
|
9853
|
+
747474?: {
|
9854
|
+
[poolId: string]: import("@angleprotocol/sdk/ts").UniswapV4PoolType;
|
9855
|
+
} | undefined;
|
10071
9856
|
} | null;
|
10072
9857
|
};
|
10073
9858
|
};
|
@@ -174,7 +174,6 @@ export declare const CampaignController: Elysia<"/campaigns", {
|
|
174
174
|
campaignStatus?: {
|
175
175
|
error?: string | undefined;
|
176
176
|
details?: any;
|
177
|
-
campaignId: string;
|
178
177
|
status: string;
|
179
178
|
computedUntil: string | number;
|
180
179
|
processingStarted: string | number;
|
@@ -213,10 +212,8 @@ export declare const CampaignController: Elysia<"/campaigns", {
|
|
213
212
|
computeChainId: number;
|
214
213
|
distributionChainId: number;
|
215
214
|
endTimestamp: string | number;
|
216
|
-
opportunityId: string;
|
217
215
|
creatorAddress: string;
|
218
216
|
subType: number | null;
|
219
|
-
rewardTokenId: string;
|
220
217
|
createdAt: string;
|
221
218
|
chain: {
|
222
219
|
explorers?: {
|
@@ -482,7 +479,6 @@ export declare const CampaignController: Elysia<"/campaigns", {
|
|
482
479
|
campaignStatus?: {
|
483
480
|
error?: string | undefined;
|
484
481
|
details?: any;
|
485
|
-
campaignId: string;
|
486
482
|
status: string;
|
487
483
|
computedUntil: string | number;
|
488
484
|
processingStarted: string | number;
|
@@ -521,10 +517,8 @@ export declare const CampaignController: Elysia<"/campaigns", {
|
|
521
517
|
computeChainId: number;
|
522
518
|
distributionChainId: number;
|
523
519
|
endTimestamp: string | number;
|
524
|
-
opportunityId: string;
|
525
520
|
creatorAddress: string;
|
526
521
|
subType: number | null;
|
527
|
-
rewardTokenId: string;
|
528
522
|
createdAt: string;
|
529
523
|
chain: {
|
530
524
|
explorers?: {
|
@@ -856,55 +850,6 @@ export declare const CampaignController: Elysia<"/campaigns", {
|
|
856
850
|
};
|
857
851
|
};
|
858
852
|
};
|
859
|
-
} & {
|
860
|
-
campaigns: {
|
861
|
-
metadata: {
|
862
|
-
patch: {
|
863
|
-
body: {
|
864
|
-
campaignId: string;
|
865
|
-
url: string;
|
866
|
-
distributionChain: number;
|
867
|
-
};
|
868
|
-
params: {};
|
869
|
-
query: unknown;
|
870
|
-
headers: {
|
871
|
-
authorization: string;
|
872
|
-
};
|
873
|
-
response: {
|
874
|
-
200: {
|
875
|
-
campaignId: string;
|
876
|
-
description: string | null;
|
877
|
-
id: string;
|
878
|
-
params: import("@prisma/client/runtime/library").JsonValue;
|
879
|
-
amount: string;
|
880
|
-
startTimestamp: bigint;
|
881
|
-
type: string;
|
882
|
-
computeChainId: number;
|
883
|
-
distributionChainId: number;
|
884
|
-
endTimestamp: bigint;
|
885
|
-
opportunityId: string;
|
886
|
-
creatorAddress: string;
|
887
|
-
distributionType: import("@package/databases").DistributionType;
|
888
|
-
subType: number | null;
|
889
|
-
rewardTokenId: string;
|
890
|
-
manualOverrides: import("@package/databases").CampaignManualOverride[];
|
891
|
-
createdAt: Date;
|
892
|
-
rootCampaignId: string | null;
|
893
|
-
parentCampaignId: string | null;
|
894
|
-
};
|
895
|
-
422: {
|
896
|
-
type: "validation";
|
897
|
-
on: string;
|
898
|
-
summary?: string;
|
899
|
-
message?: string;
|
900
|
-
found?: unknown;
|
901
|
-
property?: string;
|
902
|
-
expected?: string;
|
903
|
-
};
|
904
|
-
};
|
905
|
-
};
|
906
|
-
};
|
907
|
-
};
|
908
853
|
} & {
|
909
854
|
campaigns: {
|
910
855
|
tvls: {
|
@@ -2,5 +2,5 @@ import type { CampaignParameters, Campaign as CampaignType } from "@angleprotoco
|
|
2
2
|
import type { CampaignWithParams } from "../../../modules/v4/campaign/campaign.model";
|
3
3
|
import type { OpportunityService } from "../../../modules/v4/opportunity/opportunity.service";
|
4
4
|
export declare abstract class CampaignConvertor {
|
5
|
-
static convertToV3<C extends CampaignType>(campaignType: C, campaign: Exclude<Awaited<ReturnType<(typeof OpportunityService)["findMany"]>>[number]["campaigns"], undefined>[number] | Omit<CampaignWithParams<C>, "manualOverrides">, opportunityIdentifier: string): CampaignParameters<C>;
|
5
|
+
static convertToV3<C extends CampaignType>(campaignType: C, campaign: Exclude<Awaited<ReturnType<(typeof OpportunityService)["findMany"]>>[number]["campaigns"], undefined>[number] | Omit<CampaignWithParams<C>, "manualOverrides" | "opportunityId">, opportunityIdentifier: string): CampaignParameters<C>;
|
6
6
|
}
|
@@ -1,84 +1,6 @@
|
|
1
|
+
import type { Campaign as CampaignType } from "@angleprotocol/sdk/ts";
|
2
|
+
import type { CampaignWithParams } from "../../../modules/v4/campaign/campaign.model";
|
1
3
|
import type { CampaignRepository } from "./campaign.repository";
|
2
4
|
export declare abstract class CampaignFormatter {
|
3
|
-
static format(campaign: NonNullable<Awaited<ReturnType<(typeof CampaignRepository)["
|
4
|
-
params: any;
|
5
|
-
chain: {
|
6
|
-
name: string;
|
7
|
-
id: number;
|
8
|
-
icon: string;
|
9
|
-
};
|
10
|
-
endTimestamp: number;
|
11
|
-
startTimestamp: number;
|
12
|
-
rewardToken: {
|
13
|
-
symbol: string;
|
14
|
-
name: string | null;
|
15
|
-
decimals: number;
|
16
|
-
address: string;
|
17
|
-
id: string;
|
18
|
-
chainId: number;
|
19
|
-
icon: string;
|
20
|
-
isNative: boolean;
|
21
|
-
isPoint: boolean;
|
22
|
-
isPreTGE: boolean;
|
23
|
-
isTest: boolean;
|
24
|
-
verified: boolean;
|
25
|
-
} & {
|
26
|
-
price?: number | null | undefined;
|
27
|
-
isTokenWrapper?: boolean | undefined;
|
28
|
-
tokenWrapperAddress?: string | undefined;
|
29
|
-
};
|
30
|
-
distributionChain: {
|
31
|
-
name: string;
|
32
|
-
id: number;
|
33
|
-
icon: string;
|
34
|
-
} | undefined;
|
35
|
-
campaignStatus: {
|
36
|
-
computedUntil: number;
|
37
|
-
processingStarted: number;
|
38
|
-
campaignId: string;
|
39
|
-
error: string;
|
40
|
-
status: import("@package/databases").RunStatus;
|
41
|
-
details: import("@prisma/client/runtime/library").JsonValue;
|
42
|
-
} | undefined;
|
43
|
-
creatorAddress: string;
|
44
|
-
creator: {
|
45
|
-
address: string;
|
46
|
-
tags: string[];
|
47
|
-
creatorId: string | null;
|
48
|
-
};
|
49
|
-
createdAt: string;
|
50
|
-
description: string | undefined;
|
51
|
-
parentCampaignId: string | undefined;
|
52
|
-
rootCampaignId: string | undefined;
|
53
|
-
Opportunity: {
|
54
|
-
name: string;
|
55
|
-
apr: number;
|
56
|
-
tvl: number;
|
57
|
-
description: string;
|
58
|
-
id: string;
|
59
|
-
status: import("@package/databases").Status;
|
60
|
-
chainId: number;
|
61
|
-
action: import("@package/databases").OpportunityAction;
|
62
|
-
type: string;
|
63
|
-
depositUrl: string | null;
|
64
|
-
explorerAddress: string | null;
|
65
|
-
howToSteps: string[];
|
66
|
-
mainProtocolId: string | null;
|
67
|
-
manualOverrides: import("@package/databases").OpportunityManualOverride[];
|
68
|
-
identifier: string;
|
69
|
-
dailyRewards: number;
|
70
|
-
tags: string[];
|
71
|
-
lastCampaignCreatedAt: Date;
|
72
|
-
};
|
73
|
-
campaignId: string;
|
74
|
-
id: string;
|
75
|
-
amount: string;
|
76
|
-
type: string;
|
77
|
-
computeChainId: number;
|
78
|
-
distributionChainId: number;
|
79
|
-
opportunityId: string;
|
80
|
-
distributionType: import("@package/databases").DistributionType;
|
81
|
-
subType: number | null;
|
82
|
-
rewardTokenId: string;
|
83
|
-
};
|
5
|
+
static format<C extends CampaignType>(campaign: NonNullable<Awaited<ReturnType<(typeof CampaignRepository)["findUniqueOrThrow"]>>>): Omit<CampaignWithParams, "manualOverrides">;
|
84
6
|
}
|
@@ -2,13 +2,14 @@ import type { CampaignParameters, Campaign as CampaignType } from "@angleprotoco
|
|
2
2
|
import type { Resource } from "../../../modules/v4/prisma";
|
3
3
|
import { type Token } from "../../../modules/v4/token/token.model";
|
4
4
|
import { type Chain } from "../chain/chain.model";
|
5
|
+
import type { OpportunityLight } from "../opportunity/opportunity.model";
|
5
6
|
import { type Status as StatusModel } from "../status/status.model";
|
6
7
|
/**
|
7
8
|
* Campaign
|
8
9
|
* @description Target description of rewards campaigns
|
9
10
|
* @see {@link Resource}
|
10
11
|
*/
|
11
|
-
export type Campaign = Resource<"Campaign",
|
12
|
+
export type Campaign = Resource<"Campaign", undefined, {
|
12
13
|
chain: Chain["model"];
|
13
14
|
rewardToken: Token["model"];
|
14
15
|
distributionChain?: Chain["model"];
|
@@ -18,6 +19,7 @@ export type Campaign = Resource<"Campaign", "opportunityId" | "rewardTokenId", {
|
|
18
19
|
tags?: string[];
|
19
20
|
creatorId: string | null;
|
20
21
|
};
|
22
|
+
Opportunity?: OpportunityLight["model"];
|
21
23
|
description?: string;
|
22
24
|
endTimestamp: number;
|
23
25
|
startTimestamp: number;
|
@@ -40,9 +42,7 @@ export declare const CampaignResourceDto: import("@sinclair/typebox").TObject<{
|
|
40
42
|
campaignId: import("@sinclair/typebox").TString;
|
41
43
|
type: import("@sinclair/typebox").TString;
|
42
44
|
subType: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TNumber, import("@sinclair/typebox").TNull]>;
|
43
|
-
rewardTokenId: import("@sinclair/typebox").TString;
|
44
45
|
amount: import("@sinclair/typebox").TString;
|
45
|
-
opportunityId: import("@sinclair/typebox").TString;
|
46
46
|
startTimestamp: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNumber]>;
|
47
47
|
endTimestamp: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNumber]>;
|
48
48
|
creatorAddress: import("@sinclair/typebox").TString;
|
@@ -102,7 +102,6 @@ export declare const CampaignResourceDto: import("@sinclair/typebox").TObject<{
|
|
102
102
|
readonly FIX_REWARD_AMOUNT_PER_LIQUIDITY_AMOUNT: "FIX_REWARD_AMOUNT_PER_LIQUIDITY_AMOUNT";
|
103
103
|
}>>;
|
104
104
|
campaignStatus: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
|
105
|
-
campaignId: import("@sinclair/typebox").TString;
|
106
105
|
computedUntil: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNumber]>;
|
107
106
|
processingStarted: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNumber]>;
|
108
107
|
status: import("@sinclair/typebox").TString;
|
@@ -2,6 +2,7 @@ import { type ChainId } from "@angleprotocol/sdk/ts";
|
|
2
2
|
import { type CampaignManualOverride } from "@package/databases/api";
|
3
3
|
import type { Campaign, CampaignUnique, CampaignWithParams, FindCampaignModel, findCampaignWithStatusModel } from "../../../modules/v4/campaign/campaign.model";
|
4
4
|
export declare abstract class CampaignRepository {
|
5
|
+
#private;
|
5
6
|
static transformQueryToPrismaFilters(query: Omit<FindCampaignModel, "page" | "items">): {
|
6
7
|
where: {
|
7
8
|
createdAt: {
|
@@ -558,7 +559,7 @@ export declare abstract class CampaignRepository {
|
|
558
559
|
* 4. Upserts the campaign in the database using the constructed data object.
|
559
560
|
* 5. Logs an error if the upsert operation fails.
|
560
561
|
*/
|
561
|
-
static upsert(campaign: Omit<CampaignWithParams, "manualOverrides">, opportunityIdentifier: string): Promise<{
|
562
|
+
static upsert(campaign: Omit<CampaignWithParams, "manualOverrides" | "opportunityId">, opportunityIdentifier: string): Promise<{
|
562
563
|
campaignId: string;
|
563
564
|
description: string | null;
|
564
565
|
id: string;
|
@@ -600,7 +601,7 @@ export declare abstract class CampaignRepository {
|
|
600
601
|
campaignSubType: number;
|
601
602
|
mainParameter: string;
|
602
603
|
}[]>;
|
603
|
-
static findUnique(id: string): Promise<({
|
604
|
+
static findUnique(id: string, withOpportunity: boolean): Promise<({
|
604
605
|
ComputeChain: {
|
605
606
|
name: string;
|
606
607
|
id: number;
|
@@ -627,6 +628,26 @@ export declare abstract class CampaignRepository {
|
|
627
628
|
verified: boolean;
|
628
629
|
displaySymbol: string;
|
629
630
|
};
|
631
|
+
Opportunity: {
|
632
|
+
name: string;
|
633
|
+
apr: number;
|
634
|
+
tvl: number;
|
635
|
+
description: string;
|
636
|
+
id: string;
|
637
|
+
status: import("@package/databases").Status;
|
638
|
+
chainId: number;
|
639
|
+
action: import("@package/databases").OpportunityAction;
|
640
|
+
type: string;
|
641
|
+
depositUrl: string | null;
|
642
|
+
explorerAddress: string | null;
|
643
|
+
howToSteps: string[];
|
644
|
+
mainProtocolId: string | null;
|
645
|
+
manualOverrides: import("@package/databases").OpportunityManualOverride[];
|
646
|
+
identifier: string;
|
647
|
+
dailyRewards: number;
|
648
|
+
tags: string[];
|
649
|
+
lastCampaignCreatedAt: Date;
|
650
|
+
};
|
630
651
|
Creator: {
|
631
652
|
address: string;
|
632
653
|
tags: string[];
|