@merkl/api 1.1.13 → 1.1.15
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/constants.d.ts +61 -0
- package/dist/src/eden/index.d.ts +895 -5238
- package/dist/src/engine/deprecated/dynamicData/implementations/default.d.ts +1 -1
- package/dist/src/engine/implementations/Aave/metadata.d.ts +1 -1
- package/dist/src/engine/implementations/Erc20/subTypes/index.d.ts +1 -2
- package/dist/src/engine/tvl/factory.d.ts +1 -1
- package/dist/src/index.d.ts +192 -2368
- package/dist/src/modules/v4/apr/apr.model.d.ts +0 -8
- package/dist/src/modules/v4/campaign/campaign.controller.d.ts +20 -396
- package/dist/src/modules/v4/campaign/campaign.convertor.d.ts +1 -2
- package/dist/src/modules/v4/campaign/campaign.model.d.ts +17 -15
- package/dist/src/modules/v4/campaign/campaign.repository.d.ts +60 -63
- package/dist/src/modules/v4/campaign/campaign.service.d.ts +34 -54
- package/dist/src/modules/v4/campaign/campaign.test.controller.d.ts +44 -1168
- package/dist/src/modules/v4/dynamicData/dynamicData.service.d.ts +1 -14
- package/dist/src/modules/v4/opportunity/opportunity.controller.d.ts +46 -264
- package/dist/src/modules/v4/opportunity/opportunity.converter.d.ts +0 -6
- package/dist/src/modules/v4/opportunity/opportunity.formatter.d.ts +6 -3
- package/dist/src/modules/v4/opportunity/opportunity.model.d.ts +21 -73
- package/dist/src/modules/v4/opportunity/opportunity.repository.d.ts +34 -21
- package/dist/src/modules/v4/opportunity/opportunity.service.d.ts +40 -38
- package/dist/src/modules/v4/payload/payload.controller.d.ts +16 -468
- package/dist/src/modules/v4/payload/payload.model.d.ts +1 -10
- package/dist/src/modules/v4/payload/payload.service.d.ts +12 -379
- package/dist/src/modules/v4/programPayload/programPayload.controller.d.ts +3 -17
- package/dist/src/modules/v4/programPayload/programPayload.model.d.ts +1 -1
- package/dist/src/modules/v4/programPayload/programPayload.repository.d.ts +7 -429
- package/dist/src/modules/v4/programPayload/programPayload.service.d.ts +2 -1
- package/dist/src/modules/v4/programPayload/subPayloads/hypurrFi.d.ts +3 -11
- package/dist/src/modules/v4/reward/reward.controller.d.ts +3 -3
- package/dist/src/modules/v4/reward/reward.model.d.ts +4 -18
- package/dist/src/modules/v4/reward/reward.repository.d.ts +4 -2
- package/dist/src/modules/v4/reward/reward.service.d.ts +26 -13
- package/dist/src/modules/v4/router.d.ts +191 -2364
- package/dist/src/modules/v4/token/token.controller.d.ts +22 -14
- package/dist/src/modules/v4/token/token.model.d.ts +5 -15
- package/dist/src/modules/v4/token/token.repository.d.ts +11 -7
- package/dist/src/modules/v4/user/user.controller.d.ts +4 -2
- package/dist/src/routes/v3/opportunity.d.ts +0 -3
- package/dist/src/routes/v3/payload.d.ts +1 -1
- package/dist/src/routes/v3/router.d.ts +1 -4
- package/dist/src/utils/parseDistributionType.d.ts +1 -2
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/dist/src/engine/implementations/Erc20/subTypes/implementations/ERC4626/metadata.d.ts +0 -31
- package/dist/src/engine/implementations/Erc20/subTypes/implementations/ERC4626/tvl.d.ts +0 -6
- package/dist/src/modules/v4/token/token.service.d.ts +0 -348
- package/dist/src/modules/v4/transaction/transaction.model.d.ts +0 -17
@@ -42,9 +42,10 @@ export declare abstract class OpportunityFormatter {
|
|
42
42
|
address: string;
|
43
43
|
id: string;
|
44
44
|
chainId: number;
|
45
|
-
type: import("@package/databases").TokenType;
|
46
45
|
icon: string;
|
47
46
|
isNative: boolean;
|
47
|
+
isPoint: boolean;
|
48
|
+
isPreTGE: boolean;
|
48
49
|
isTest: boolean;
|
49
50
|
verified: boolean;
|
50
51
|
displaySymbol: string;
|
@@ -62,9 +63,10 @@ export declare abstract class OpportunityFormatter {
|
|
62
63
|
address: string;
|
63
64
|
id: string;
|
64
65
|
chainId: number;
|
65
|
-
type: import("@package/databases").TokenType;
|
66
66
|
icon: string;
|
67
67
|
isNative: boolean;
|
68
|
+
isPoint: boolean;
|
69
|
+
isPreTGE: boolean;
|
68
70
|
isTest: boolean;
|
69
71
|
verified: boolean;
|
70
72
|
} & {
|
@@ -110,9 +112,10 @@ export declare abstract class OpportunityFormatter {
|
|
110
112
|
address: string;
|
111
113
|
id: string;
|
112
114
|
chainId: number;
|
113
|
-
type: import("@package/databases").TokenType;
|
114
115
|
icon: string;
|
115
116
|
isNative: boolean;
|
117
|
+
isPoint: boolean;
|
118
|
+
isPreTGE: boolean;
|
116
119
|
isTest: boolean;
|
117
120
|
verified: boolean;
|
118
121
|
} & {
|
@@ -9,7 +9,7 @@ import { type Token } from "../../../modules/v4/token/token.model";
|
|
9
9
|
import { type TvlRecord } from "../../../modules/v4/tvl/tvl.model";
|
10
10
|
import type { OpportunityRepository } from "./opportunity.repository";
|
11
11
|
/**
|
12
|
-
*
|
12
|
+
* Opportunity
|
13
13
|
* @description Target description of rewards campaigns
|
14
14
|
* @see {@link ResourceAPI}
|
15
15
|
*/
|
@@ -27,10 +27,10 @@ export type OpportunityLight = ResourceAPI<"Opportunity", "manualOverrides" | "m
|
|
27
27
|
export type Opportunity = ResourceAPI<"Opportunity", "manualOverrides" | "mainProtocolId", {
|
28
28
|
depositUrl?: string;
|
29
29
|
explorerAddress?: string;
|
30
|
-
lastCampaignCreatedAt: number;
|
31
30
|
mainProtocolId?: string;
|
32
31
|
chain: Chain["model"];
|
33
32
|
tokens: Token["model"][];
|
33
|
+
lastCampaignCreatedAt: number;
|
34
34
|
protocol?: Protocol["model"];
|
35
35
|
aprRecord?: AprRecord["model"];
|
36
36
|
tvlRecord?: TvlRecord["model"];
|
@@ -64,10 +64,6 @@ export declare const OpportunityResourceDto: import("@sinclair/typebox").TObject
|
|
64
64
|
readonly FIX_REWARD_AMOUNT_PER_LIQUIDITY_VALUE: "FIX_REWARD_AMOUNT_PER_LIQUIDITY_VALUE";
|
65
65
|
readonly FIX_REWARD_VALUE_PER_LIQUIDITY_AMOUNT: "FIX_REWARD_VALUE_PER_LIQUIDITY_AMOUNT";
|
66
66
|
readonly FIX_REWARD_AMOUNT_PER_LIQUIDITY_AMOUNT: "FIX_REWARD_AMOUNT_PER_LIQUIDITY_AMOUNT";
|
67
|
-
readonly MAX_REWARD_VALUE_PER_LIQUIDITY_VALUE: "MAX_REWARD_VALUE_PER_LIQUIDITY_VALUE";
|
68
|
-
readonly MAX_REWARD_AMOUNT_PER_LIQUIDITY_VALUE: "MAX_REWARD_AMOUNT_PER_LIQUIDITY_VALUE";
|
69
|
-
readonly MAX_REWARD_VALUE_PER_LIQUIDITY_AMOUNT: "MAX_REWARD_VALUE_PER_LIQUIDITY_AMOUNT";
|
70
|
-
readonly MAX_REWARD_AMOUNT_PER_LIQUIDITY_AMOUNT: "MAX_REWARD_AMOUNT_PER_LIQUIDITY_AMOUNT";
|
71
67
|
}>>;
|
72
68
|
tags: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>;
|
73
69
|
id: import("@sinclair/typebox").TString;
|
@@ -81,13 +77,10 @@ export declare const OpportunityResourceDto: import("@sinclair/typebox").TObject
|
|
81
77
|
verified: import("@sinclair/typebox").TBoolean;
|
82
78
|
isNative: import("@sinclair/typebox").TBoolean;
|
83
79
|
isTest: import("@sinclair/typebox").TBoolean;
|
80
|
+
isPoint: import("@sinclair/typebox").TBoolean;
|
81
|
+
isPreTGE: import("@sinclair/typebox").TBoolean;
|
84
82
|
price: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TNumber, import("@sinclair/typebox").TNull]>>;
|
85
83
|
symbol: import("@sinclair/typebox").TString;
|
86
|
-
type: import("@sinclair/typebox").TEnum<{
|
87
|
-
readonly TOKEN: "TOKEN";
|
88
|
-
readonly PRETGE: "PRETGE";
|
89
|
-
readonly POINT: "POINT";
|
90
|
-
}>;
|
91
84
|
}>>;
|
92
85
|
chain: import("@sinclair/typebox").TObject<{
|
93
86
|
id: import("@sinclair/typebox").TNumber;
|
@@ -119,10 +112,6 @@ export declare const OpportunityResourceDto: import("@sinclair/typebox").TObject
|
|
119
112
|
readonly FIX_REWARD_AMOUNT_PER_LIQUIDITY_VALUE: "FIX_REWARD_AMOUNT_PER_LIQUIDITY_VALUE";
|
120
113
|
readonly FIX_REWARD_VALUE_PER_LIQUIDITY_AMOUNT: "FIX_REWARD_VALUE_PER_LIQUIDITY_AMOUNT";
|
121
114
|
readonly FIX_REWARD_AMOUNT_PER_LIQUIDITY_AMOUNT: "FIX_REWARD_AMOUNT_PER_LIQUIDITY_AMOUNT";
|
122
|
-
readonly MAX_REWARD_VALUE_PER_LIQUIDITY_VALUE: "MAX_REWARD_VALUE_PER_LIQUIDITY_VALUE";
|
123
|
-
readonly MAX_REWARD_AMOUNT_PER_LIQUIDITY_VALUE: "MAX_REWARD_AMOUNT_PER_LIQUIDITY_VALUE";
|
124
|
-
readonly MAX_REWARD_VALUE_PER_LIQUIDITY_AMOUNT: "MAX_REWARD_VALUE_PER_LIQUIDITY_AMOUNT";
|
125
|
-
readonly MAX_REWARD_AMOUNT_PER_LIQUIDITY_AMOUNT: "MAX_REWARD_AMOUNT_PER_LIQUIDITY_AMOUNT";
|
126
115
|
}>>;
|
127
116
|
}>>;
|
128
117
|
}>>;
|
@@ -154,13 +143,10 @@ export declare const OpportunityResourceDto: import("@sinclair/typebox").TObject
|
|
154
143
|
verified: import("@sinclair/typebox").TBoolean;
|
155
144
|
isNative: import("@sinclair/typebox").TBoolean;
|
156
145
|
isTest: import("@sinclair/typebox").TBoolean;
|
146
|
+
isPoint: import("@sinclair/typebox").TBoolean;
|
147
|
+
isPreTGE: import("@sinclair/typebox").TBoolean;
|
157
148
|
price: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TNumber, import("@sinclair/typebox").TNull]>>;
|
158
149
|
symbol: import("@sinclair/typebox").TString;
|
159
|
-
type: import("@sinclair/typebox").TEnum<{
|
160
|
-
readonly TOKEN: "TOKEN";
|
161
|
-
readonly PRETGE: "PRETGE";
|
162
|
-
readonly POINT: "POINT";
|
163
|
-
}>;
|
164
150
|
}>;
|
165
151
|
amount: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TBigInt, import("@sinclair/typebox").TString]>;
|
166
152
|
distributionType: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TEnum<{
|
@@ -169,10 +155,6 @@ export declare const OpportunityResourceDto: import("@sinclair/typebox").TObject
|
|
169
155
|
readonly FIX_REWARD_AMOUNT_PER_LIQUIDITY_VALUE: "FIX_REWARD_AMOUNT_PER_LIQUIDITY_VALUE";
|
170
156
|
readonly FIX_REWARD_VALUE_PER_LIQUIDITY_AMOUNT: "FIX_REWARD_VALUE_PER_LIQUIDITY_AMOUNT";
|
171
157
|
readonly FIX_REWARD_AMOUNT_PER_LIQUIDITY_AMOUNT: "FIX_REWARD_AMOUNT_PER_LIQUIDITY_AMOUNT";
|
172
|
-
readonly MAX_REWARD_VALUE_PER_LIQUIDITY_VALUE: "MAX_REWARD_VALUE_PER_LIQUIDITY_VALUE";
|
173
|
-
readonly MAX_REWARD_AMOUNT_PER_LIQUIDITY_VALUE: "MAX_REWARD_AMOUNT_PER_LIQUIDITY_VALUE";
|
174
|
-
readonly MAX_REWARD_VALUE_PER_LIQUIDITY_AMOUNT: "MAX_REWARD_VALUE_PER_LIQUIDITY_AMOUNT";
|
175
|
-
readonly MAX_REWARD_AMOUNT_PER_LIQUIDITY_AMOUNT: "MAX_REWARD_AMOUNT_PER_LIQUIDITY_AMOUNT";
|
176
158
|
}>>;
|
177
159
|
}>>;
|
178
160
|
}>>;
|
@@ -202,13 +184,10 @@ export declare const OpportunityWithCampaignsResourceDto: import("@sinclair/type
|
|
202
184
|
verified: import("@sinclair/typebox").TBoolean;
|
203
185
|
isNative: import("@sinclair/typebox").TBoolean;
|
204
186
|
isTest: import("@sinclair/typebox").TBoolean;
|
187
|
+
isPoint: import("@sinclair/typebox").TBoolean;
|
188
|
+
isPreTGE: import("@sinclair/typebox").TBoolean;
|
205
189
|
price: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TNumber, import("@sinclair/typebox").TNull]>>;
|
206
190
|
symbol: import("@sinclair/typebox").TString;
|
207
|
-
type: import("@sinclair/typebox").TEnum<{
|
208
|
-
readonly TOKEN: "TOKEN";
|
209
|
-
readonly PRETGE: "PRETGE";
|
210
|
-
readonly POINT: "POINT";
|
211
|
-
}>;
|
212
191
|
}>>;
|
213
192
|
tvl: import("@sinclair/typebox").TNumber;
|
214
193
|
description: import("@sinclair/typebox").TString;
|
@@ -259,10 +238,6 @@ export declare const OpportunityWithCampaignsResourceDto: import("@sinclair/type
|
|
259
238
|
readonly FIX_REWARD_AMOUNT_PER_LIQUIDITY_VALUE: "FIX_REWARD_AMOUNT_PER_LIQUIDITY_VALUE";
|
260
239
|
readonly FIX_REWARD_VALUE_PER_LIQUIDITY_AMOUNT: "FIX_REWARD_VALUE_PER_LIQUIDITY_AMOUNT";
|
261
240
|
readonly FIX_REWARD_AMOUNT_PER_LIQUIDITY_AMOUNT: "FIX_REWARD_AMOUNT_PER_LIQUIDITY_AMOUNT";
|
262
|
-
readonly MAX_REWARD_VALUE_PER_LIQUIDITY_VALUE: "MAX_REWARD_VALUE_PER_LIQUIDITY_VALUE";
|
263
|
-
readonly MAX_REWARD_AMOUNT_PER_LIQUIDITY_VALUE: "MAX_REWARD_AMOUNT_PER_LIQUIDITY_VALUE";
|
264
|
-
readonly MAX_REWARD_VALUE_PER_LIQUIDITY_AMOUNT: "MAX_REWARD_VALUE_PER_LIQUIDITY_AMOUNT";
|
265
|
-
readonly MAX_REWARD_AMOUNT_PER_LIQUIDITY_AMOUNT: "MAX_REWARD_AMOUNT_PER_LIQUIDITY_AMOUNT";
|
266
241
|
}>>;
|
267
242
|
}>>;
|
268
243
|
}>>;
|
@@ -272,10 +247,6 @@ export declare const OpportunityWithCampaignsResourceDto: import("@sinclair/type
|
|
272
247
|
readonly FIX_REWARD_AMOUNT_PER_LIQUIDITY_VALUE: "FIX_REWARD_AMOUNT_PER_LIQUIDITY_VALUE";
|
273
248
|
readonly FIX_REWARD_VALUE_PER_LIQUIDITY_AMOUNT: "FIX_REWARD_VALUE_PER_LIQUIDITY_AMOUNT";
|
274
249
|
readonly FIX_REWARD_AMOUNT_PER_LIQUIDITY_AMOUNT: "FIX_REWARD_AMOUNT_PER_LIQUIDITY_AMOUNT";
|
275
|
-
readonly MAX_REWARD_VALUE_PER_LIQUIDITY_VALUE: "MAX_REWARD_VALUE_PER_LIQUIDITY_VALUE";
|
276
|
-
readonly MAX_REWARD_AMOUNT_PER_LIQUIDITY_VALUE: "MAX_REWARD_AMOUNT_PER_LIQUIDITY_VALUE";
|
277
|
-
readonly MAX_REWARD_VALUE_PER_LIQUIDITY_AMOUNT: "MAX_REWARD_VALUE_PER_LIQUIDITY_AMOUNT";
|
278
|
-
readonly MAX_REWARD_AMOUNT_PER_LIQUIDITY_AMOUNT: "MAX_REWARD_AMOUNT_PER_LIQUIDITY_AMOUNT";
|
279
250
|
}>>;
|
280
251
|
identifier: import("@sinclair/typebox").TString;
|
281
252
|
howToSteps: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>;
|
@@ -311,13 +282,10 @@ export declare const OpportunityWithCampaignsResourceDto: import("@sinclair/type
|
|
311
282
|
verified: import("@sinclair/typebox").TBoolean;
|
312
283
|
isNative: import("@sinclair/typebox").TBoolean;
|
313
284
|
isTest: import("@sinclair/typebox").TBoolean;
|
285
|
+
isPoint: import("@sinclair/typebox").TBoolean;
|
286
|
+
isPreTGE: import("@sinclair/typebox").TBoolean;
|
314
287
|
price: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TNumber, import("@sinclair/typebox").TNull]>>;
|
315
288
|
symbol: import("@sinclair/typebox").TString;
|
316
|
-
type: import("@sinclair/typebox").TEnum<{
|
317
|
-
readonly TOKEN: "TOKEN";
|
318
|
-
readonly PRETGE: "PRETGE";
|
319
|
-
readonly POINT: "POINT";
|
320
|
-
}>;
|
321
289
|
}>;
|
322
290
|
amount: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TBigInt, import("@sinclair/typebox").TString]>;
|
323
291
|
distributionType: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TEnum<{
|
@@ -326,10 +294,6 @@ export declare const OpportunityWithCampaignsResourceDto: import("@sinclair/type
|
|
326
294
|
readonly FIX_REWARD_AMOUNT_PER_LIQUIDITY_VALUE: "FIX_REWARD_AMOUNT_PER_LIQUIDITY_VALUE";
|
327
295
|
readonly FIX_REWARD_VALUE_PER_LIQUIDITY_AMOUNT: "FIX_REWARD_VALUE_PER_LIQUIDITY_AMOUNT";
|
328
296
|
readonly FIX_REWARD_AMOUNT_PER_LIQUIDITY_AMOUNT: "FIX_REWARD_AMOUNT_PER_LIQUIDITY_AMOUNT";
|
329
|
-
readonly MAX_REWARD_VALUE_PER_LIQUIDITY_VALUE: "MAX_REWARD_VALUE_PER_LIQUIDITY_VALUE";
|
330
|
-
readonly MAX_REWARD_AMOUNT_PER_LIQUIDITY_VALUE: "MAX_REWARD_AMOUNT_PER_LIQUIDITY_VALUE";
|
331
|
-
readonly MAX_REWARD_VALUE_PER_LIQUIDITY_AMOUNT: "MAX_REWARD_VALUE_PER_LIQUIDITY_AMOUNT";
|
332
|
-
readonly MAX_REWARD_AMOUNT_PER_LIQUIDITY_AMOUNT: "MAX_REWARD_AMOUNT_PER_LIQUIDITY_AMOUNT";
|
333
297
|
}>>;
|
334
298
|
}>>;
|
335
299
|
}>>;
|
@@ -374,13 +338,10 @@ export declare const OpportunityWithCampaignsResourceDto: import("@sinclair/type
|
|
374
338
|
verified: import("@sinclair/typebox").TBoolean;
|
375
339
|
isNative: import("@sinclair/typebox").TBoolean;
|
376
340
|
isTest: import("@sinclair/typebox").TBoolean;
|
341
|
+
isPoint: import("@sinclair/typebox").TBoolean;
|
342
|
+
isPreTGE: import("@sinclair/typebox").TBoolean;
|
377
343
|
price: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TNumber, import("@sinclair/typebox").TNull]>>;
|
378
344
|
symbol: import("@sinclair/typebox").TString;
|
379
|
-
type: import("@sinclair/typebox").TEnum<{
|
380
|
-
readonly TOKEN: "TOKEN";
|
381
|
-
readonly PRETGE: "PRETGE";
|
382
|
-
readonly POINT: "POINT";
|
383
|
-
}>;
|
384
345
|
}>;
|
385
346
|
distributionChain: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
|
386
347
|
id: import("@sinclair/typebox").TNumber;
|
@@ -401,10 +362,6 @@ export declare const OpportunityWithCampaignsResourceDto: import("@sinclair/type
|
|
401
362
|
readonly FIX_REWARD_AMOUNT_PER_LIQUIDITY_VALUE: "FIX_REWARD_AMOUNT_PER_LIQUIDITY_VALUE";
|
402
363
|
readonly FIX_REWARD_VALUE_PER_LIQUIDITY_AMOUNT: "FIX_REWARD_VALUE_PER_LIQUIDITY_AMOUNT";
|
403
364
|
readonly FIX_REWARD_AMOUNT_PER_LIQUIDITY_AMOUNT: "FIX_REWARD_AMOUNT_PER_LIQUIDITY_AMOUNT";
|
404
|
-
readonly MAX_REWARD_VALUE_PER_LIQUIDITY_VALUE: "MAX_REWARD_VALUE_PER_LIQUIDITY_VALUE";
|
405
|
-
readonly MAX_REWARD_AMOUNT_PER_LIQUIDITY_VALUE: "MAX_REWARD_AMOUNT_PER_LIQUIDITY_VALUE";
|
406
|
-
readonly MAX_REWARD_VALUE_PER_LIQUIDITY_AMOUNT: "MAX_REWARD_VALUE_PER_LIQUIDITY_AMOUNT";
|
407
|
-
readonly MAX_REWARD_AMOUNT_PER_LIQUIDITY_AMOUNT: "MAX_REWARD_AMOUNT_PER_LIQUIDITY_AMOUNT";
|
408
365
|
}>>;
|
409
366
|
campaignStatus: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
|
410
367
|
computedUntil: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNumber]>;
|
@@ -425,22 +382,20 @@ export declare const OpportunityUniqueUpdateDto: import("@sinclair/typebox").TOb
|
|
425
382
|
id: import("@sinclair/typebox").TString;
|
426
383
|
campaignId: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
427
384
|
}>;
|
428
|
-
export declare const
|
385
|
+
export declare const AggregationResourceDto: import("@sinclair/typebox").TObject<{
|
386
|
+
sum: import("@sinclair/typebox").TNumber;
|
387
|
+
}>;
|
388
|
+
export declare const GetOpportunitiesQueryDto: import("@sinclair/typebox").TObject<{
|
429
389
|
name: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
430
390
|
search: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
431
391
|
campaignId: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
432
392
|
chainId: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TRegExp>;
|
433
393
|
action: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
434
|
-
tokenTypes: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TEnum<{
|
435
|
-
readonly TOKEN: "TOKEN";
|
436
|
-
readonly PRETGE: "PRETGE";
|
437
|
-
readonly POINT: "POINT";
|
438
|
-
}>>>;
|
439
|
-
point: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
|
440
394
|
type: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
441
395
|
creatorAddress: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
442
396
|
tags: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
443
397
|
test: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
|
398
|
+
point: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
|
444
399
|
minimumTvl: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
|
445
400
|
maximumTvl: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
|
446
401
|
minimumApr: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
|
@@ -452,11 +407,6 @@ export declare const FindManyOpportunityDto: import("@sinclair/typebox").TObject
|
|
452
407
|
rewardTokenSymbol: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
453
408
|
sort: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TRegExp>;
|
454
409
|
order: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TRegExp>;
|
455
|
-
distributionTypes: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TEnum<{
|
456
|
-
FIX_REWARD: "FIX_REWARD";
|
457
|
-
MAX_REWARD: "MAX_REWARD";
|
458
|
-
DUTCH_AUCTION: "DUTCH_AUCTION";
|
459
|
-
}>>>;
|
460
410
|
mainProtocolId: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
461
411
|
excludeSubCampaigns: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
|
462
412
|
page: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
|
@@ -465,11 +415,6 @@ export declare const FindManyOpportunityDto: import("@sinclair/typebox").TObject
|
|
465
415
|
export declare const FindOpportunityDto: import("@sinclair/typebox").TObject<{
|
466
416
|
test: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
|
467
417
|
point: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
|
468
|
-
tokenTypes: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TEnum<{
|
469
|
-
readonly TOKEN: "TOKEN";
|
470
|
-
readonly PRETGE: "PRETGE";
|
471
|
-
readonly POINT: "POINT";
|
472
|
-
}>>>;
|
473
418
|
campaigns: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
|
474
419
|
excludeSubCampaigns: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
|
475
420
|
}>;
|
@@ -510,6 +455,9 @@ export declare const CreateOpportunityDto: import("@sinclair/typebox").TObject<{
|
|
510
455
|
export declare const OpportunityAggregateFieldDto: import("@sinclair/typebox").TObject<{
|
511
456
|
field: import("@sinclair/typebox").TUnion<import("@sinclair/typebox").TLiteral<"apr" | "tvl" | "dailyRewards">[]>;
|
512
457
|
}>;
|
458
|
+
export declare const OpportunityIdDto: import("@sinclair/typebox").TObject<{
|
459
|
+
id: import("@sinclair/typebox").TString;
|
460
|
+
}>;
|
513
461
|
export declare const OpportunityOverrideDto: import("@sinclair/typebox").TObject<{
|
514
462
|
name: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
515
463
|
description: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
@@ -541,7 +489,7 @@ export declare const OpportunityDeleteOverrideDto: import("@sinclair/typebox").T
|
|
541
489
|
export declare const UpdateOpportunityDto: import("@sinclair/typebox").TObject<{
|
542
490
|
tags: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>>;
|
543
491
|
}>;
|
544
|
-
export type
|
492
|
+
export type GetOpportunitiesQueryModel = typeof GetOpportunitiesQueryDto.static;
|
545
493
|
export type FindOpportunityModel = typeof FindOpportunityDto.static;
|
546
494
|
export type CreateOpportunityModel = typeof CreateOpportunityDto.static;
|
547
495
|
export type OpportunityAggregateField = typeof OpportunityAggregateFieldDto.static;
|
@@ -1,11 +1,10 @@
|
|
1
1
|
import { type MerklChainId } from "@angleprotocol/sdk/ts";
|
2
|
-
import { type TokenType } from "@package/databases";
|
3
2
|
import { type Prisma, Status } from "@package/databases/api";
|
4
3
|
import type { AprRecord } from "../../../modules/v4/apr/apr.model";
|
5
4
|
import type { Campaign } from "../../../modules/v4/campaign/campaign.model";
|
6
5
|
import type { DailyRewardsRecord } from "../../../modules/v4/reward/reward.model";
|
7
6
|
import type { TvlRecord } from "../../../modules/v4/tvl/tvl.model";
|
8
|
-
import type { CreateOpportunityModel,
|
7
|
+
import type { CreateOpportunityModel, FindOpportunityModel, GetOpportunitiesQueryModel, Opportunity } from "./opportunity.model";
|
9
8
|
export declare abstract class OpportunityRepository {
|
10
9
|
#private;
|
11
10
|
static create(newOpp: CreateOpportunityModel & {
|
@@ -19,9 +18,10 @@ export declare abstract class OpportunityRepository {
|
|
19
18
|
address: string;
|
20
19
|
id: string;
|
21
20
|
chainId: number;
|
22
|
-
type: TokenType;
|
23
21
|
icon: string;
|
24
22
|
isNative: boolean;
|
23
|
+
isPoint: boolean;
|
24
|
+
isPreTGE: boolean;
|
25
25
|
isTest: boolean;
|
26
26
|
verified: boolean;
|
27
27
|
displaySymbol: string;
|
@@ -69,9 +69,10 @@ export declare abstract class OpportunityRepository {
|
|
69
69
|
address: string;
|
70
70
|
id: string;
|
71
71
|
chainId: number;
|
72
|
-
type: TokenType;
|
73
72
|
icon: string;
|
74
73
|
isNative: boolean;
|
74
|
+
isPoint: boolean;
|
75
|
+
isPreTGE: boolean;
|
75
76
|
isTest: boolean;
|
76
77
|
verified: boolean;
|
77
78
|
displaySymbol: string;
|
@@ -105,9 +106,10 @@ export declare abstract class OpportunityRepository {
|
|
105
106
|
address: string;
|
106
107
|
id: string;
|
107
108
|
chainId: number;
|
108
|
-
type: TokenType;
|
109
109
|
icon: string;
|
110
110
|
isNative: boolean;
|
111
|
+
isPoint: boolean;
|
112
|
+
isPreTGE: boolean;
|
111
113
|
isTest: boolean;
|
112
114
|
verified: boolean;
|
113
115
|
displaySymbol: string;
|
@@ -176,9 +178,10 @@ export declare abstract class OpportunityRepository {
|
|
176
178
|
address: string;
|
177
179
|
id: string;
|
178
180
|
chainId: number;
|
179
|
-
type: TokenType;
|
180
181
|
icon: string;
|
181
182
|
isNative: boolean;
|
183
|
+
isPoint: boolean;
|
184
|
+
isPreTGE: boolean;
|
182
185
|
isTest: boolean;
|
183
186
|
verified: boolean;
|
184
187
|
displaySymbol: string;
|
@@ -251,9 +254,10 @@ export declare abstract class OpportunityRepository {
|
|
251
254
|
address: string;
|
252
255
|
id: string;
|
253
256
|
chainId: number;
|
254
|
-
type: TokenType;
|
255
257
|
icon: string;
|
256
258
|
isNative: boolean;
|
259
|
+
isPoint: boolean;
|
260
|
+
isPreTGE: boolean;
|
257
261
|
isTest: boolean;
|
258
262
|
verified: boolean;
|
259
263
|
displaySymbol: string;
|
@@ -322,9 +326,10 @@ export declare abstract class OpportunityRepository {
|
|
322
326
|
address: string;
|
323
327
|
id: string;
|
324
328
|
chainId: number;
|
325
|
-
type: TokenType;
|
326
329
|
icon: string;
|
327
330
|
isNative: boolean;
|
331
|
+
isPoint: boolean;
|
332
|
+
isPreTGE: boolean;
|
328
333
|
isTest: boolean;
|
329
334
|
verified: boolean;
|
330
335
|
displaySymbol: string;
|
@@ -417,9 +422,10 @@ export declare abstract class OpportunityRepository {
|
|
417
422
|
address: string;
|
418
423
|
id: string;
|
419
424
|
chainId: number;
|
420
|
-
type: TokenType;
|
421
425
|
icon: string;
|
422
426
|
isNative: boolean;
|
427
|
+
isPoint: boolean;
|
428
|
+
isPreTGE: boolean;
|
423
429
|
isTest: boolean;
|
424
430
|
verified: boolean;
|
425
431
|
displaySymbol: string;
|
@@ -453,9 +459,10 @@ export declare abstract class OpportunityRepository {
|
|
453
459
|
address: string;
|
454
460
|
id: string;
|
455
461
|
chainId: number;
|
456
|
-
type: TokenType;
|
457
462
|
icon: string;
|
458
463
|
isNative: boolean;
|
464
|
+
isPoint: boolean;
|
465
|
+
isPreTGE: boolean;
|
459
466
|
isTest: boolean;
|
460
467
|
verified: boolean;
|
461
468
|
displaySymbol: string;
|
@@ -524,9 +531,10 @@ export declare abstract class OpportunityRepository {
|
|
524
531
|
address: string;
|
525
532
|
id: string;
|
526
533
|
chainId: number;
|
527
|
-
type: TokenType;
|
528
534
|
icon: string;
|
529
535
|
isNative: boolean;
|
536
|
+
isPoint: boolean;
|
537
|
+
isPreTGE: boolean;
|
530
538
|
isTest: boolean;
|
531
539
|
verified: boolean;
|
532
540
|
displaySymbol: string;
|
@@ -564,7 +572,7 @@ export declare abstract class OpportunityRepository {
|
|
564
572
|
tags: string[];
|
565
573
|
lastCampaignCreatedAt: Date;
|
566
574
|
})[]>;
|
567
|
-
static findMany(query:
|
575
|
+
static findMany(query: GetOpportunitiesQueryModel): Promise<({
|
568
576
|
Chain: {
|
569
577
|
Explorer: {
|
570
578
|
id: string;
|
@@ -606,9 +614,10 @@ export declare abstract class OpportunityRepository {
|
|
606
614
|
address: string;
|
607
615
|
id: string;
|
608
616
|
chainId: number;
|
609
|
-
type: TokenType;
|
610
617
|
icon: string;
|
611
618
|
isNative: boolean;
|
619
|
+
isPoint: boolean;
|
620
|
+
isPreTGE: boolean;
|
612
621
|
isTest: boolean;
|
613
622
|
verified: boolean;
|
614
623
|
displaySymbol: string;
|
@@ -677,9 +686,10 @@ export declare abstract class OpportunityRepository {
|
|
677
686
|
address: string;
|
678
687
|
id: string;
|
679
688
|
chainId: number;
|
680
|
-
type: TokenType;
|
681
689
|
icon: string;
|
682
690
|
isNative: boolean;
|
691
|
+
isPoint: boolean;
|
692
|
+
isPreTGE: boolean;
|
683
693
|
isTest: boolean;
|
684
694
|
verified: boolean;
|
685
695
|
displaySymbol: string;
|
@@ -717,7 +727,7 @@ export declare abstract class OpportunityRepository {
|
|
717
727
|
tags: string[];
|
718
728
|
lastCampaignCreatedAt: Date;
|
719
729
|
})[]>;
|
720
|
-
static countMany(query:
|
730
|
+
static countMany(query: GetOpportunitiesQueryModel): Promise<number>;
|
721
731
|
/**
|
722
732
|
* @dev Live campaigns here can be:
|
723
733
|
* 1. Opportunities with status LIVE
|
@@ -777,9 +787,10 @@ export declare abstract class OpportunityRepository {
|
|
777
787
|
address: string;
|
778
788
|
id: string;
|
779
789
|
chainId: number;
|
780
|
-
type: TokenType;
|
781
790
|
icon: string;
|
782
791
|
isNative: boolean;
|
792
|
+
isPoint: boolean;
|
793
|
+
isPreTGE: boolean;
|
783
794
|
isTest: boolean;
|
784
795
|
verified: boolean;
|
785
796
|
displaySymbol: string;
|
@@ -813,9 +824,10 @@ export declare abstract class OpportunityRepository {
|
|
813
824
|
address: string;
|
814
825
|
id: string;
|
815
826
|
chainId: number;
|
816
|
-
type: TokenType;
|
817
827
|
icon: string;
|
818
828
|
isNative: boolean;
|
829
|
+
isPoint: boolean;
|
830
|
+
isPreTGE: boolean;
|
819
831
|
isTest: boolean;
|
820
832
|
verified: boolean;
|
821
833
|
displaySymbol: string;
|
@@ -884,9 +896,10 @@ export declare abstract class OpportunityRepository {
|
|
884
896
|
address: string;
|
885
897
|
id: string;
|
886
898
|
chainId: number;
|
887
|
-
type: TokenType;
|
888
899
|
icon: string;
|
889
900
|
isNative: boolean;
|
901
|
+
isPoint: boolean;
|
902
|
+
isPreTGE: boolean;
|
890
903
|
isTest: boolean;
|
891
904
|
verified: boolean;
|
892
905
|
displaySymbol: string;
|
@@ -1027,13 +1040,13 @@ export declare abstract class OpportunityRepository {
|
|
1027
1040
|
lastCampaignCreatedAt: Date;
|
1028
1041
|
}>;
|
1029
1042
|
static updateMany(ids: string[], data: Partial<Opportunity["raw"]>): Promise<Prisma.BatchPayload>;
|
1030
|
-
static aggregateSum(field: keyof Prisma.OpportunitySumAggregateInputType, query:
|
1043
|
+
static aggregateSum(field: keyof Prisma.OpportunitySumAggregateInputType, query: GetOpportunitiesQueryModel): Promise<{
|
1031
1044
|
sum: string;
|
1032
1045
|
}>;
|
1033
|
-
static aggregateMin(field: keyof Prisma.OpportunityMinAggregateInputType, query:
|
1046
|
+
static aggregateMin(field: keyof Prisma.OpportunityMinAggregateInputType, query: GetOpportunitiesQueryModel): Promise<{
|
1034
1047
|
min: string;
|
1035
1048
|
}>;
|
1036
|
-
static aggregateMax(field: keyof Prisma.OpportunityMaxAggregateInputType, query:
|
1049
|
+
static aggregateMax(field: keyof Prisma.OpportunityMaxAggregateInputType, query: GetOpportunitiesQueryModel): Promise<{
|
1037
1050
|
max: string;
|
1038
1051
|
}>;
|
1039
1052
|
}
|