@merkl/api 0.10.200 → 0.10.201

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.
@@ -73,6 +73,7 @@ export declare const CampaignController: Elysia<"/campaigns", false, {
73
73
  opportunityId?: string | undefined;
74
74
  test?: boolean | undefined;
75
75
  tokenSymbol?: string | undefined;
76
+ creatorTag: string;
76
77
  };
77
78
  headers: unknown;
78
79
  response: {
@@ -144,6 +145,7 @@ export declare const CampaignController: Elysia<"/campaigns", false, {
144
145
  opportunityId?: string | undefined;
145
146
  test?: boolean | undefined;
146
147
  tokenSymbol?: string | undefined;
148
+ creatorTag: string;
147
149
  };
148
150
  headers: unknown;
149
151
  response: {
@@ -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").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.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
- displaySymbol: tokenSymbol ? tokenSymbol : undefined,
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
  }
@@ -586,6 +586,7 @@ export declare const v4: Elysia<"/v4", false, {
586
586
  opportunityId?: string | undefined;
587
587
  test?: boolean | undefined;
588
588
  tokenSymbol?: string | undefined;
589
+ creatorTag: string;
589
590
  };
590
591
  headers: unknown;
591
592
  response: {
@@ -657,6 +658,7 @@ export declare const v4: Elysia<"/v4", false, {
657
658
  opportunityId?: string | undefined;
658
659
  test?: boolean | undefined;
659
660
  tokenSymbol?: string | undefined;
661
+ creatorTag: string;
660
662
  };
661
663
  headers: unknown;
662
664
  response: {
@@ -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;