@merkl/api 1.0.50 → 1.0.51
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 +8 -8
- package/dist/src/index.d.ts +4 -4
- package/dist/src/modules/v4/campaign/campaign.convertor.d.ts +5 -2
- package/dist/src/modules/v4/campaign/campaign.service.d.ts +2 -2
- package/dist/src/modules/v4/computedValue/computedValue.model.d.ts +4 -4
- package/dist/src/modules/v4/computedValue/computedValue.repository.d.ts +3 -3
- package/dist/src/modules/v4/computedValue/computedValue.service.d.ts +3 -3
- package/dist/src/modules/v4/opportunity/opportunity.controller.d.ts +4 -4
- package/dist/src/modules/v4/opportunity/opportunity.formatter.d.ts +3 -3
- package/dist/src/modules/v4/opportunity/opportunity.model.d.ts +4 -4
- package/dist/src/modules/v4/opportunity/opportunity.service.d.ts +3 -3
- package/dist/src/modules/v4/reward/reward.service.d.ts +1 -1
- package/dist/src/modules/v4/router.d.ts +4 -4
- package/dist/src/types/index.d.ts +3 -6
- package/dist/src/utils/execute.d.ts +2 -2
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/dist/src/modules/v4/dynamicData/dynamicData.model.d.ts +0 -62
- /package/dist/src/plugins/{error-handling.plugin.d.ts → errorHandler.d.ts} +0 -0
package/dist/src/eden/index.d.ts
CHANGED
@@ -401,7 +401,7 @@ export declare const MerklApi: (domain: string | import("elysia").default<"", {
|
|
401
401
|
identifier: string;
|
402
402
|
dailyRewards: number;
|
403
403
|
tags: string[];
|
404
|
-
lastCampaignCreatedAt:
|
404
|
+
lastCampaignCreatedAt: number;
|
405
405
|
chain: {
|
406
406
|
explorers?: {
|
407
407
|
chainId: number;
|
@@ -538,7 +538,7 @@ export declare const MerklApi: (domain: string | import("elysia").default<"", {
|
|
538
538
|
identifier: string;
|
539
539
|
dailyRewards: number;
|
540
540
|
tags: string[];
|
541
|
-
lastCampaignCreatedAt:
|
541
|
+
lastCampaignCreatedAt: number;
|
542
542
|
chain: {
|
543
543
|
explorers?: {
|
544
544
|
chainId: number;
|
@@ -741,7 +741,7 @@ export declare const MerklApi: (domain: string | import("elysia").default<"", {
|
|
741
741
|
identifier: string;
|
742
742
|
dailyRewards: number;
|
743
743
|
tags: string[];
|
744
|
-
lastCampaignCreatedAt:
|
744
|
+
lastCampaignCreatedAt: number;
|
745
745
|
chain: {
|
746
746
|
explorers?: {
|
747
747
|
chainId: number;
|
@@ -897,7 +897,7 @@ export declare const MerklApi: (domain: string | import("elysia").default<"", {
|
|
897
897
|
identifier: string;
|
898
898
|
dailyRewards: number;
|
899
899
|
tags: string[];
|
900
|
-
lastCampaignCreatedAt:
|
900
|
+
lastCampaignCreatedAt: number;
|
901
901
|
chain: {
|
902
902
|
explorers?: {
|
903
903
|
chainId: number;
|
@@ -10178,7 +10178,7 @@ export declare const MerklApi: (domain: string | import("elysia").default<"", {
|
|
10178
10178
|
identifier: string;
|
10179
10179
|
dailyRewards: number;
|
10180
10180
|
tags: string[];
|
10181
|
-
lastCampaignCreatedAt:
|
10181
|
+
lastCampaignCreatedAt: number;
|
10182
10182
|
chain: {
|
10183
10183
|
explorers?: {
|
10184
10184
|
chainId: number;
|
@@ -10372,7 +10372,7 @@ export declare const MerklApi: (domain: string | import("elysia").default<"", {
|
|
10372
10372
|
identifier: string;
|
10373
10373
|
dailyRewards: number;
|
10374
10374
|
tags: string[];
|
10375
|
-
lastCampaignCreatedAt:
|
10375
|
+
lastCampaignCreatedAt: number;
|
10376
10376
|
chain: {
|
10377
10377
|
explorers?: {
|
10378
10378
|
chainId: number;
|
@@ -10857,7 +10857,7 @@ export declare const MerklApi: (domain: string | import("elysia").default<"", {
|
|
10857
10857
|
identifier: string;
|
10858
10858
|
dailyRewards: number;
|
10859
10859
|
tags: string[];
|
10860
|
-
lastCampaignCreatedAt:
|
10860
|
+
lastCampaignCreatedAt: number;
|
10861
10861
|
chain: {
|
10862
10862
|
explorers?: {
|
10863
10863
|
chainId: number;
|
@@ -11007,7 +11007,7 @@ export declare const MerklApi: (domain: string | import("elysia").default<"", {
|
|
11007
11007
|
identifier: string;
|
11008
11008
|
dailyRewards: number;
|
11009
11009
|
tags: string[];
|
11010
|
-
lastCampaignCreatedAt:
|
11010
|
+
lastCampaignCreatedAt: number;
|
11011
11011
|
chain: {
|
11012
11012
|
explorers?: {
|
11013
11013
|
chainId: number;
|
package/dist/src/index.d.ts
CHANGED
@@ -402,7 +402,7 @@ declare const app: Elysia<"", {
|
|
402
402
|
identifier: string;
|
403
403
|
dailyRewards: number;
|
404
404
|
tags: string[];
|
405
|
-
lastCampaignCreatedAt:
|
405
|
+
lastCampaignCreatedAt: number;
|
406
406
|
chain: {
|
407
407
|
explorers?: {
|
408
408
|
chainId: number;
|
@@ -539,7 +539,7 @@ declare const app: Elysia<"", {
|
|
539
539
|
identifier: string;
|
540
540
|
dailyRewards: number;
|
541
541
|
tags: string[];
|
542
|
-
lastCampaignCreatedAt:
|
542
|
+
lastCampaignCreatedAt: number;
|
543
543
|
chain: {
|
544
544
|
explorers?: {
|
545
545
|
chainId: number;
|
@@ -742,7 +742,7 @@ declare const app: Elysia<"", {
|
|
742
742
|
identifier: string;
|
743
743
|
dailyRewards: number;
|
744
744
|
tags: string[];
|
745
|
-
lastCampaignCreatedAt:
|
745
|
+
lastCampaignCreatedAt: number;
|
746
746
|
chain: {
|
747
747
|
explorers?: {
|
748
748
|
chainId: number;
|
@@ -898,7 +898,7 @@ declare const app: Elysia<"", {
|
|
898
898
|
identifier: string;
|
899
899
|
dailyRewards: number;
|
900
900
|
tags: string[];
|
901
|
-
lastCampaignCreatedAt:
|
901
|
+
lastCampaignCreatedAt: number;
|
902
902
|
chain: {
|
903
903
|
explorers?: {
|
904
904
|
chainId: number;
|
@@ -1,6 +1,9 @@
|
|
1
|
-
import type
|
1
|
+
import { type CampaignParameters, Campaign as CampaignType } from "@angleprotocol/sdk/ts";
|
2
2
|
import type { CampaignWithParams } from "../../../modules/v4/campaign/campaign.model";
|
3
3
|
import type { OpportunityService } from "../../../modules/v4/opportunity/opportunity.service";
|
4
|
+
export declare abstract class CampaignTypeConvertor {
|
5
|
+
static toNumber(campaignType: string): CampaignType;
|
6
|
+
}
|
4
7
|
export declare abstract class CampaignConvertor {
|
5
|
-
static convertToV3<C extends CampaignType>(
|
8
|
+
static convertToV3<C extends CampaignType>(campaign: Exclude<Awaited<ReturnType<(typeof OpportunityService)["findMany"]>>[number]["campaigns"], undefined>[number] | Omit<CampaignWithParams<C>, "manualOverrides" | "opportunityId">, opportunityIdentifier?: string): CampaignParameters<C>;
|
6
9
|
}
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { type CampaignParameters, Campaign as CampaignType, type ChainId } from "@angleprotocol/sdk/ts";
|
2
2
|
import type { CampaignManualOverride } from "@package/databases/api";
|
3
3
|
import type { CampaignConfigMinimalModel, CampaignUnique, CampaignWithParams, CreateCampaignModel, FindCampaignModel, TransactionModel, UpdateCampaignCreatorModel, UpdateCampaignModel, findCampaignWithStatusModel } from "../../../modules/v4/campaign/campaign.model";
|
4
|
-
import type {
|
4
|
+
import type { FindCampaignComputedValueModel } from "../computedValue/computedValue.model";
|
5
5
|
import { CampaignFormatter } from "./campaign.formatter";
|
6
6
|
export declare abstract class CampaignService {
|
7
7
|
static hashId(campaign: CampaignUnique): string;
|
@@ -290,7 +290,7 @@ export declare abstract class CampaignService {
|
|
290
290
|
static checkIfExist(campaign: CampaignUnique | string): Promise<boolean>;
|
291
291
|
static findUnique(campaign: CampaignUnique | string): Promise<Omit<CampaignWithParams, "manualOverrides"> | null>;
|
292
292
|
static findUniqueOrThrow(campaign: CampaignUnique | string, withOpportunity?: boolean): Promise<Omit<CampaignWithParams, "manualOverrides">>;
|
293
|
-
static findCampaignValue(params:
|
293
|
+
static findCampaignValue(params: FindCampaignComputedValueModel): Promise<{
|
294
294
|
apr: number | null;
|
295
295
|
tvl: number | null;
|
296
296
|
averageBoost: number | null;
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import type { Resource } from "../prisma";
|
2
2
|
export type CampaignComputedFields = keyof Resource<"CampaignComputedValue", "campaignId">["model"];
|
3
3
|
export type UserComputedFields = keyof Resource<"UserComputedValue", "campaignId" | "address" | "reason">["model"];
|
4
|
-
export declare const
|
4
|
+
export declare const FindCampaignComputedValueDto: import("@sinclair/typebox").TObject<{
|
5
5
|
campaignId: import("@sinclair/typebox").TString;
|
6
6
|
field: import("@sinclair/typebox").TString;
|
7
7
|
}>;
|
@@ -10,7 +10,7 @@ export declare const UpsertCampaignComputedValue: import("@sinclair/typebox").TO
|
|
10
10
|
value: import("@sinclair/typebox").TNumber;
|
11
11
|
field: import("@sinclair/typebox").TString;
|
12
12
|
}>;
|
13
|
-
export declare const
|
13
|
+
export declare const FindUserComputedValuesDto: import("@sinclair/typebox").TObject<{
|
14
14
|
address: import("@sinclair/typebox").TString;
|
15
15
|
field: import("@sinclair/typebox").TString;
|
16
16
|
}>;
|
@@ -21,7 +21,7 @@ export declare const UpsertUserComputedValues: import("@sinclair/typebox").TArra
|
|
21
21
|
value: import("@sinclair/typebox").TNumber;
|
22
22
|
field: import("@sinclair/typebox").TString;
|
23
23
|
}>>;
|
24
|
-
export type
|
24
|
+
export type FindCampaignComputedValueModel = typeof FindCampaignComputedValueDto.static;
|
25
25
|
export type UpsertCampaignComputedValueModel = typeof UpsertCampaignComputedValue.static;
|
26
|
-
export type
|
26
|
+
export type FindUserComputedValuesModel = typeof FindUserComputedValuesDto.static;
|
27
27
|
export type UpsertUserComputedValuesModel = typeof UpsertUserComputedValues.static;
|
@@ -1,6 +1,6 @@
|
|
1
|
-
import type {
|
1
|
+
import type { FindCampaignComputedValueModel, FindUserComputedValuesModel, UpsertCampaignComputedValueModel, UpsertUserComputedValuesModel } from "./computedValue.model";
|
2
2
|
export declare abstract class ComputedValueRepository {
|
3
|
-
static findCampaignValue(params:
|
3
|
+
static findCampaignValue(params: FindCampaignComputedValueModel): Promise<{
|
4
4
|
apr: number | null;
|
5
5
|
tvl: number | null;
|
6
6
|
averageBoost: number | null;
|
@@ -11,7 +11,7 @@ export declare abstract class ComputedValueRepository {
|
|
11
11
|
lastRecordedNumberOfRecipients: number | null;
|
12
12
|
} | null>;
|
13
13
|
static upsertCampaignComputedValue(data: UpsertCampaignComputedValueModel): Promise<void>;
|
14
|
-
static findUserValues(data:
|
14
|
+
static findUserValues(data: FindUserComputedValuesModel): Promise<{
|
15
15
|
campaignId: string;
|
16
16
|
boost: number | null;
|
17
17
|
id: string;
|
@@ -1,7 +1,7 @@
|
|
1
|
-
import type {
|
1
|
+
import type { FindCampaignComputedValueModel, FindUserComputedValuesModel, UpsertCampaignComputedValueModel, UpsertUserComputedValuesModel } from "./computedValue.model";
|
2
2
|
export declare abstract class ComputedValueService {
|
3
3
|
static hashUserComputedValueId(campaignId: string, address: string, reason: string): string;
|
4
|
-
static findCampaignValue(campaignId: string, field:
|
4
|
+
static findCampaignValue(campaignId: string, field: FindCampaignComputedValueModel["field"]): Promise<{
|
5
5
|
apr: number | null;
|
6
6
|
tvl: number | null;
|
7
7
|
averageBoost: number | null;
|
@@ -12,7 +12,7 @@ export declare abstract class ComputedValueService {
|
|
12
12
|
lastRecordedNumberOfRecipients: number | null;
|
13
13
|
} | null>;
|
14
14
|
static upsertCampaignComputedValue(data: UpsertCampaignComputedValueModel): Promise<void>;
|
15
|
-
static findUserValues(params:
|
15
|
+
static findUserValues(params: FindUserComputedValuesModel): Promise<{
|
16
16
|
campaignId: string;
|
17
17
|
boost: number | null;
|
18
18
|
id: string;
|
@@ -202,7 +202,7 @@ export declare const OpportunityController: Elysia<"/opportunities", {
|
|
202
202
|
identifier: string;
|
203
203
|
dailyRewards: number;
|
204
204
|
tags: string[];
|
205
|
-
lastCampaignCreatedAt:
|
205
|
+
lastCampaignCreatedAt: number;
|
206
206
|
chain: {
|
207
207
|
explorers?: {
|
208
208
|
chainId: number;
|
@@ -339,7 +339,7 @@ export declare const OpportunityController: Elysia<"/opportunities", {
|
|
339
339
|
identifier: string;
|
340
340
|
dailyRewards: number;
|
341
341
|
tags: string[];
|
342
|
-
lastCampaignCreatedAt:
|
342
|
+
lastCampaignCreatedAt: number;
|
343
343
|
chain: {
|
344
344
|
explorers?: {
|
345
345
|
chainId: number;
|
@@ -542,7 +542,7 @@ export declare const OpportunityController: Elysia<"/opportunities", {
|
|
542
542
|
identifier: string;
|
543
543
|
dailyRewards: number;
|
544
544
|
tags: string[];
|
545
|
-
lastCampaignCreatedAt:
|
545
|
+
lastCampaignCreatedAt: number;
|
546
546
|
chain: {
|
547
547
|
explorers?: {
|
548
548
|
chainId: number;
|
@@ -698,7 +698,7 @@ export declare const OpportunityController: Elysia<"/opportunities", {
|
|
698
698
|
identifier: string;
|
699
699
|
dailyRewards: number;
|
700
700
|
tags: string[];
|
701
|
-
lastCampaignCreatedAt:
|
701
|
+
lastCampaignCreatedAt: number;
|
702
702
|
chain: {
|
703
703
|
explorers?: {
|
704
704
|
chainId: number;
|
@@ -90,7 +90,7 @@ export declare abstract class OpportunityFormatter {
|
|
90
90
|
id: string;
|
91
91
|
depositUrl: string | undefined;
|
92
92
|
explorerAddress: string | undefined;
|
93
|
-
lastCampaignCreatedAt:
|
93
|
+
lastCampaignCreatedAt: number;
|
94
94
|
name: string;
|
95
95
|
apr: number;
|
96
96
|
tvl: number;
|
@@ -139,7 +139,7 @@ export declare abstract class OpportunityFormatter {
|
|
139
139
|
id: string;
|
140
140
|
depositUrl: string | undefined;
|
141
141
|
explorerAddress: string | undefined;
|
142
|
-
lastCampaignCreatedAt:
|
142
|
+
lastCampaignCreatedAt: number;
|
143
143
|
name: string;
|
144
144
|
apr: number;
|
145
145
|
tvl: number;
|
@@ -157,7 +157,7 @@ export declare abstract class OpportunityFormatter {
|
|
157
157
|
id: string;
|
158
158
|
depositUrl: string | undefined;
|
159
159
|
explorerAddress: string | undefined;
|
160
|
-
lastCampaignCreatedAt:
|
160
|
+
lastCampaignCreatedAt: number;
|
161
161
|
name: string;
|
162
162
|
apr: number;
|
163
163
|
tvl: number;
|
@@ -16,7 +16,7 @@ import type { OpportunityRepository } from "./opportunity.repository";
|
|
16
16
|
export type OpportunityLight = Resource<"Opportunity", "manualOverrides" | "mainProtocolId", {
|
17
17
|
depositUrl?: string;
|
18
18
|
explorerAddress?: string;
|
19
|
-
lastCampaignCreatedAt:
|
19
|
+
lastCampaignCreatedAt: number;
|
20
20
|
mainProtocolId?: string;
|
21
21
|
}>;
|
22
22
|
/**
|
@@ -30,7 +30,7 @@ export type Opportunity = Resource<"Opportunity", "manualOverrides" | "mainProto
|
|
30
30
|
mainProtocolId?: string;
|
31
31
|
chain: Chain["model"];
|
32
32
|
tokens: Token["model"][];
|
33
|
-
lastCampaignCreatedAt:
|
33
|
+
lastCampaignCreatedAt: number;
|
34
34
|
protocol?: Protocol["model"];
|
35
35
|
aprRecord?: AprRecord["model"];
|
36
36
|
tvlRecord?: TvlRecord["model"];
|
@@ -158,7 +158,7 @@ export declare const OpportunityResourceDto: import("@sinclair/typebox").TObject
|
|
158
158
|
}>>;
|
159
159
|
}>>;
|
160
160
|
}>>;
|
161
|
-
lastCampaignCreatedAt: import("@sinclair/typebox").
|
161
|
+
lastCampaignCreatedAt: import("@sinclair/typebox").TNumber;
|
162
162
|
protocol: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TObject<{
|
163
163
|
id: import("@sinclair/typebox").TString;
|
164
164
|
name: import("@sinclair/typebox").TString;
|
@@ -220,7 +220,7 @@ export declare const OpportunityWithCampaignsResourceDto: import("@sinclair/type
|
|
220
220
|
identifier: import("@sinclair/typebox").TString;
|
221
221
|
dailyRewards: import("@sinclair/typebox").TNumber;
|
222
222
|
tags: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>;
|
223
|
-
lastCampaignCreatedAt: import("@sinclair/typebox").
|
223
|
+
lastCampaignCreatedAt: import("@sinclair/typebox").TNumber;
|
224
224
|
chain: import("@sinclair/typebox").TObject<{
|
225
225
|
id: import("@sinclair/typebox").TNumber;
|
226
226
|
name: import("@sinclair/typebox").TString;
|
@@ -437,7 +437,7 @@ export declare abstract class OpportunityService {
|
|
437
437
|
identifier: string;
|
438
438
|
dailyRewards: number;
|
439
439
|
tags: string[];
|
440
|
-
lastCampaignCreatedAt:
|
440
|
+
lastCampaignCreatedAt: number;
|
441
441
|
chain: {
|
442
442
|
explorers?: {
|
443
443
|
chainId: number;
|
@@ -544,7 +544,7 @@ export declare abstract class OpportunityService {
|
|
544
544
|
id: string;
|
545
545
|
depositUrl: string | undefined;
|
546
546
|
explorerAddress: string | undefined;
|
547
|
-
lastCampaignCreatedAt:
|
547
|
+
lastCampaignCreatedAt: number;
|
548
548
|
name: string;
|
549
549
|
apr: number;
|
550
550
|
tvl: number;
|
@@ -654,7 +654,7 @@ export declare abstract class OpportunityService {
|
|
654
654
|
id: string;
|
655
655
|
depositUrl: string | undefined;
|
656
656
|
explorerAddress: string | undefined;
|
657
|
-
lastCampaignCreatedAt:
|
657
|
+
lastCampaignCreatedAt: number;
|
658
658
|
name: string;
|
659
659
|
apr: number;
|
660
660
|
tvl: number;
|
@@ -97,7 +97,7 @@ export declare abstract class RewardService {
|
|
97
97
|
id: string;
|
98
98
|
depositUrl: string | undefined;
|
99
99
|
explorerAddress: string | undefined;
|
100
|
-
lastCampaignCreatedAt:
|
100
|
+
lastCampaignCreatedAt: number;
|
101
101
|
name: string;
|
102
102
|
apr: number;
|
103
103
|
tvl: number;
|
@@ -211,7 +211,7 @@ export declare const v4: Elysia<"/v4", {
|
|
211
211
|
identifier: string;
|
212
212
|
dailyRewards: number;
|
213
213
|
tags: string[];
|
214
|
-
lastCampaignCreatedAt:
|
214
|
+
lastCampaignCreatedAt: number;
|
215
215
|
chain: {
|
216
216
|
explorers?: {
|
217
217
|
chainId: number;
|
@@ -348,7 +348,7 @@ export declare const v4: Elysia<"/v4", {
|
|
348
348
|
identifier: string;
|
349
349
|
dailyRewards: number;
|
350
350
|
tags: string[];
|
351
|
-
lastCampaignCreatedAt:
|
351
|
+
lastCampaignCreatedAt: number;
|
352
352
|
chain: {
|
353
353
|
explorers?: {
|
354
354
|
chainId: number;
|
@@ -551,7 +551,7 @@ export declare const v4: Elysia<"/v4", {
|
|
551
551
|
identifier: string;
|
552
552
|
dailyRewards: number;
|
553
553
|
tags: string[];
|
554
|
-
lastCampaignCreatedAt:
|
554
|
+
lastCampaignCreatedAt: number;
|
555
555
|
chain: {
|
556
556
|
explorers?: {
|
557
557
|
chainId: number;
|
@@ -707,7 +707,7 @@ export declare const v4: Elysia<"/v4", {
|
|
707
707
|
identifier: string;
|
708
708
|
dailyRewards: number;
|
709
709
|
tags: string[];
|
710
|
-
lastCampaignCreatedAt:
|
710
|
+
lastCampaignCreatedAt: number;
|
711
711
|
chain: {
|
712
712
|
explorers?: {
|
713
713
|
chainId: number;
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import type
|
1
|
+
import { type CallDto } from "@angleprotocol/sdk/ts";
|
2
2
|
/**
|
3
3
|
* Types
|
4
4
|
*/
|
@@ -10,7 +10,7 @@ type ComponentReturnType<T> = Promise<CachedResult<T> | UncachedResult<T>>;
|
|
10
10
|
export type UncachedResult<T> = {
|
11
11
|
cached: false;
|
12
12
|
call: {
|
13
|
-
callData:
|
13
|
+
callData: CallDto[];
|
14
14
|
reducer: (result: string[]) => Promise<T>;
|
15
15
|
handler: () => void;
|
16
16
|
};
|