@merkl/api 0.10.138 → 0.10.139

Sign up to get free protection for your applications and to get access to all the features.
Files changed (62) hide show
  1. package/dist/src/eden/index.d.ts +291 -520
  2. package/dist/src/index.d.ts +99 -186
  3. package/dist/src/index.js +1 -1
  4. package/dist/src/libs/deprecated-merklv3/index.js +1 -1
  5. package/dist/src/modules/v4/blacklist/blacklist.controller.d.ts +0 -21
  6. package/dist/src/modules/v4/blacklist/blacklist.controller.js +2 -2
  7. package/dist/src/modules/v4/blacklist/blacklist.repository.d.ts +0 -8
  8. package/dist/src/modules/v4/blacklist/blacklist.repository.js +1 -4
  9. package/dist/src/modules/v4/blacklist/blacklist.service.d.ts +1 -9
  10. package/dist/src/modules/v4/blacklist/blacklist.service.js +1 -4
  11. package/dist/src/modules/v4/campaign/campaign.controller.d.ts +3 -3
  12. package/dist/src/modules/v4/campaign/campaign.controller.js +8 -6
  13. package/dist/src/modules/v4/campaign/campaign.service.js +1 -2
  14. package/dist/src/modules/v4/chain/chain.controller.js +2 -1
  15. package/dist/src/modules/v4/dynamicData/dynamicData.controller.d.ts +20 -26
  16. package/dist/src/modules/v4/dynamicData/dynamicData.controller.js +5 -5
  17. package/dist/src/modules/v4/enso/enso.service.d.ts +1 -1
  18. package/dist/src/modules/v4/{participate/participate.controller.d.ts → interaction/interaction.controller.d.ts} +6 -6
  19. package/dist/src/modules/v4/{participate/participate.controller.js → interaction/interaction.controller.js} +12 -13
  20. package/dist/src/modules/v4/{participate/participate.model.d.ts → interaction/interaction.model.d.ts} +12 -12
  21. package/dist/src/modules/v4/{participate/participate.model.js → interaction/interaction.model.js} +3 -3
  22. package/dist/src/modules/v4/{participate/participate.service.d.ts → interaction/interaction.service.d.ts} +5 -5
  23. package/dist/src/modules/v4/{participate/participate.service.js → interaction/interaction.service.js} +3 -3
  24. package/dist/src/modules/v4/merklRoot/merklRoot.controller.d.ts +2 -2
  25. package/dist/src/modules/v4/merklRoot/merklRoot.controller.js +2 -2
  26. package/dist/src/modules/v4/opportunity/opportunity.controller.js +5 -1
  27. package/dist/src/modules/v4/price/price.controller.js +3 -0
  28. package/dist/src/modules/v4/reward/reward.controller.d.ts +31 -29
  29. package/dist/src/modules/v4/reward/reward.controller.js +3 -3
  30. package/dist/src/modules/v4/reward/{rewardConvertor.service.d.ts → subservices/converter.d.ts} +2 -2
  31. package/dist/src/modules/v4/reward/{rewardConvertor.service.js → subservices/converter.js} +1 -1
  32. package/dist/src/modules/v4/router.d.ts +99 -186
  33. package/dist/src/modules/v4/router.js +2 -2
  34. package/dist/src/modules/v4/status/status.controller.d.ts +40 -102
  35. package/dist/src/modules/v4/status/status.controller.js +16 -22
  36. package/dist/src/modules/v4/status/status.model.d.ts +33 -26
  37. package/dist/src/modules/v4/status/status.model.js +9 -20
  38. package/dist/src/modules/v4/status/status.repository.d.ts +12 -42
  39. package/dist/src/modules/v4/status/status.repository.js +10 -22
  40. package/dist/src/modules/v4/status/status.service.d.ts +4 -36
  41. package/dist/src/modules/v4/status/status.service.js +9 -18
  42. package/dist/src/modules/v4/uniswapV4/uniswapV4.controller.d.ts +1 -1
  43. package/dist/src/modules/v4/uniswapV4/uniswapV4.controller.js +1 -1
  44. package/dist/src/modules/v4/user/user.controller.js +3 -2
  45. package/dist/src/routes/v3/ERC20Campaigns.d.ts +99 -186
  46. package/dist/src/routes/v3/blacklist.d.ts +99 -186
  47. package/dist/src/routes/v3/campaigns.d.ts +99 -186
  48. package/dist/src/routes/v3/campaignsInfo.d.ts +99 -186
  49. package/dist/src/routes/v3/multiChainPositions.d.ts +99 -186
  50. package/dist/src/routes/v3/opportunity.d.ts +99 -186
  51. package/dist/src/routes/v3/positions.d.ts +99 -186
  52. package/dist/src/routes/v3/rewards.d.ts +99 -186
  53. package/dist/src/routes/v3/rewards.js +1 -1
  54. package/dist/src/routes/v3/updates.d.ts +99 -186
  55. package/dist/src/routes/v3/userRewards.d.ts +99 -186
  56. package/dist/src/routes/v3/userRewards.js +1 -1
  57. package/dist/tsconfig.package.tsbuildinfo +1 -1
  58. package/package.json +1 -2
  59. package/dist/src/modules/v4/apr/apr.repository.d.ts +0 -0
  60. package/dist/src/modules/v4/apr/apr.repository.js +0 -1
  61. package/dist/src/modules/v4/tvl/tvl.repository.d.ts +0 -0
  62. package/dist/src/modules/v4/tvl/tvl.repository.js +0 -1
