@merkl/api 0.10.200 → 0.10.202
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/src/modules/v4/campaign/campaign.controller.d.ts +2 -0
- package/dist/src/modules/v4/campaign/campaign.model.d.ts +1 -0
- package/dist/src/modules/v4/campaign/campaign.model.js +1 -0
- package/dist/src/modules/v4/campaign/campaign.repository.js +10 -2
- package/dist/src/modules/v4/router.d.ts +2 -0
- package/dist/src/routes/v3/claims.d.ts +1 -1
- package/dist/tsconfig.package.tsbuildinfo +1 -1
- package/package.json +1 -1
@@ -72,6 +72,7 @@ export declare const CampaignController: Elysia<"/campaigns", false, {
|
|
72
72
|
campaignId?: string | undefined;
|
73
73
|
opportunityId?: string | undefined;
|
74
74
|
test?: boolean | undefined;
|
75
|
+
creatorTag?: string | undefined;
|
75
76
|
tokenSymbol?: string | undefined;
|
76
77
|
};
|
77
78
|
headers: unknown;
|
@@ -143,6 +144,7 @@ export declare const CampaignController: Elysia<"/campaigns", false, {
|
|
143
144
|
campaignId?: string | undefined;
|
144
145
|
opportunityId?: string | undefined;
|
145
146
|
test?: boolean | undefined;
|
147
|
+
creatorTag?: string | undefined;
|
146
148
|
tokenSymbol?: string | undefined;
|
147
149
|
};
|
148
150
|
headers: unknown;
|
@@ -100,6 +100,7 @@ export declare const CreateCampaignDto: import("@sinclair/typebox").TObject<{
|
|
100
100
|
params: import("@sinclair/typebox").TString;
|
101
101
|
}>;
|
102
102
|
export declare const GetCampaignQueryDto: import("@sinclair/typebox").TObject<{
|
103
|
+
creatorTag: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
103
104
|
chainId: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
|
104
105
|
type: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TEnum<{
|
105
106
|
INVALID: "INVALID";
|
@@ -61,6 +61,7 @@ export const CreateCampaignDto = t.Object({
|
|
61
61
|
params: t.String(),
|
62
62
|
});
|
63
63
|
export const GetCampaignQueryDto = t.Object({
|
64
|
+
creatorTag: t.Optional(t.String({ description: "Filter campaigns created by a user who has a specific tag" })),
|
64
65
|
chainId: t.Optional(t.Numeric({
|
65
66
|
description: "Filter by chain.<br>You can get the list of all supported chains by calling [GET /v4/chains](#tag/chains/GET/v4/chains/)",
|
66
67
|
})),
|
@@ -10,7 +10,7 @@ import { TokenService } from "../token";
|
|
10
10
|
export class CampaignRepository {
|
11
11
|
// ─── Private Methods ─────────────────────────────────────────────────
|
12
12
|
static #transformQueryToPrismaFilters(query) {
|
13
|
-
const { chainId, endTimestamp, opportunityId, mainParameter, campaignId, startTimestamp, subType, type, tokenAddress, tokenSymbol, test, } = query;
|
13
|
+
const { creatorTag, chainId, endTimestamp, opportunityId, mainParameter, campaignId, startTimestamp, subType, type, tokenAddress, tokenSymbol, test, } = query;
|
14
14
|
return {
|
15
15
|
where: {
|
16
16
|
computeChainId: chainId,
|
@@ -26,9 +26,17 @@ export class CampaignRepository {
|
|
26
26
|
RewardToken: {
|
27
27
|
address: tokenAddress ? tokenAddress : undefined,
|
28
28
|
symbol: tokenSymbol ? tokenSymbol : undefined,
|
29
|
-
|
29
|
+
OR: tokenSymbol
|
30
|
+
? [
|
31
|
+
{ symbol: { equals: tokenSymbol, mode: "insensitive" } },
|
32
|
+
{ displaySymbol: { equals: tokenSymbol, mode: "insensitive" } },
|
33
|
+
]
|
34
|
+
: undefined,
|
30
35
|
isTest: !test ? false : undefined,
|
31
36
|
},
|
37
|
+
Creator: {
|
38
|
+
tags: { has: creatorTag },
|
39
|
+
},
|
32
40
|
},
|
33
41
|
};
|
34
42
|
}
|
@@ -585,6 +585,7 @@ export declare const v4: Elysia<"/v4", false, {
|
|
585
585
|
campaignId?: string | undefined;
|
586
586
|
opportunityId?: string | undefined;
|
587
587
|
test?: boolean | undefined;
|
588
|
+
creatorTag?: string | undefined;
|
588
589
|
tokenSymbol?: string | undefined;
|
589
590
|
};
|
590
591
|
headers: unknown;
|
@@ -656,6 +657,7 @@ export declare const v4: Elysia<"/v4", false, {
|
|
656
657
|
campaignId?: string | undefined;
|
657
658
|
opportunityId?: string | undefined;
|
658
659
|
test?: boolean | undefined;
|
660
|
+
creatorTag?: string | undefined;
|
659
661
|
tokenSymbol?: string | undefined;
|
660
662
|
};
|
661
663
|
headers: unknown;
|
@@ -24,8 +24,8 @@ declare const _default: (app: Elysia) => Elysia<"", false, {
|
|
24
24
|
params: {};
|
25
25
|
query: {
|
26
26
|
chainIds?: string | string[] | undefined;
|
27
|
-
byReason?: boolean | undefined;
|
28
27
|
creatorTag?: string | undefined;
|
28
|
+
byReason?: boolean | undefined;
|
29
29
|
user: string;
|
30
30
|
};
|
31
31
|
headers: unknown;
|