@merkl/api 0.16.1 → 0.16.2
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/database/api/.generated/drizzle/schema.d.ts +8 -9
- package/dist/database/api/.generated/drizzle/schema.js +2 -3
- package/dist/database/api/.generated/drizzle/schema.ts +2 -4
- package/dist/database/api/.generated/edge.js +5 -33
- package/dist/database/api/.generated/index-browser.js +2 -30
- package/dist/database/api/.generated/index.d.ts +123 -210
- package/dist/database/api/.generated/index.js +5 -33
- package/dist/database/api/.generated/package.json +1 -1
- package/dist/database/api/.generated/schema.prisma +2 -32
- package/dist/database/api/.generated/wasm.js +2 -30
- package/dist/src/constants.d.ts +259 -13
- package/dist/src/eden/index.d.ts +98 -98
- package/dist/src/index.d.ts +19 -19
- package/dist/src/modules/v4/campaign/campaign.controller.d.ts +6 -6
- package/dist/src/modules/v4/campaign/campaign.model.d.ts +5 -65
- package/dist/src/modules/v4/campaign/campaign.model.js +1 -34
- package/dist/src/modules/v4/campaign/campaign.repository.d.ts +7 -7
- package/dist/src/modules/v4/campaign/campaign.service.d.ts +14 -15
- package/dist/src/modules/v4/campaign/campaign.service.js +6 -6
- package/dist/src/modules/v4/chain/chain.repository.d.ts +1 -1
- package/dist/src/modules/v4/dynamicData/dynamicData.controller.d.ts +2 -2
- package/dist/src/modules/v4/dynamicData/dynamicData.model.d.ts +2 -58
- package/dist/src/modules/v4/dynamicData/dynamicData.model.js +2 -3
- package/dist/src/modules/v4/dynamicData/dynamicData.service.d.ts +1 -8
- package/dist/src/modules/v4/dynamicData/dynamicData.service.js +4 -13
- package/dist/src/modules/v4/opportunity/opportunity.controller.d.ts +9 -9
- package/dist/src/modules/v4/opportunity/opportunity.model.d.ts +3 -31
- package/dist/src/modules/v4/opportunity/opportunity.model.js +2 -2
- package/dist/src/modules/v4/opportunity/opportunity.repository.d.ts +33 -18
- package/dist/src/modules/v4/opportunity/opportunity.repository.js +9 -1
- package/dist/src/modules/v4/opportunity/opportunity.service.d.ts +15 -15
- package/dist/src/modules/v4/opportunity/opportunity.service.js +3 -2
- package/dist/src/modules/v4/opportunity/subservices/getErc20Metadata.service.d.ts +1 -1
- package/dist/src/modules/v4/opportunity/subservices/getErc20Metadata.service.js +2 -2
- package/dist/src/modules/v4/opportunity/subservices/getEulerMetadata.service.d.ts +1 -1
- package/dist/src/modules/v4/opportunity/subservices/getEulerMetadata.service.js +3 -2
- package/dist/src/modules/v4/opportunity/validate-id.pipe.js +3 -3
- package/dist/src/modules/v4/protocol/protocol.repository.d.ts +2 -2
- package/dist/src/modules/v4/reward/reward.repository.d.ts +1 -1
- package/dist/src/modules/v4/reward/reward.service.d.ts +8 -8
- package/dist/src/modules/v4/reward/reward.service.js +2 -2
- package/dist/src/modules/v4/router.d.ts +19 -19
- package/dist/src/modules/v4/user/user.controller.d.ts +2 -2
- package/dist/tsconfig.package.tsbuildinfo +1 -1
- package/package.json +1 -1
@@ -17,35 +17,7 @@ export declare const SimplifiedCampaignDto: import("@sinclair/typebox").TObject<
|
|
17
17
|
campaignId: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
18
18
|
identifier: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
19
19
|
creatorAddress: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
20
|
-
type: import("@sinclair/typebox").
|
21
|
-
INVALID: "INVALID";
|
22
|
-
ERC20: "ERC20";
|
23
|
-
CLAMM: "CLAMM";
|
24
|
-
ERC20_SNAPSHOT: "ERC20_SNAPSHOT";
|
25
|
-
JSON_AIRDROP: "JSON_AIRDROP";
|
26
|
-
SILO: "SILO";
|
27
|
-
RADIANT: "RADIANT";
|
28
|
-
MORPHO: "MORPHO";
|
29
|
-
DOLOMITE: "DOLOMITE";
|
30
|
-
BADGER: "BADGER";
|
31
|
-
COMPOUND: "COMPOUND";
|
32
|
-
AJNA: "AJNA";
|
33
|
-
EULER: "EULER";
|
34
|
-
UNISWAP_V4: "UNISWAP_V4";
|
35
|
-
ION: "ION";
|
36
|
-
EIGENLAYER: "EIGENLAYER";
|
37
|
-
ERC20TRANSFERS: "ERC20TRANSFERS";
|
38
|
-
ERC20LOGPROCESSOR: "ERC20LOGPROCESSOR";
|
39
|
-
ERC20REBASELOGPROCESSOR: "ERC20REBASELOGPROCESSOR";
|
40
|
-
VEST: "VEST";
|
41
|
-
ERC20_FIX_APR: "ERC20_FIX_APR";
|
42
|
-
HYPERDRIVELOGPROCESSOR: "HYPERDRIVELOGPROCESSOR";
|
43
|
-
HYPERDRIVELOGFIXPROCESSOR: "HYPERDRIVELOGFIXPROCESSOR";
|
44
|
-
AMBIENTPROCESSOR: "AMBIENTPROCESSOR";
|
45
|
-
M0: "M0";
|
46
|
-
MORPHOSUPPLY: "MORPHOSUPPLY";
|
47
|
-
SYNCSWAP_VAULT: "SYNCSWAP_VAULT";
|
48
|
-
}>;
|
20
|
+
type: import("@sinclair/typebox").TString;
|
49
21
|
subType: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
|
50
22
|
rewardTokenAddress: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
51
23
|
amount: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
@@ -69,35 +41,7 @@ export declare const FilledCampaignDto: import("@sinclair/typebox").TObject<{
|
|
69
41
|
campaignId: import("@sinclair/typebox").TString;
|
70
42
|
identifier: import("@sinclair/typebox").TString;
|
71
43
|
creatorAddress: import("@sinclair/typebox").TString;
|
72
|
-
type: import("@sinclair/typebox").
|
73
|
-
INVALID: "INVALID";
|
74
|
-
ERC20: "ERC20";
|
75
|
-
CLAMM: "CLAMM";
|
76
|
-
ERC20_SNAPSHOT: "ERC20_SNAPSHOT";
|
77
|
-
JSON_AIRDROP: "JSON_AIRDROP";
|
78
|
-
SILO: "SILO";
|
79
|
-
RADIANT: "RADIANT";
|
80
|
-
MORPHO: "MORPHO";
|
81
|
-
DOLOMITE: "DOLOMITE";
|
82
|
-
BADGER: "BADGER";
|
83
|
-
COMPOUND: "COMPOUND";
|
84
|
-
AJNA: "AJNA";
|
85
|
-
EULER: "EULER";
|
86
|
-
UNISWAP_V4: "UNISWAP_V4";
|
87
|
-
ION: "ION";
|
88
|
-
EIGENLAYER: "EIGENLAYER";
|
89
|
-
ERC20TRANSFERS: "ERC20TRANSFERS";
|
90
|
-
ERC20LOGPROCESSOR: "ERC20LOGPROCESSOR";
|
91
|
-
ERC20REBASELOGPROCESSOR: "ERC20REBASELOGPROCESSOR";
|
92
|
-
VEST: "VEST";
|
93
|
-
ERC20_FIX_APR: "ERC20_FIX_APR";
|
94
|
-
HYPERDRIVELOGPROCESSOR: "HYPERDRIVELOGPROCESSOR";
|
95
|
-
HYPERDRIVELOGFIXPROCESSOR: "HYPERDRIVELOGFIXPROCESSOR";
|
96
|
-
AMBIENTPROCESSOR: "AMBIENTPROCESSOR";
|
97
|
-
M0: "M0";
|
98
|
-
MORPHOSUPPLY: "MORPHOSUPPLY";
|
99
|
-
SYNCSWAP_VAULT: "SYNCSWAP_VAULT";
|
100
|
-
}>;
|
44
|
+
type: import("@sinclair/typebox").TString;
|
101
45
|
subType: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
|
102
46
|
rewardTokenAddress: import("@sinclair/typebox").TString;
|
103
47
|
amount: import("@sinclair/typebox").TString;
|
@@ -1,4 +1,3 @@
|
|
1
|
-
import { CampaignType } from "../../../../database/api/.generated";
|
2
1
|
import { t } from "elysia";
|
3
2
|
// ─── DTOs ────────────────────────────────────────────────────────────────────
|
4
3
|
export const DynamicDataSourceIdentifier = t.Object({
|
@@ -19,7 +18,7 @@ export const SimplifiedCampaignDto = t.Object({
|
|
19
18
|
campaignId: t.Optional(t.String()),
|
20
19
|
identifier: t.Optional(t.String()),
|
21
20
|
creatorAddress: t.Optional(t.String()),
|
22
|
-
type: t.
|
21
|
+
type: t.String(),
|
23
22
|
subType: t.Optional(t.Number()),
|
24
23
|
rewardTokenAddress: t.Optional(t.String()),
|
25
24
|
amount: t.Optional(t.String()),
|
@@ -43,7 +42,7 @@ export const FilledCampaignDto = t.Object({
|
|
43
42
|
campaignId: t.String(),
|
44
43
|
identifier: t.String(),
|
45
44
|
creatorAddress: t.String(),
|
46
|
-
type: t.
|
45
|
+
type: t.String(),
|
47
46
|
subType: t.Optional(t.Number()),
|
48
47
|
rewardTokenAddress: t.String(),
|
49
48
|
amount: t.String(),
|
@@ -1,5 +1,4 @@
|
|
1
|
-
import {
|
2
|
-
import { Campaign, type ChainId } from "@sdk";
|
1
|
+
import { type ChainId } from "@sdk";
|
3
2
|
import { type GetCampaignQueryModel } from "../campaign";
|
4
3
|
import type { FilledCampaignDtoModel, SimplifiedCampaignDtoModel } from "./dynamicData.model";
|
5
4
|
type output = {
|
@@ -19,11 +18,5 @@ export declare class DynamicDataService {
|
|
19
18
|
static queryDynamicData(campaign: SimplifiedCampaignDtoModel): Promise<any[]>;
|
20
19
|
static queryDynamicDataFromCampaignId(query: GetCampaignQueryModel): Promise<any[]>;
|
21
20
|
static queryDynamicDataFromManyCampaignId(query: GetCampaignQueryModel): Promise<any[]>;
|
22
|
-
/**
|
23
|
-
* Returns the campaign type index from the CampaignType enum
|
24
|
-
* @param type CampaignType as db-related enum for v4
|
25
|
-
* @returns index of Campaign enum from sdk
|
26
|
-
*/
|
27
|
-
static getV3FromType(type: CampaignType): Campaign;
|
28
21
|
}
|
29
22
|
export {};
|
@@ -1,10 +1,9 @@
|
|
1
1
|
import { campaignsDynamicData } from "../../../libs/campaigns/campaignsDynamicData";
|
2
2
|
import { executeSimple } from "../../../utils/execute";
|
3
3
|
import { log } from "../../../utils/logger";
|
4
|
-
import { CampaignType } from "../../../../database/api/.generated";
|
5
4
|
import { Campaign, NETWORK_LABELS } from "@sdk";
|
6
5
|
import { utils } from "ethers";
|
7
|
-
import { CampaignService
|
6
|
+
import { CampaignService } from "../campaign";
|
8
7
|
import { CampaignRepository } from "../campaign/campaign.repository";
|
9
8
|
import { OpportunityService } from "../opportunity";
|
10
9
|
export class DynamicDataService {
|
@@ -117,17 +116,9 @@ export class DynamicDataService {
|
|
117
116
|
const formattedCampaigns = campaigns.map(campaign => DynamicDataService.generateDummyData(CampaignService.format(campaign)));
|
118
117
|
return DynamicDataService.#getMultipleDynamicData(formattedCampaigns);
|
119
118
|
}
|
120
|
-
/**
|
121
|
-
* Returns the campaign type index from the CampaignType enum
|
122
|
-
* @param type CampaignType as db-related enum for v4
|
123
|
-
* @returns index of Campaign enum from sdk
|
124
|
-
*/
|
125
|
-
static getV3FromType(type) {
|
126
|
-
return Object.entries(campaignTypeToEnumMap).find(([v4]) => v4 === type)?.[1];
|
127
|
-
}
|
128
119
|
static async #getDynamicData(campaign) {
|
129
120
|
// const campaignType = DynamicDataService.getV3FromType(campaign.type);
|
130
|
-
if (campaign.type !==
|
121
|
+
if (campaign.type !== "INVALID") {
|
131
122
|
return await CampaignService.fetchDynamicData(campaign.computeChainId, campaign.type, [campaign]);
|
132
123
|
}
|
133
124
|
}
|
@@ -136,12 +127,12 @@ export class DynamicDataService {
|
|
136
127
|
// const campaignType = DynamicDataService.getV3FromType(campaign.type);
|
137
128
|
const campaign = campaigns[0];
|
138
129
|
const filteredCampaigns = campaigns.filter(c => c.type === campaign.type);
|
139
|
-
if (campaign.type !==
|
130
|
+
if (campaign.type !== Campaign[Campaign.INVALID]) {
|
140
131
|
const resultDynamicData = await CampaignService.fetchDynamicData(campaign.computeChainId, campaign.type, filteredCampaigns);
|
141
132
|
for (const campaign of campaigns) {
|
142
133
|
const resultMetaData = await OpportunityService.fakeCreateFromCampaign({
|
143
134
|
...campaign,
|
144
|
-
type:
|
135
|
+
type: Campaign[campaign.type],
|
145
136
|
params: JSON.stringify(campaign.campaignParameters),
|
146
137
|
creator: campaign.creatorAddress,
|
147
138
|
});
|
@@ -21,7 +21,7 @@ export declare const OpportunityController: Elysia<"/opportunities", false, {
|
|
21
21
|
depositUrl?: string | undefined;
|
22
22
|
protocols?: string[] | undefined;
|
23
23
|
mainProtocol?: string | undefined;
|
24
|
-
type:
|
24
|
+
type: string;
|
25
25
|
tokens: {
|
26
26
|
chainId: number;
|
27
27
|
address: string;
|
@@ -29,7 +29,7 @@ export declare const OpportunityController: Elysia<"/opportunities", false, {
|
|
29
29
|
status: "NONE" | "PAST" | "LIVE" | "SOON";
|
30
30
|
identifier: string;
|
31
31
|
chainId: number;
|
32
|
-
action: "
|
32
|
+
action: "POOL" | "HOLD" | "DROP" | "LEND" | "BORROW" | "LONG" | "SHORT" | "INVALID";
|
33
33
|
};
|
34
34
|
params: {};
|
35
35
|
query: unknown;
|
@@ -39,7 +39,7 @@ export declare const OpportunityController: Elysia<"/opportunities", false, {
|
|
39
39
|
response: {
|
40
40
|
200: {
|
41
41
|
name: string;
|
42
|
-
type:
|
42
|
+
type: string;
|
43
43
|
id: string;
|
44
44
|
status: import("../../../../database/api/.generated").$Enums.Status;
|
45
45
|
tags: string[];
|
@@ -73,7 +73,7 @@ export declare const OpportunityController: Elysia<"/opportunities", false, {
|
|
73
73
|
200: {
|
74
74
|
id: string;
|
75
75
|
chainId: number;
|
76
|
-
type:
|
76
|
+
type: string;
|
77
77
|
identifier: string;
|
78
78
|
name: string;
|
79
79
|
status: "PAST" | "LIVE" | "SOON";
|
@@ -203,7 +203,7 @@ export declare const OpportunityController: Elysia<"/opportunities", false, {
|
|
203
203
|
icon: string;
|
204
204
|
} | undefined;
|
205
205
|
name: string;
|
206
|
-
type:
|
206
|
+
type: string;
|
207
207
|
status: import("../../../../database/api/.generated").$Enums.Status;
|
208
208
|
tags: string[];
|
209
209
|
identifier: string;
|
@@ -364,7 +364,7 @@ export declare const OpportunityController: Elysia<"/opportunities", false, {
|
|
364
364
|
body: unknown;
|
365
365
|
params: {};
|
366
366
|
query: {
|
367
|
-
type?:
|
367
|
+
type?: string | undefined;
|
368
368
|
items?: number | undefined;
|
369
369
|
subType?: number | undefined;
|
370
370
|
page?: number | undefined;
|
@@ -501,12 +501,13 @@ export declare const OpportunityController: Elysia<"/opportunities", false, {
|
|
501
501
|
computedUntil: bigint;
|
502
502
|
processingStarted: bigint;
|
503
503
|
};
|
504
|
+
creatorAddress: string;
|
504
505
|
Creator: {
|
505
506
|
tags: string[];
|
506
507
|
address: string;
|
507
508
|
creatorId: string | null;
|
508
509
|
};
|
509
|
-
type:
|
510
|
+
type: string;
|
510
511
|
id: string;
|
511
512
|
subType: number | null;
|
512
513
|
startTimestamp: bigint;
|
@@ -517,7 +518,6 @@ export declare const OpportunityController: Elysia<"/opportunities", false, {
|
|
517
518
|
rewardTokenId: string;
|
518
519
|
amount: string;
|
519
520
|
opportunityId: string;
|
520
|
-
creatorAddress: string;
|
521
521
|
}[];
|
522
522
|
})[];
|
523
523
|
readonly 404: {
|
@@ -821,7 +821,7 @@ export declare const OpportunityController: Elysia<"/opportunities", false, {
|
|
821
821
|
response: {
|
822
822
|
200: {
|
823
823
|
name: string;
|
824
|
-
type:
|
824
|
+
type: string;
|
825
825
|
id: string;
|
826
826
|
status: import("../../../../database/api/.generated").$Enums.Status;
|
827
827
|
tags: string[];
|
@@ -5,7 +5,7 @@ import { type Protocol, type ProtocolId } from "../protocol/protocol.model";
|
|
5
5
|
import { type DailyRewardsRecord } from "../reward/reward.model";
|
6
6
|
import { type Token } from "../token/token.model";
|
7
7
|
import { type TvlRecord } from "../tvl/tvl.model";
|
8
|
-
import {
|
8
|
+
import { OpportunityAction } from "../../../../database/api/.generated";
|
9
9
|
import type { ChainId } from "@sdk";
|
10
10
|
import { type Chain } from "../chain/chain.model";
|
11
11
|
import type { OpportunityRepository } from "./opportunity.repository";
|
@@ -37,7 +37,7 @@ export type OpportunityMetadata = {
|
|
37
37
|
};
|
38
38
|
export type OpportunityUnique = {
|
39
39
|
chainId: ChainId;
|
40
|
-
type:
|
40
|
+
type: string;
|
41
41
|
identifier: string;
|
42
42
|
};
|
43
43
|
export declare const OpportunityResourceDto: import("@sinclair/typebox").TObject<{
|
@@ -301,35 +301,7 @@ export declare const GetOpportunityQueryDto: import("@sinclair/typebox").TObject
|
|
301
301
|
}>;
|
302
302
|
export declare const CreateOpportunityDto: import("@sinclair/typebox").TObject<{
|
303
303
|
chainId: import("@sinclair/typebox").TNumber;
|
304
|
-
type: import("@sinclair/typebox").
|
305
|
-
INVALID: "INVALID";
|
306
|
-
ERC20: "ERC20";
|
307
|
-
CLAMM: "CLAMM";
|
308
|
-
ERC20_SNAPSHOT: "ERC20_SNAPSHOT";
|
309
|
-
JSON_AIRDROP: "JSON_AIRDROP";
|
310
|
-
SILO: "SILO";
|
311
|
-
RADIANT: "RADIANT";
|
312
|
-
MORPHO: "MORPHO";
|
313
|
-
DOLOMITE: "DOLOMITE";
|
314
|
-
BADGER: "BADGER";
|
315
|
-
COMPOUND: "COMPOUND";
|
316
|
-
AJNA: "AJNA";
|
317
|
-
EULER: "EULER";
|
318
|
-
UNISWAP_V4: "UNISWAP_V4";
|
319
|
-
ION: "ION";
|
320
|
-
EIGENLAYER: "EIGENLAYER";
|
321
|
-
ERC20TRANSFERS: "ERC20TRANSFERS";
|
322
|
-
ERC20LOGPROCESSOR: "ERC20LOGPROCESSOR";
|
323
|
-
ERC20REBASELOGPROCESSOR: "ERC20REBASELOGPROCESSOR";
|
324
|
-
VEST: "VEST";
|
325
|
-
ERC20_FIX_APR: "ERC20_FIX_APR";
|
326
|
-
HYPERDRIVELOGPROCESSOR: "HYPERDRIVELOGPROCESSOR";
|
327
|
-
HYPERDRIVELOGFIXPROCESSOR: "HYPERDRIVELOGFIXPROCESSOR";
|
328
|
-
AMBIENTPROCESSOR: "AMBIENTPROCESSOR";
|
329
|
-
M0: "M0";
|
330
|
-
MORPHOSUPPLY: "MORPHOSUPPLY";
|
331
|
-
SYNCSWAP_VAULT: "SYNCSWAP_VAULT";
|
332
|
-
}>;
|
304
|
+
type: import("@sinclair/typebox").TString;
|
333
305
|
identifier: import("@sinclair/typebox").TString;
|
334
306
|
name: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
335
307
|
status: import("@sinclair/typebox").TEnum<{
|
@@ -4,7 +4,7 @@ import { ProtocolResourceDto } from "../protocol/protocol.model";
|
|
4
4
|
import { DailyRewardsRecordResourceDto } from "../reward/reward.model";
|
5
5
|
import { TokenDto, TokenResourceDto } from "../token/token.model";
|
6
6
|
import { TvlRecordResourceDto } from "../tvl/tvl.model";
|
7
|
-
import {
|
7
|
+
import { OpportunityAction, Status } from "../../../../database/api/.generated";
|
8
8
|
import { t } from "elysia";
|
9
9
|
import { ChainResourceDto } from "../chain/chain.model";
|
10
10
|
// ─── DTOs ────────────────────────────────────────────────────────────────────
|
@@ -83,7 +83,7 @@ export const GetOpportunityQueryDto = t.Object({
|
|
83
83
|
});
|
84
84
|
export const CreateOpportunityDto = t.Object({
|
85
85
|
chainId: t.Number(),
|
86
|
-
type: t.
|
86
|
+
type: t.String(),
|
87
87
|
identifier: t.String(),
|
88
88
|
name: t.Optional(t.String()),
|
89
89
|
status: t.Enum(Status),
|
@@ -9,7 +9,7 @@ export declare abstract class OpportunityRepository {
|
|
9
9
|
#private;
|
10
10
|
static create(newOpp: CreateOpportunityModel, upsert?: boolean): Promise<{
|
11
11
|
name: string;
|
12
|
-
type:
|
12
|
+
type: string;
|
13
13
|
id: string;
|
14
14
|
status: import("../../../../database/api/.generated").$Enums.Status;
|
15
15
|
tags: string[];
|
@@ -43,7 +43,7 @@ export declare abstract class OpportunityRepository {
|
|
43
43
|
price: number | null;
|
44
44
|
};
|
45
45
|
} & {
|
46
|
-
type:
|
46
|
+
type: string;
|
47
47
|
id: string;
|
48
48
|
params: Prisma.JsonValue;
|
49
49
|
subType: number | null;
|
@@ -156,7 +156,7 @@ export declare abstract class OpportunityRepository {
|
|
156
156
|
})[];
|
157
157
|
} & {
|
158
158
|
name: string;
|
159
|
-
type:
|
159
|
+
type: string;
|
160
160
|
id: string;
|
161
161
|
status: import("../../../../database/api/.generated").$Enums.Status;
|
162
162
|
tags: string[];
|
@@ -274,7 +274,7 @@ export declare abstract class OpportunityRepository {
|
|
274
274
|
})[];
|
275
275
|
} & {
|
276
276
|
name: string;
|
277
|
-
type:
|
277
|
+
type: string;
|
278
278
|
id: string;
|
279
279
|
status: import("../../../../database/api/.generated").$Enums.Status;
|
280
280
|
tags: string[];
|
@@ -309,6 +309,11 @@ export declare abstract class OpportunityRepository {
|
|
309
309
|
computedUntil: bigint;
|
310
310
|
processingStarted: bigint;
|
311
311
|
}[];
|
312
|
+
Creator: {
|
313
|
+
tags: string[];
|
314
|
+
address: string;
|
315
|
+
creatorId: string | null;
|
316
|
+
};
|
312
317
|
ComputeChain: {
|
313
318
|
name: string;
|
314
319
|
id: number;
|
@@ -340,7 +345,7 @@ export declare abstract class OpportunityRepository {
|
|
340
345
|
price: number | null;
|
341
346
|
};
|
342
347
|
} & {
|
343
|
-
type:
|
348
|
+
type: string;
|
344
349
|
id: string;
|
345
350
|
params: Prisma.JsonValue;
|
346
351
|
subType: number | null;
|
@@ -453,7 +458,7 @@ export declare abstract class OpportunityRepository {
|
|
453
458
|
})[];
|
454
459
|
} & {
|
455
460
|
name: string;
|
456
|
-
type:
|
461
|
+
type: string;
|
457
462
|
id: string;
|
458
463
|
status: import("../../../../database/api/.generated").$Enums.Status;
|
459
464
|
tags: string[];
|
@@ -493,6 +498,11 @@ export declare abstract class OpportunityRepository {
|
|
493
498
|
computedUntil: bigint;
|
494
499
|
processingStarted: bigint;
|
495
500
|
}[];
|
501
|
+
Creator: {
|
502
|
+
tags: string[];
|
503
|
+
address: string;
|
504
|
+
creatorId: string | null;
|
505
|
+
};
|
496
506
|
ComputeChain: {
|
497
507
|
name: string;
|
498
508
|
id: number;
|
@@ -524,7 +534,7 @@ export declare abstract class OpportunityRepository {
|
|
524
534
|
price: number | null;
|
525
535
|
};
|
526
536
|
} & {
|
527
|
-
type:
|
537
|
+
type: string;
|
528
538
|
id: string;
|
529
539
|
params: Prisma.JsonValue;
|
530
540
|
subType: number | null;
|
@@ -637,7 +647,7 @@ export declare abstract class OpportunityRepository {
|
|
637
647
|
})[];
|
638
648
|
} & {
|
639
649
|
name: string;
|
640
|
-
type:
|
650
|
+
type: string;
|
641
651
|
id: string;
|
642
652
|
status: import("../../../../database/api/.generated").$Enums.Status;
|
643
653
|
tags: string[];
|
@@ -666,7 +676,7 @@ export declare abstract class OpportunityRepository {
|
|
666
676
|
price: number | null;
|
667
677
|
};
|
668
678
|
} & {
|
669
|
-
type:
|
679
|
+
type: string;
|
670
680
|
id: string;
|
671
681
|
params: Prisma.JsonValue;
|
672
682
|
subType: number | null;
|
@@ -682,7 +692,7 @@ export declare abstract class OpportunityRepository {
|
|
682
692
|
})[];
|
683
693
|
} & {
|
684
694
|
name: string;
|
685
|
-
type:
|
695
|
+
type: string;
|
686
696
|
id: string;
|
687
697
|
status: import("../../../../database/api/.generated").$Enums.Status;
|
688
698
|
tags: string[];
|
@@ -800,7 +810,7 @@ export declare abstract class OpportunityRepository {
|
|
800
810
|
})[];
|
801
811
|
} & {
|
802
812
|
name: string;
|
803
|
-
type:
|
813
|
+
type: string;
|
804
814
|
id: string;
|
805
815
|
status: import("../../../../database/api/.generated").$Enums.Status;
|
806
816
|
tags: string[];
|
@@ -828,6 +838,11 @@ export declare abstract class OpportunityRepository {
|
|
828
838
|
computedUntil: bigint;
|
829
839
|
processingStarted: bigint;
|
830
840
|
}[];
|
841
|
+
Creator: {
|
842
|
+
tags: string[];
|
843
|
+
address: string;
|
844
|
+
creatorId: string | null;
|
845
|
+
};
|
831
846
|
ComputeChain: {
|
832
847
|
name: string;
|
833
848
|
id: number;
|
@@ -852,7 +867,7 @@ export declare abstract class OpportunityRepository {
|
|
852
867
|
price: number | null;
|
853
868
|
};
|
854
869
|
} & {
|
855
|
-
type:
|
870
|
+
type: string;
|
856
871
|
id: string;
|
857
872
|
params: Prisma.JsonValue;
|
858
873
|
subType: number | null;
|
@@ -965,7 +980,7 @@ export declare abstract class OpportunityRepository {
|
|
965
980
|
})[];
|
966
981
|
} & {
|
967
982
|
name: string;
|
968
|
-
type:
|
983
|
+
type: string;
|
969
984
|
id: string;
|
970
985
|
status: import("../../../../database/api/.generated").$Enums.Status;
|
971
986
|
tags: string[];
|
@@ -1025,7 +1040,7 @@ export declare abstract class OpportunityRepository {
|
|
1025
1040
|
};
|
1026
1041
|
opportunity: {
|
1027
1042
|
name: string;
|
1028
|
-
type:
|
1043
|
+
type: string;
|
1029
1044
|
id: string;
|
1030
1045
|
status: import("../../../../database/api/.generated").$Enums.Status;
|
1031
1046
|
tags: string[];
|
@@ -1041,7 +1056,7 @@ export declare abstract class OpportunityRepository {
|
|
1041
1056
|
}>;
|
1042
1057
|
static updateStatus(id: string, status: Status): Promise<{
|
1043
1058
|
name: string;
|
1044
|
-
type:
|
1059
|
+
type: string;
|
1045
1060
|
id: string;
|
1046
1061
|
status: import("../../../../database/api/.generated").$Enums.Status;
|
1047
1062
|
tags: string[];
|
@@ -1056,7 +1071,7 @@ export declare abstract class OpportunityRepository {
|
|
1056
1071
|
}>;
|
1057
1072
|
static updateName(id: string, name: string): Promise<{
|
1058
1073
|
name: string;
|
1059
|
-
type:
|
1074
|
+
type: string;
|
1060
1075
|
id: string;
|
1061
1076
|
status: import("../../../../database/api/.generated").$Enums.Status;
|
1062
1077
|
tags: string[];
|
@@ -1071,7 +1086,7 @@ export declare abstract class OpportunityRepository {
|
|
1071
1086
|
}>;
|
1072
1087
|
static updateChainId(id: string, chainId: MerklChainId): Promise<{
|
1073
1088
|
name: string;
|
1074
|
-
type:
|
1089
|
+
type: string;
|
1075
1090
|
id: string;
|
1076
1091
|
status: import("../../../../database/api/.generated").$Enums.Status;
|
1077
1092
|
tags: string[];
|
@@ -1095,7 +1110,7 @@ export declare abstract class OpportunityRepository {
|
|
1095
1110
|
}>;
|
1096
1111
|
static update(id: string, data: UpdateOpportunityModel): Promise<{
|
1097
1112
|
name: string;
|
1098
|
-
type:
|
1113
|
+
type: string;
|
1099
1114
|
id: string;
|
1100
1115
|
status: import("../../../../database/api/.generated").$Enums.Status;
|
1101
1116
|
tags: string[];
|
@@ -164,6 +164,7 @@ export class OpportunityRepository {
|
|
164
164
|
Explorer: true,
|
165
165
|
},
|
166
166
|
},
|
167
|
+
Creator: true,
|
167
168
|
CampaignStatus: true, // [][0]
|
168
169
|
},
|
169
170
|
orderBy: {
|
@@ -210,6 +211,7 @@ export class OpportunityRepository {
|
|
210
211
|
Explorer: true,
|
211
212
|
},
|
212
213
|
},
|
214
|
+
Creator: true,
|
213
215
|
CampaignStatus: true, // [][0]
|
214
216
|
},
|
215
217
|
orderBy: {
|
@@ -301,7 +303,13 @@ export class OpportunityRepository {
|
|
301
303
|
include: {
|
302
304
|
...OpportunityRepository.#getRecordInclusion(),
|
303
305
|
Campaigns: {
|
304
|
-
include: {
|
306
|
+
include: {
|
307
|
+
RewardToken: true,
|
308
|
+
ComputeChain: true,
|
309
|
+
DistributionChain: true,
|
310
|
+
CampaignStatus: true,
|
311
|
+
Creator: true,
|
312
|
+
},
|
305
313
|
take: 1,
|
306
314
|
orderBy: { endTimestamp: "desc" },
|
307
315
|
},
|