@@ -1,5 +1,5 @@
1
1
  import Elysia from "elysia";
2
- export declare const DynamicDataController: Elysia<"/dynamicData", false, {
2
+ export declare const DynamicDataController: Elysia<"/dynamic-data", false, {
3
3
  decorator: {};
4
4
  store: {};
5
5
  derive: {};
@@ -12,31 +12,25 @@ export declare const DynamicDataController: Elysia<"/dynamicData", false, {
12
12
  macro: {};
13
13
  macroFn: {};
14
14
  }, {
15
- dynamicData: {
16
- chainId: {
17
- ":chainId": {
18
- token: {
19
- ":tokenAddress": {
20
- get: {
21
- body: unknown;
22
- params: {
23
- chainId: number;
24
- tokenAddress: string;
25
- };
26
- query: unknown;
27
- headers: {
28
- authorization: string;
29
- };
30
- response: {
31
- 200: {
32
- tvl: number;
33
- totalSupply: number;
34
- cardName: string;
35
- blacklistedSupply: number;
36
- priceTargetToken: number;
37
- };
38
- };
39
- };
15
+ "dynamic-data": {
16
+ index: {
17
+ get: {
18
+ body: unknown;
19
+ params: {};
20
+ query: {
21
+ chainId: number;
22
+ tokenAddress: string;
23
+ };
24
+ headers: {
25
+ authorization: string;
26
+ };
27
+ response: {
28
+ 200: {
29
+ tvl: number;
30
+ totalSupply: number;
31
+ cardName: string;
32
+ blacklistedSupply: number;
33
+ priceTargetToken: number;
40
34
  };
41
35
  };
42
36
  };
@@ -4,13 +4,13 @@ import { throwOnUnsupportedChainId } from "src/utils/throw";
4
4
  import { DynamicDataSourceIdentifier } from "./dynamicData.model";
5
5
  import { DynamicDataService } from "./dynamicData.service";
6
6
  // ─── DynamicDatas Controller ───────────────────────────────────────────────────────
7
- export const DynamicDataController = new Elysia({ prefix: "/dynamicData", detail: { tags: ["DynamicData"] } })
7
+ export const DynamicDataController = new Elysia({ prefix: "/dynamic-data", detail: { tags: ["DynamicData"] } })
8
8
  // ─── Get type Info By Token Address ───────────────────────────────────────
9
- .get("/chainId/:chainId/token/:tokenAddress", async ({ params }) => await DynamicDataService.queryERC20DynamicData(params.chainId, params.tokenAddress), {
10
- params: DynamicDataSourceIdentifier,
9
+ .get("/", async ({ query }) => await DynamicDataService.queryERC20DynamicData(query.chainId, query.tokenAddress), {
10
+ query: DynamicDataSourceIdentifier,
11
11
  headers: AuthorizationHeadersDto,
12
- beforeHandle: ({ params, headers }) => {
12
+ beforeHandle: ({ query, headers }) => {
13
13
  BackOfficeGuard({ headers });
14
- throwOnUnsupportedChainId(params.chainId);
14
+ throwOnUnsupportedChainId(query.chainId);
15
15
  },
16
16
  });
@@ -1,4 +1,4 @@
1
- import type { GetParticipateProtocolsQuery } from "../participate/participate.model";
1
+ import type { GetParticipateProtocolsQuery } from "../interaction/interaction.model";
2
2
  import { type ProtocolId } from "../protocol";
3
3
  import { type EnsoApi, type EnsoSlug } from "./enso.model";
4
4
  export declare abstract class EnsoService {
@@ -1,5 +1,5 @@
1
1
  import Elysia from "elysia";
2
- export declare const ParticipateController: Elysia<"/participate", false, {
2
+ export declare const InteractionController: Elysia<"/interaction", false, {
3
3
  decorator: {};
4
4
  store: {};
5
5
  derive: {};
@@ -12,7 +12,7 @@ export declare const ParticipateController: Elysia<"/participate", false, {
12
12
  macro: {};
13
13
  macroFn: {};
14
14
  }, {
15
- participate: {
15
+ interaction: {
16
16
  targets: {
17
17
  get: {
18
18
  body: unknown;
@@ -24,13 +24,13 @@ export declare const ParticipateController: Elysia<"/participate", false, {
24
24
  };
25
25
  headers: unknown;
26
26
  response: {
27
- 200: import("./participate.model").ParticipateTarget[] | undefined;
27
+ 200: import("./interaction.model").InteractionTarget[] | undefined;
28
28
  };
29
29
  };
30
30
  };
31
31
  };
32
32
  } & {
33
- participate: {
33
+ interaction: {
34
34
  protocols: {
35
35
  get: {
36
36
  body: unknown;
@@ -53,7 +53,7 @@ export declare const ParticipateController: Elysia<"/participate", false, {
53
53
  };
54
54
  };
55
55
  } & {
56
- participate: {
56
+ interaction: {
57
57
  quote: {
58
58
  get: {
59
59
  body: unknown;
@@ -79,7 +79,7 @@ export declare const ParticipateController: Elysia<"/participate", false, {
79
79
  };
80
80
  };
81
81
  } & {
82
- participate: {
82
+ interaction: {
83
83
  transaction: {
84
84
  get: {
85
85
  body: unknown;
@@ -1,16 +1,15 @@
1
1
  import Elysia from "elysia";
2
2
  import { EnsoService } from "../enso/enso.service";
3
- import { GetParticipateProtocolsQueryDto, GetParticipateQuoteQueryDto, GetParticipateTargetsQueryDto, } from "./participate.model";
4
- import { ParticipateService } from "./participate.service";
5
- // ─── Participate Controller ──────────────────────────────────────────────────
6
- export const ParticipateController = new Elysia({ prefix: "/participate", detail: { tags: ["Participate"] } })
7
- // ─── Get All Targets ───────────────────────────────────────────────
3
+ import { GetInteractionProtocolsQueryDto, GetInteractionQuoteQueryDto, GetInteractionTargetsQueryDto, } from "./interaction.model";
4
+ import { InteractionService } from "./interaction.service";
5
+ // ─── Interaction Controller ──────────────────────────────────────────────────
6
+ export const InteractionController = new Elysia({ prefix: "/interaction", detail: { tags: ["Interaction"] } })
8
7
  .get("/targets", async ({ query: { protocolId, chainId, identifier } }) => {
9
8
  if (identifier)
10
- return await ParticipateService.getTarget(chainId, protocolId, identifier);
11
- return await ParticipateService.getTargets(chainId, protocolId);
9
+ return await InteractionService.getTarget(chainId, protocolId, identifier);
10
+ return await InteractionService.getTargets(chainId, protocolId);
12
11
  }, {
13
- query: GetParticipateTargetsQueryDto,
12
+ query: GetInteractionTargetsQueryDto,
14
13
  detail: {
15
14
  summary: "Available interaction targets for a protocol",
16
15
  description: "Retrieves all the pool/token/contract",
@@ -18,7 +17,7 @@ export const ParticipateController = new Elysia({ prefix: "/participate", detail
18
17
  })
19
18
  // ─── Get All Compatible Protocols ───────────────────────────────────────
20
19
  .get("/protocols", async ({ query }) => await EnsoService.getCompatibleProtocols(query), {
21
- query: GetParticipateProtocolsQueryDto,
20
+ query: GetInteractionProtocolsQueryDto,
22
21
  detail: {
23
22
  summary: "Interactable protocols",
24
23
  description: "Retrieves protocols integrated by merkl which supports being interacted with",
@@ -26,7 +25,7 @@ export const ParticipateController = new Elysia({ prefix: "/participate", detail
26
25
  })
27
26
  // ─── Get Quote ───────────────────────────────────────────────────────
28
27
  .get("/quote", async ({ query: { protocolId, chainId, identifier, userAddress, fromAmount, fromTokenAddress } }) => {
29
- const [target] = (await ParticipateService.getTarget(chainId, protocolId, identifier)) ?? [];
28
+ const [target] = (await InteractionService.getTarget(chainId, protocolId, identifier)) ?? [];
30
29
  //TODO: throw error
31
30
  if (!target)
32
31
  return;
@@ -39,7 +38,7 @@ export const ParticipateController = new Elysia({ prefix: "/participate", detail
39
38
  chainId,
40
39
  });
41
40
  }, {
42
- query: GetParticipateQuoteQueryDto,
41
+ query: GetInteractionQuoteQueryDto,
43
42
  detail: {
44
43
  summary: "Preview participate transaction",
45
44
  description: "",
@@ -47,7 +46,7 @@ export const ParticipateController = new Elysia({ prefix: "/participate", detail
47
46
  })
48
47
  // ─── Get Transaction ─────────────────────────────────────────────────
49
48
  .get("/transaction", async ({ query: { protocolId, chainId, identifier, userAddress, fromAmount, fromTokenAddress } }) => {
50
- const [target] = (await ParticipateService.getTarget(chainId, protocolId, identifier)) ?? [];
49
+ const [target] = (await InteractionService.getTarget(chainId, protocolId, identifier)) ?? [];
51
50
  //TODO: throw error
52
51
  if (!target)
53
52
  return;
@@ -60,7 +59,7 @@ export const ParticipateController = new Elysia({ prefix: "/participate", detail
60
59
  chainId,
61
60
  });
62
61
  }, {
63
- query: GetParticipateQuoteQueryDto,
62
+ query: GetInteractionQuoteQueryDto,
64
63
  detail: {
65
64
  summary: "Get participate transaction",
66
65
  description: "",
@@ -1,7 +1,7 @@
1
1
  import type { Token } from "../token";
2
2
  export declare const participateInputTypes: readonly ["tokenAmount", "token"];
3
- export type ParticipateInputType = (typeof participateInputTypes)[number];
4
- export type ParticipateInput<T extends ParticipateInputType = ParticipateInputType> = {
3
+ export type InteractionInputType = (typeof participateInputTypes)[number];
4
+ export type InteractionInput<T extends InteractionInputType = InteractionInputType> = {
5
5
  tokenAmount: {
6
6
  chain: number[];
7
7
  address: string[];
@@ -12,32 +12,32 @@ export type ParticipateInput<T extends ParticipateInputType = ParticipateInputTy
12
12
  };
13
13
  }[T];
14
14
  export declare const participateTypes: readonly ["link", "deposit", "withdraw"];
15
- export type ParticipateType = (typeof participateTypes)[number];
16
- export type ParticipateSchema<T extends ParticipateType> = {
15
+ export type InteractionType = (typeof participateTypes)[number];
16
+ export type InteractionSchema<T extends InteractionType> = {
17
17
  link: {
18
18
  link: string;
19
19
  };
20
20
  deposit: {
21
- inputs: ParticipateInput[];
21
+ inputs: InteractionInput[];
22
22
  };
23
23
  withdraw: {
24
24
  d: string;
25
25
  };
26
26
  }[T];
27
- export type ParticipateTarget = {
27
+ export type InteractionTarget = {
28
28
  identifier: string;
29
29
  name: string;
30
30
  tokens: Token["model"][];
31
31
  };
32
- export type ParticipateSchemas = {
33
- [T in ParticipateType]?: ParticipateSchema<T>;
32
+ export type InteractionSchemas = {
33
+ [T in InteractionType]?: InteractionSchema<T>;
34
34
  };
35
- export declare const GetParticipateTargetsQueryDto: import("@sinclair/typebox").TObject<{
35
+ export declare const GetInteractionTargetsQueryDto: import("@sinclair/typebox").TObject<{
36
36
  chainId: import("@sinclair/typebox").TNumber;
37
37
  protocolId: import("@sinclair/typebox").TString;
38
38
  identifier: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
39
39
  }>;
40
- export declare const GetParticipateQuoteQueryDto: import("@sinclair/typebox").TObject<{
40
+ export declare const GetInteractionQuoteQueryDto: import("@sinclair/typebox").TObject<{
41
41
  chainId: import("@sinclair/typebox").TNumber;
42
42
  protocolId: import("@sinclair/typebox").TString;
43
43
  identifier: import("@sinclair/typebox").TString;
@@ -45,7 +45,7 @@ export declare const GetParticipateQuoteQueryDto: import("@sinclair/typebox").TO
45
45
  fromTokenAddress: import("@sinclair/typebox").TString;
46
46
  fromAmount: import("@sinclair/typebox").TString;
47
47
  }>;
48
- export declare const GetParticipateProtocolsQueryDto: import("@sinclair/typebox").TObject<{
48
+ export declare const GetInteractionProtocolsQueryDto: import("@sinclair/typebox").TObject<{
49
49
  chainId: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
50
50
  }>;
51
- export type GetParticipateProtocolsQuery = typeof GetParticipateProtocolsQueryDto.static;
51
+ export type GetInteractionProtocolsQuery = typeof GetInteractionProtocolsQueryDto.static;
@@ -2,14 +2,14 @@ import protocol from "database/api/seeder/resources/protocol";
2
2
  import { t } from "elysia";
3
3
  export const participateInputTypes = ["tokenAmount", "token"];
4
4
  export const participateTypes = ["link", "deposit", "withdraw"];
5
- export const GetParticipateTargetsQueryDto = t.Object({
5
+ export const GetInteractionTargetsQueryDto = t.Object({
6
6
  chainId: t.Numeric(),
7
7
  protocolId: t.String({
8
8
  examples: Object.values(protocol).reduce((obj, i) => Object.assign(obj, { [i.name]: { value: i.id } }), {}),
9
9
  }),
10
10
  identifier: t.Optional(t.String()),
11
11
  });
12
- export const GetParticipateQuoteQueryDto = t.Object({
12
+ export const GetInteractionQuoteQueryDto = t.Object({
13
13
  chainId: t.Numeric(),
14
14
  protocolId: t.String({
15
15
  examples: Object.values(protocol).reduce((obj, i) => Object.assign(obj, { [i.name]: { value: i.id } }), {}),
@@ -19,6 +19,6 @@ export const GetParticipateQuoteQueryDto = t.Object({
19
19
  fromTokenAddress: t.String(),
20
20
  fromAmount: t.String(),
21
21
  });
22
- export const GetParticipateProtocolsQueryDto = t.Object({
22
+ export const GetInteractionProtocolsQueryDto = t.Object({
23
23
  chainId: t.Optional(t.Numeric()),
24
24
  });
@@ -1,8 +1,8 @@
1
1
  import { EnsoService } from "../enso/enso.service";
2
2
  import type { ProtocolId } from "../protocol";
3
- import type { ParticipateTarget } from "./participate.model";
4
- export declare abstract class ParticipateService {
5
- static getTarget(chainId: number, protocolId: ProtocolId, identifier: string): Promise<ParticipateTarget[] | undefined>;
6
- static getTargetsFromEnsoTokens(tokens: Awaited<ReturnType<typeof EnsoService.getTokens>>): Promise<ParticipateTarget[]>;
7
- static getTargets(chainId: number, protocolId: ProtocolId): Promise<ParticipateTarget[] | undefined>;
3
+ import type { InteractionTarget } from "./interaction.model";
4
+ export declare abstract class InteractionService {
5
+ static getTarget(chainId: number, protocolId: ProtocolId, identifier: string): Promise<InteractionTarget[] | undefined>;
6
+ static getTargetsFromEnsoTokens(tokens: Awaited<ReturnType<typeof EnsoService.getTokens>>): Promise<InteractionTarget[]>;
7
+ static getTargets(chainId: number, protocolId: ProtocolId): Promise<InteractionTarget[] | undefined>;
8
8
  }
@@ -1,12 +1,12 @@
1
1
  import { EnsoService } from "../enso/enso.service";
2
2
  import { TokenService } from "../token";
3
- export class ParticipateService {
3
+ export class InteractionService {
4
4
  static async getTarget(chainId, protocolId, identifier) {
5
5
  const slug = EnsoService.getSlug(protocolId);
6
6
  if (!slug)
7
7
  return;
8
8
  const tokens = await EnsoService.getTokens(chainId, slug, identifier);
9
- return await ParticipateService.getTargetsFromEnsoTokens(tokens);
9
+ return await InteractionService.getTargetsFromEnsoTokens(tokens);
10
10
  }
11
11
  static async getTargetsFromEnsoTokens(tokens) {
12
12
  const targets = [];
@@ -28,6 +28,6 @@ export class ParticipateService {
28
28
  if (!slug)
29
29
  return;
30
30
  const tokens = await EnsoService.getTokens(chainId, slug);
31
- return await ParticipateService.getTargetsFromEnsoTokens(tokens);
31
+ return await InteractionService.getTargetsFromEnsoTokens(tokens);
32
32
  }
33
33
  }
@@ -13,7 +13,7 @@ export declare const MerklRootController: Elysia<"/roots", false, {
13
13
  macroFn: {};
14
14
  }, {
15
15
  roots: {
16
- timestamps: {
16
+ index: {
17
17
  get: {
18
18
  body: unknown;
19
19
  params: {};
@@ -36,7 +36,7 @@ export declare const MerklRootController: Elysia<"/roots", false, {
36
36
  };
37
37
  } & {
38
38
  roots: {
39
- index: {
39
+ live: {
40
40
  get: {
41
41
  body: unknown;
42
42
  params: {};
@@ -5,11 +5,11 @@ import { MerklRootService } from "./merklRoot.service";
5
5
  // ─── Merkl Roots Controller ──────────────────────────────────────────────────
6
6
  export const MerklRootController = new Elysia({ prefix: "/roots", detail: { tags: ["Roots"] } })
7
7
  // ─── Get Merkl Root By Timestamp ─────────────────────────────────────
8
- .get("/timestamps", async ({ query }) => await MerklRootService.rootForTimestamp(query), {
8
+ .get("/", async ({ query }) => await MerklRootService.rootForTimestamp(query), {
9
9
  query: RootByTimestampsDto,
10
10
  beforeHandle: async ({ query }) => {
11
11
  throwOnUnsupportedChainId(query.chainId);
12
12
  },
13
13
  })
14
14
  // ─── Get all live Merkl Roots ─────────────────────────────────────────
15
- .get("/", async () => await MerklRootService.fetchAll());
15
+ .get("/live", async () => await MerklRootService.fetchAll());
@@ -6,12 +6,16 @@ import { OpportunityService } from "./opportunity.service";
6
6
  import { transformId } from "./transform-id.pipe";
7
7
  import { validateId } from "./validate-id.pipe";
8
8
  // ─── Opportunities Controller ────────────────────────────────────────────────
9
- export const OpportunityController = new Elysia({ prefix: "/opportunities", detail: { tags: ["Opportunities"] } })
9
+ export const OpportunityController = new Elysia({
10
+ prefix: "/opportunities",
11
+ detail: { tags: ["Opportunities"] },
12
+ })
10
13
  // ─── Create An Opportunity ───────────────────────────────────────────
11
14
  .post("/", async ({ body }) => await OpportunityService.create(body), {
12
15
  beforeHandle: TokenAuthGuard,
13
16
  headers: AuthorizationHeadersDto,
14
17
  body: CreateOpportunityDto,
18
+ detail: { hide: true },
15
19
  })
16
20
  // ─── Get An Opportunity By Id ────────────────────────────────────────
17
21
  .get("/:id", async ({ params }) => {
@@ -35,6 +35,7 @@ export const PriceController = new Elysia({ prefix: "/prices", detail: { tags: [
35
35
  headers: AuthorizationHeadersDto,
36
36
  body: CreatePriceSourceDto,
37
37
  beforeHandle: BackOfficeGuard,
38
+ detail: { hide: true },
38
39
  })
39
40
  // ─── Update A Price Source ───────────────────
40
41
  .patch("/symbol/:symbol", async ({ params, body }) => await PriceService.updatePriceSource(params.symbol, body), {
@@ -42,11 +43,13 @@ export const PriceController = new Elysia({ prefix: "/prices", detail: { tags: [
42
43
  params: PriceSourceIdentifier,
43
44
  body: UpdatePriceSourceDto,
44
45
  beforeHandle: BackOfficeGuard,
46
+ detail: { hide: true },
45
47
  })
46
48
  // ─── Delete A Price Source ───────────────────
47
49
  .delete("/symbol/:symbol", async ({ params }) => await PriceService.deletePriceSource(params.symbol), {
48
50
  headers: AuthorizationHeadersDto,
49
51
  params: PriceSourceIdentifier,
50
52
  beforeHandle: BackOfficeGuard,
53
+ detail: { hide: true },
51
54
  }));
52
55
  });
@@ -113,35 +113,37 @@ export declare const RewardController: Elysia<"/rewards", false, {
113
113
  };
114
114
  } & {
115
115
  rewards: {
116
- pendings: {
117
- post: {
118
- body: {
119
- distributionChainId: number;
120
- campaignId: string;
121
- root: string;
122
- rewardToken: string;
123
- toUpdate: {
124
- auxiliaryData1?: string | undefined;
125
- auxiliaryData2?: string | undefined;
126
- reason: string;
127
- pending: string;
128
- recipient: string;
129
- }[];
130
- toCreate: {
131
- auxiliaryData1?: string | undefined;
132
- auxiliaryData2?: string | undefined;
133
- reason: string;
134
- pending: string;
135
- recipient: string;
136
- }[];
137
- };
138
- params: {};
139
- query: unknown;
140
- headers: {
141
- authorization: string;
142
- };
143
- response: {
144
- 200: boolean;
116
+ engine: {
117
+ pendings: {
118
+ post: {
119
+ body: {
120
+ distributionChainId: number;
121
+ campaignId: string;
122
+ root: string;
123
+ rewardToken: string;
124
+ toUpdate: {
125
+ auxiliaryData1?: string | undefined;
126
+ auxiliaryData2?: string | undefined;
127
+ reason: string;
128
+ pending: string;
129
+ recipient: string;
130
+ }[];
131
+ toCreate: {
132
+ auxiliaryData1?: string | undefined;
133
+ auxiliaryData2?: string | undefined;
134
+ reason: string;
135
+ pending: string;
136
+ recipient: string;
137
+ }[];
138
+ };
139
+ params: {};
140
+ query: unknown;
141
+ headers: {
142
+ authorization: string;
143
+ };
144
+ response: {
145
+ 200: boolean;
146
+ };
145
147
  };
146
148
  };
147
149
  };
@@ -33,19 +33,19 @@ export const RewardController = new Elysia({ prefix: "/rewards", detail: { tags:
33
33
  beforeHandle: EngineGuard,
34
34
  })
35
35
  // ─── Create Many Pending Rewards ─────────────────────────────────────
36
- .post("/pendings", async ({ body }) => await RewardService.updatePendings(body), {
36
+ .post("/engine/pendings", async ({ body }) => await RewardService.updatePendings(body), {
37
37
  headers: AuthorizationHeadersDto,
38
38
  body: UpdatePendingDto,
39
39
  beforeHandle: EngineGuard,
40
40
  })
41
- // ─── Get Reward Count By Chain And Root ───────────────────────────────────────
41
+ // ─── Get Reward Count By Chain And Root ──────────────────────────────
42
42
  .get("/count", async ({ query }) => await RewardService.count(query), {
43
43
  query: CampaignIdDto,
44
44
  beforeHandle: ({ query }) => {
45
45
  throwOnUnsupportedChainId(query.chainId);
46
46
  },
47
47
  })
48
- // ─── Get Reward Count By Chain And Root ───────────────────────────────────────
48
+ // ─── Get Reward Count By Chain And Root ──────────────────────────────
49
49
  .get("/count/chains", async () => await RewardService.countAllchains(), {
50
50
  headers: AuthorizationHeadersDto,
51
51
  beforeHandle: BackOfficeGuard,
@@ -1,6 +1,6 @@
1
1
  import type { MerklAPIType, MerklChainId } from "@sdk";
2
- import type { RewardV3Model, UserRewardV3Model } from "./reward.model";
3
- import { RewardService } from "./reward.service";
2
+ import type { RewardV3Model, UserRewardV3Model } from "../reward.model";
3
+ import { RewardService } from "../reward.service";
4
4
  export declare abstract class RewardConvertorService {
5
5
  /**
6
6
  * Convert the v4 reward data to the v3 model used in the v3/userRewards route
@@ -1,4 +1,4 @@
1
- import { RewardService } from "./reward.service";
1
+ import { RewardService } from "../reward.service";
2
2
  export class RewardConvertorService {
3
3
  /**
4
4
  * Convert the v4 reward data to the v3 model used in the v3/userRewards route